Age | Commit message (Collapse) | Author |
|
Microsoft.NET.Sdk.IL
From Version 7.0.0-rtm.22473.12 -> To Version 7.0.0-rtm.22507.1
|
|
Microsoft.NET.Sdk.IL
From Version 7.0.0-rtm.22473.12 -> To Version 7.0.0-rtm.22480.10
|
|
|
|
|
|
(#3049)
[main] Update dependencies from dotnet/runtime
|
|
(#3048)
[main] Update dependencies from dotnet/arcade
|
|
(#3041)
[main] Update dependencies from dotnet/runtime
|
|
(#3040)
[main] Update dependencies from dotnet/arcade
|
|
Adds EventSource events for the start and end of Main() and for the start and end of each call to IStep.Process().
The dotnet/performance scenarios can use ETW events to give a more detailed breakdown of where time is spent. This PR creates a few simple events to be able to track the time the linker takes from process start to end more precisely without any noise from MSBuild. If we want to track more fine-grained details, it will be easy to add them in the future.
LinkerStart is emitted right at the start of Main().
LinkerStop is emitted right before returning from Main().
LinkerStepStart is emitted right before calling IStep.Process.
LinkerStrpStop is emitted right after IStep.Process returns.
|
|
mentions (#3044)
We were lacking validation for some of the warnings, and so change in behavior of the product wasn't reflected in the tests. This cleans up tests for IL2053 and IL2054 (which are not produced anymore).
|
|
* Remove --keep-facades option
|
|
[main] Update dependencies from dotnet/runtime
|
|
[main] Update dependencies from dotnet/arcade
|
|
* Improve warning message for DynamicDependency to include the name of the type along with the name of the member we were looking for.
* Fix tests
|
|
Fixes https://github.com/dotnet/linker/issues/1374
|
|
Use new version of MicrosoftCodeAnalysisVersion in linker (Copy from runtime) to fix the dotnet format command
Run the dotnet format command
Reenable Lint check in ci pipelines
|
|
|
|
Allow codefixer to insert a fix in accessor declarations if we target methods
Fix tests that had accessors and were annotating properties/events
Add tests
|
|
instantiation (#3015)
* Fixes a null ref which happens when an XML comment cref contains generic instantiation
In the cref some of the symbols (for example the type argument) are missing containing symbols, which leads to null refs.
In any case, we should not perform any analysis on symbols inside crefs, only on real code.
So this modifies the analyzer to ignore any symbol inside a cref.
Adds a test to validate this.
* Simplify the test
|
|
Co-authored-by: Matt Galbraith <mattgal@microsoft.com>
|
|
[main] Update dependencies from dotnet/runtime
|
|
The motivation of the change is to reduce the number of unnecessary warnings around PInvokes. The change makes the RequiresReflectionMethodBodyScannerForCallSite check for COM to decide whether dataflow analysis is needed for PInvokes.
|
|
(#3006)
Microsoft.DotNet.ApiCompat , Microsoft.DotNet.Arcade.Sdk
From Version 7.0.0-beta.22419.1 -> To Version 7.0.0-beta.22426.8
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
|
|
|
|
This change adds ILParameterIndex to represent the IL-based indexing where 0 may refer to this, and SourceParameterIndex where 0 is the first "real" parameter in C# source code. Converting from ILParameterIndex to SourceParameterIndex returns a SourceParameterKind to differentiate between thisand other parameters and ensure that anySourceParameterIndexwill be able to indexMethodReference.Parameters`.
It uses these in ParameterReferenceValue as well as GetMethodParameterValue() and adds a GetMethodThisParameterValue(), ThisParameterReferenceValue, and bubbles the changes where necessary.
Most places should use SourceParameterIndex, and convert to ILParameterIndex when necessary or at the boundary of updated and old code.
|
|
* Update dependencies from https://github.com/dotnet/arcade build 20220805.6
Microsoft.DotNet.ApiCompat , Microsoft.DotNet.Arcade.Sdk
From Version 7.0.0-beta.22379.10 -> To Version 7.0.0-beta.22405.6
* Update dependencies from https://github.com/dotnet/arcade build 20220811.2
Microsoft.DotNet.ApiCompat , Microsoft.DotNet.Arcade.Sdk
From Version 7.0.0-beta.22379.10 -> To Version 7.0.0-beta.22411.2
* Update dependencies from https://github.com/dotnet/arcade build 20220818.4
Microsoft.DotNet.ApiCompat , Microsoft.DotNet.Arcade.Sdk
From Version 7.0.0-beta.22379.10 -> To Version 7.0.0-beta.22418.4
* Update dependencies from https://github.com/dotnet/arcade build 20220819.1
Microsoft.DotNet.ApiCompat , Microsoft.DotNet.Arcade.Sdk
From Version 7.0.0-beta.22379.10 -> To Version 7.0.0-beta.22419.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
|
|
This replaces
https://github.com/dotnet/linker/commit/82c6dc6f82aeb90cfbe509ae07cf539eecb75550
with a different approach. Now SuppressTrimAnalysisWarnings only
suppresses those warnings defined to be part of the "trim analysis"
category, using a separate command-line argument. An exception is 5.0
apps, where the setting continues to suppress specific warnings for
compatibility.
|
|
This includes a sidecar XML file which will suppress new warnings in
the 6.0 framework.
Note that a few of the new warnings for compiler-generated code are
suppressed in 7.0 with attributes on local functions. In the XML I had
to suppress them with an attribute on the user method (since the
signature format doesn't support compiler-generated code).
Also note that this approach only includes suppressions for the core
framework, not OOB assemblies. OOB assemblies or third-party nuget
packages will require a slightly different approach to avoid warnings
about unresolved members referenced in XML, in apps where those
assemblies aren't used. There are no warnings that we need to suppress
in OOB assemblies - only new warnings in already trim-incompatible
code.
This also includes a fix for a varargs method issue I found while
running on the 6.0 framework.
|
|
* Test repro + fix
* fix marked filter for events and properties
* formatting fix
* simplified Suppression constructor
* Add more tests for events and properties
|
|
* Move usage of the semantic model outside of the RegisterCodeFixesAsync method for all CodeFixers since it slows lightbulb creation
* Add GetBestTypeByMetadataName from dotnet/roslyn and use it instead of GetTypeByMetadataName
* Use raw string literals in all codefixers testing files (this makes some tests to require spaces instead of tabs and change line numbers)
* More nit fixes to make test more consistent
* Rename DAMCodeFixProvider to DynamicallyAccessedMembersCodeFixProvider
* Add helper class for codeFixer
|
|
|
|
* Add generic attribute tests
* Update cecil
|
|
dataflow-tracked value and only validate on changes to locals (#2983)
|
|
|
|
|
|
Warnings indicating an unnecessary suppression produced by XML are now pointing to the xml location instead of being generated on the member the xml targets.
|
|
* Expand Code Fix support to 23 DynamicallyAccessedMembers trim warnings
* Pass information about where and what attribute needs to be added from the analyzer to the diagnostic so the Code Fix can target a greater number of warnings
* Include additional tests to ensure that Code Fix is provided as expected, and check edge cases
* Multiple annotations and merging of existing annotations is unsupported
|
|
There was a performance problem where we were tracking all
possible returned values throughout the method, since we were
treating them the same as hoisted locals. I'm sure it's still
possible to come up with testcases that show bad performance (for
example assigning many arrays to a hoisted local in the same
iterator), but this should at least fix the immediate issue
encountered in runtime.
|
|
Running dataflow analysis on the added test takes about 20 seconds. Double the number of `yield returns` and it will take several minutes.
In the runtime repo we're running into this on https://github.com/dotnet/runtime/blob/main/src/libraries/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTestData.cs (method `SerializableObjects()`). That one has even more `yield returns` and I lost patience waiting for it to finish.
|
|
* Use a HashSet instead of List for MarkStep._virtual_methods
|
|
annotated with Requires (#2973)
|
|
Adds an ILVerifier to check that the IL produced by the linker is valid. Unsafe C# produced unverifiable code, so we skip verification when we pass that flag to the compiler. Also, there are a few warnings that are produced by valid C# with new features like static abstract interface methods and ref fields and ref returns.
In the future, it may be nice to add better error messages with the type, method name, and IL offset that produced the error, and perhaps an [ExpectedILVerifyError] attribute instead of filtering all of a type of error, but those are non-trivial to implement and don't occur in many tests (<10), so I haven't done that yet.
|
|
|
|
If we produce a warning for the method itself (no IL offset) and the method has debug symbols, it can happen that there's no sequence point for the first instruction. In that case the current code will crash because we expect to always find sequence point for offset 0.
Fix this by looking for the first sequence point instead.
|
|
Adds support and basic tests for ref fields. The tests ensure that a value written to an ref field is properly annotated, or an address written to a ref field has a properly annotated value, but there are some holes that can be created by assigning the address of a local or over-annotated value to an annotated ref field.
|
|
This prevents invalid IL in situations where removing the last
instruction of a method would result in the last instruction
being a conditional branch. There needs to be some IL in the
not-taken branch for the IL to be valid, so this fixes the issue
by injecting "ldnull; throw" at the end.
Co-authored-by: vitek-karas <10670590+vitek-karas@users.noreply.github.com>
Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com>
|
|
|
|
Analyzers look for a newer version of Microsoft.CodeAnalysis than exists in the latest version of Visual Studio, and so they don't run in FullFramework tests in dotnet/sdk#26993. This reverts the version used in the analyzers.
PR #2969 will undo this change once Visual Studio ships with the correct version of Microsoft.CodeAnalysis.
|
|
Static methods implementing static interface methods are not marked as virtual and were not checked for matching RUC and DAM annotations. This change adds all base methods to the _virtual_methods list to be checked for matching DAM and RUC annotations. This may cause extra/unnecessary warnings for mismatched annotations even a method is removed by the linker.
|
|
|