1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-09 09:34:49 +09:00
Commit graph

85 commits

Author SHA1 Message Date
github-actions[bot]
7e1c7c4f53
Mark the System.Formats.Nrbf assembly as [Experimental] with SYSLIB5005 (#107950)
Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>
2024-09-17 18:01:02 -07:00
Eirik Tsarpalis
c1ab6c5b25
[System.Text.Json] Improve error handling of ref structs, including collection types with ref struct elements. (#106083)
* STJ-SG: tolerate ref struct members with JsonIgnore.

* * Skip all ref like members and emit warnings.
* Add detection for collections with ref struct elements.

* Update src/libraries/System.Text.Json/gen/JsonSourceGenerator.Parser.cs

Co-authored-by: David Cantú <dacantu@microsoft.com>

* Update src/libraries/System.Text.Json/gen/JsonSourceGenerator.Parser.cs

Co-authored-by: David Cantú <dacantu@microsoft.com>

---------

Co-authored-by: David Cantú <dacantu@microsoft.com>
2024-08-12 09:16:39 +01:00
Jeremy Koritzinsky
1563fec7ea
Implement basic (recommended against) support for inheriting from COM interfaces defined in different assemblies (#105119) 2024-08-06 14:27:43 -07:00
Jeff Handley
50bc6a1ed6
Update Preview/Experimental Attributes in Intrinsics (#105579)
* Arm.Sve - Switch from RequiresPreviewFeatures to Experimental

* X86.AvxVnni no longer requires preview features

* X86.X86Base.DivRem no longer requires preview features

* GenericVectorTests no longer requires preview features (generic math)

* Arm.Sve - Switch from RequiresPreviewFeatures to Experimental (fix mono build)

* Arm.Sve - Switch from RequiresPreviewFeatures to Experimental (fix JIT tests)

* Update SYSLIB5001 suppressions to have consistent comments

* Apply [Experimental] to X86Base.DivRem
2024-07-30 16:20:06 -07:00
Jeremy Kuhne
63cb7ec3af
Add alternate system color experimental feature (#105525)
Allows overriding KnownColor system values with an alternate set, which in the initial iteration is "dark mode" colors. Enables "dark mode" features in Windows Forms.

This is from the approved part of https://github.com/dotnet/winforms/issues/7641 with further naming iteration done offline with API review.
2024-07-29 13:30:04 -07:00
Tanner Gooding
5998f88eef
Mark the new tensor APIs as experimental for .NET 9 (#105268)
* Mark the new tensor APIs as experimental for .NET 9

* Apply SNTEXP0001 to other internal API

* Suppress SNTEXP0001 in System.Numerics.Tensors.Tests

* Use SYSLIB5001. Central registration of experimental API diagnostic ids.

* Add Experimentals.cs (missed in prior commit)

* Revert SLN changes. Add UrlFormat property to attributes where missing.

* Ensure the net8 tensors tests also don't warn for the experimental API usage

---------

Co-authored-by: Eric StJohn <ericstj@microsoft.com>
Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>
2024-07-23 18:59:34 -07:00
Kevin Jones
029007daba
Update SYSLIB0026 with new message 2024-07-10 10:35:18 -04:00
Kevin Jones
e805e47249
Add SYSLIB0056 to list of diagnostics
Co-authored-by: Stephen Toub <stoub@microsoft.com>
2024-07-10 10:34:49 -04:00
Kevin Jones
02bd1da6e3
Obsolete X509Certificate{2} constructors and X509Certificate2Collection.Import 2024-07-05 13:37:34 -04:00
Ken Dale
59f2833b98
Update docs.microsoft.com usages to learn.microsoft.com (#102881)
* Update https://docs.microsoft.com to https://learn.microsoft.com

* Update http://docs.microsoft.com/ to https://learn.microsoft.com (removes trailing slash)

* Update docs.microsoft.com to https://learn.microsoft.com

* Update docs.microsoft.com to learn.microsoft.com

* Replace learn.microsoft.com/en-us/ with learn.microsoft.com/ to remove locale from urls
2024-05-31 11:27:45 -07:00
Jacob Bundgaard
9daa4b41eb
Add support for primary constructors in LoggerMessageGenerator (#101660)
* Add support for primary constructors in LoggerMessageGenerator

* Get the primary constructor parameters types from the constructor symbol instead of from the semantic model

* Prioritize fields over primary constructor parameters and ignore shadowed parameters when finding a logger

* Make checking for primary constructors non-conditional on Roslyn version and simplify project setup

* Reintroduce Roslyn 4.8 test project

* Add info-level diagnostic for logger primary constructor parameters that are shadowed by field

* Update list of diagnostics with new logging message generator diagnostic

* Only add non-logger field names to set of shadowed names

* Add comment explaining the use of the set of shadowed names with an example
2024-05-28 09:13:32 -07:00
Jeff Handley
37acea29ac
Obsolete invalid AdvSimd.ShiftRightLogicalRoundedNarrowingSaturate* overloads (#99985) 2024-04-18 10:41:23 -07:00
Collin Alpert
6ebc8bd86d
Make Thread.VolatileRead and Thread.VolatileWrite obsolete (#99382)
* Make Thread.VolatileRead and Thread.VolatileWrite obsolete

* Prevent Thread.VolatileRead and Thread.VolatileWrite from being editor browsable.

* Consolidate obsoletion message and add obsolete attributes to reference definition

* Add EditorBrowsableAttribute to reference definition
2024-03-08 15:55:45 -08:00
Tarek Mahmoud Sayed
45978bd719
Fix the configuration source gen diagnostic message (#94881) 2023-11-16 14:40:20 -08:00
Robin Lindner
5b7ab0416f
Obsolete AuthenticationManager of System.Net.Requests (#93171)
* Mark AuthenticationManager as Obsolete

* Update SYSLIB0009 diagnostic
* Add ObsoleteAttribute at class-level for AuthenticationManager
* Use generated ref source

* Fix tests

* Update diagnostic doc

* More obsoletion
2023-10-10 15:07:15 -07:00
Tarek Mahmoud Sayed
26a809adb9
Fix Options Source Gen Trimming Issues (#93088) 2023-10-08 16:25:37 -07:00
Jackson Schuster
f3e6b1bbe3
[ComInterfaceGenerator] Recommend [In] and [Out] attributes on array parameters (#91094)
Recommend that methods with array parameters use [In] or [Out] attributes if there are none already, and the parameter is not in, ref, or out.
2023-08-25 16:04:13 -07:00
Layomi Akinrinade
a5ff66c825
Use Roslyn interceptors feature in binder gen (#90340)
* Use Roslyn interceptors feature in binder gen

* Fix polymorphic issue and address feedback

* Fix source build issue

* Revert changes to options gen

* Fix
2023-08-19 09:16:49 -07:00
Tarek Mahmoud Sayed
9d747c9e7f
Limit language version on Logger and Options source gens (#90654) 2023-08-16 16:55:41 -07:00
Jackson Schuster
531ad9596f
Add Info warning for int return values (#89601)
Adds an 'info' level diagnostic if a GeneratedComInterface method returns int, enum, or a type name "HR" or "HResult" to tell the user that the generated code will put the managed return value as an 'out' parameter on the COM definition.

Co-authored-by: Jeremy Koritzinsky <jkoritzinsky@gmail.com>
2023-08-01 16:15:21 -07:00
Eirik Tsarpalis
84873e6c4e
Ensure System.Text.Json SG diagnostics don't use Location values from referenced assemblies. (#89518) 2023-07-27 13:13:27 +01:00
Eirik Tsarpalis
5bc100ed64
Emit a diagnostic when attributes deriving from JsonConverterAttribute are being used. (#89199)
* Emit a diagnostic when attributes deriving from JsonConverterAttribute are being used.

* Address feedback.
2023-07-21 17:23:44 +01:00
Tarek Mahmoud Sayed
24150b3a6d
Fix options source gen with non-accessible validation attributes (#88613) 2023-07-11 16:55:43 -07:00
Eirik Tsarpalis
24d7f5a58a
Extend JsonIncludeAttribute and JsonConstructorAttribute support to internal and private members (#88452)
* Relax JsonIncludeAttribute to also support private or internal members.

* Relax JsonConstructorAttribute to include internal or private constructors (where applicable).
2023-07-07 12:40:29 +01:00
Nikita Balabaev
779d53611e
Fix OptionsValidator source-gen to skip static and const members (#88254)
Co-authored-by: Nikita Balabaev <nbalabaev@microsoft.com>
2023-07-02 11:37:07 -07:00
Eirik Tsarpalis
dbf3a16dba
Document new STJ diagnostics and fix diagnostic id conflicts. (#87980) 2023-06-26 16:38:12 +01:00
Tarek Mahmoud Sayed
de6f07edd2
Options validation source generator (#87587) 2023-06-20 14:56:21 -07:00
Jackson Schuster
6ea11b5578
Add marshalling tests and warn if interface is not partial (#87146)
Adds tests that marshal different types to and from native, and adds a warning if the interface or any containing types are not marked partial.
2023-06-09 15:25:44 -07:00
Jeremy Koritzinsky
4d52032d95
Add analyzers and code-fixes to help adoption of source-generated COM (#87223)
* Add first pass of the "convert to generated COM interface" analyzer and add tests for the various other analyzers we are going to introduce.

* Get all analyzer-specific components of the "convert" tests passing.

* Implement all interface-attribute-level changes in the code fixer.

* Add bool marshalling insertion logic to the fixer.

* Add support for removing shadowing members from interfaces.

* Rename fixer

* ActiveIssue the new tests

* Implement basic AddGeneratedComClass analyzer/fixer

* Add ComHosting + GeneratedComInterface analyzer implementation.

* Implement the "runtime COM APIs with source-generated COM types" analyzer.

* Factor out a base class from the ConvertToLibraryImportFixer so we can share it with the ComInterfaceGenerator-family of fixers.

* Move more of the ConvertToLibraryImportFixer to use SyntaxGenerator APIs instead of dropping to C#-specific syntax APIs (improves consistency throughout our code fixes)

* Move support for specifying explicit boolean marshalling rules up to the base class.

* Move the code fixes in ComInterfaceGenerator over to using the ConvertToSourceGeneratedInteropFixer base type.

* Remove use of multicasted delegates and use a more traditional "array of delegates" model.

* Do some refactoring to move more into the new fixer base class.

* Remove custom CodeAction-derived types now that we have a record type to represent fixes from the subclasses.

* Make sure we make types and containing types partial

* Fix negative test.

* Add tests for transitive interface inheritance and add iids.

* Change bool parsing for internal parsing and add warning annotation text. Update diagnostics list md.
2023-06-08 20:36:25 -07:00
Layomi Akinrinade
ac5febd6b7
Update binder gen parser to issue diagnostics for invalid input types (#86856)
* Update binder gen parser to issue diagnostics for invalid input types

* Address feedback; tests for more invalid types; fix failing CI test
2023-06-01 09:33:36 -07:00
Kevin Jones
04a1fe3059
Implement AesGcm constructors accepting a tag size and obsolete the existing ones 2023-05-15 13:28:00 -04:00
Stephen Toub
6887fc439b
Obsolete some protected, unused members of Regex{Runner} (#84812) 2023-04-20 06:14:25 -04:00
Levi Broderick
1487522704
Obsolete most of the remaining legacy serialization APIs (#84383)
- Move BinaryFormatter obsoletions to type-level
- Introduce SYSLIB0050 and SYSLIB0051 obsoletion waves
- Remove some dead code

Ref: https://github.com/dotnet/designs/pull/293
2023-04-10 22:52:15 -07:00
Levi Broderick
dd44d52b91
Reserving two diagnostic codes for serialization work (#84439) 2023-04-06 14:01:00 -07:00
Eirik Tsarpalis
e43ddbf9dc
Revert #80698 and obsolete JsonSerializerOptions.AddContext (#84022)
* Revert 9a6686be5d.

* Obsolete JsonSerializerOptions.AddContext
2023-03-30 12:40:48 +01:00
Layomi Akinrinade
9111203d54
Set minimum language version allowed by config binding generator (#83996)
* Set minimum language version allowed by config binding generator

* Address feedback; use correct diagnostic severity
2023-03-28 21:47:17 -07:00
Layomi Akinrinade
be8d451636
Create source generator for configuration binding (#82179)
* Create source generator for configuration binding

* Add baseline tests

* Rename test project folders

* Avoid passing entire compilation to generator execute method

* Enable nullable

* Add logic to include generator in nuget package and enable it conditionally

* Address feedback
2023-03-16 14:42:38 -07:00
Jeremy Koritzinsky
0717edad58
Create skeleton for the ComInterfaceGenerator (#80887)
Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>
2023-02-15 13:03:41 -08:00
Allan Targino
8521541d63
diagnostic to detect malformed format strings in lsg template message (#81503)
fix https://github.com/dotnet/runtime/issues/52226
2023-02-05 11:19:43 -08:00
Jeff Handley
89fe29a717
Fix formatting in list-of-diagnostics.md (#81396)
* Fix formatting in list-of-diagnostics.md

I noticed the page currently renders with dangling `_` characters. This change cleans up the markdown formatting, changing the redundant `*_` to `_` and ensuring each is paried correctly.

I also improved alignment of the suppression table columns.

* Update docs/project/list-of-diagnostics.md

---------

Co-authored-by: Stephen Toub <stoub@microsoft.com>
2023-01-31 11:23:29 -05:00
Jackson Schuster
1630725383
Create analyzer in ComInterfaceGenerator to enforce the generator is used with IUnknown only (#78189)
Creates an analyzer that warns if the GeneratedComInterfaceAttribute is
used with InterfaceTypeAttribute that has an argument that is not
'InterfaceIsIUnknown'
Co-authored-by: Jeremy Koritzinsky <jkoritzinsky@gmail.com>
Co-authored-by: Elinor Fung <elfung@microsoft.com>
2023-01-12 11:48:25 -08:00
Allan Targino
fd9f52098b
Adds diagnostics to detect duplicated event names in LSG (#80460)
fixes https://github.com/dotnet/runtime/issues/64667
2023-01-11 07:29:18 -08:00
Allan Targino
71bb0d4810
Adds diagnostic for out parameter in LSG (#80458)
fixes https://github.com/dotnet/runtime/issues/64665
2023-01-10 15:45:30 -08:00
Robin Lindner
d653f2bb39
Obsolete RSA.EncryptValue and RSA.DecryptValue 2022-10-05 10:38:59 -07:00
Levi Broderick
d2afae4fb0
Obsolete XmlSecureResolver (#73676)
- Add XmlResolver.ThrowingResolver
- Migrate all call sites to the new API
- Improve error messages on failure

Resolves CVE-2022-34716.
2022-08-12 12:55:05 -07:00
Pavel Savara
222da17b8d
[wasm] JSImport generator AllowUnsafeBlocks diagnostic (#72996)
- added `JSImportAttribute requires unsafe code` + unit test
- fixed Diagnostic IDs + reservation
- moved System.Runtime.InteropServices.JavaScript.UnitTests to subfolder
2022-07-29 19:48:06 +02:00
Anton Lapounov
d365ff2e86
Implement ControlledExecution API (#71661) 2022-07-27 23:38:38 -07:00
Adeel Mujahid
b0090d0a4f
Rename [RegexGenerator] to [GeneratedRegex] (#72434)
Co-authored-by: Jose Perez Rodriguez <joperezr@microsoft.com>
2022-07-27 17:14:53 -07:00
Jeremy Koritzinsky
f4cb6ac85a
Add analyzer support to validate the stateless marshaller shapes (#72643) 2022-07-26 10:16:37 -07:00
Aaron Robinson
1e1e86d34e
LibraryImport generator AllowUnsafeBlocks diagnostic (#72650)
* LibraryImport generator AllowUnsafeBlocks diagnostic
2022-07-22 18:57:36 -07:00