Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-09-19Update dependencies from https://github.com/dotnet/runtime build 20220916.6darc-main-3025bfb4-7523-415d-a064-80d48ffd0fc5dotnet-maestro[bot]
Microsoft.NET.Sdk.IL From Version 7.0.0-rc.2.22460.1 -> To Version 7.0.0-rtm.22466.6
2022-09-19[main] Update dependencies from dotnet/runtime (#3024)dotnet-maestro[bot]
[main] Update dependencies from dotnet/runtime
2022-09-19[main] Update dependencies from dotnet/arcade (#3023)dotnet-maestro[bot]
[main] Update dependencies from dotnet/arcade
2022-09-16Better warning message for DynamicDependency problem (#3035)Vitek Karas
* 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
2022-09-15Fix how keeping something due to DynamicDependency is traced (#3033)Vitek Karas
Fixes https://github.com/dotnet/linker/issues/1374
2022-09-08Fix lint command (#3027)Tlakaelel Axayakatl Ceja
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
2022-09-06Sync AOT tests with linker (#3026)Tlakaelel Axayakatl Ceja
2022-09-02Allow codefixer to annotate accessor declarations as methods (#3017)Tlakaelel Axayakatl Ceja
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
2022-09-01Fixes a null ref which happens when an XML comment cref contains generic ↵Vitek Karas
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
2022-09-01Update public pool names (#3013)Alex Perovich
Co-authored-by: Matt Galbraith <mattgal@microsoft.com>
2022-09-01[main] Update dependencies from dotnet/runtime (#2974)dotnet-maestro[bot]
[main] Update dependencies from dotnet/runtime
2022-08-31Verify if COM dangerous during call site check (#3009)Jeremi Kurdek
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.
2022-08-30Update dependencies from https://github.com/dotnet/arcade build 20220826.8 ↵dotnet-maestro[bot]
(#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>
2022-08-30Annotated TestSystemTypeBase (#3008)Jeremi Kurdek
2022-08-29Use enum for method parameter indexing (#2993)Jackson Schuster
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.
2022-08-27[main] Update dependencies from dotnet/arcade (#2950)dotnet-maestro[bot]
* 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>
2022-08-26Don't suppress all warnings with SuppressTrimAnalysisWarnings (#3003)Sven Boemer
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.
2022-08-26Suppress warnings in 6.0 framework (#3000)Sven Boemer
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.
2022-08-26Do not report redundant suppressions on trimmed members (#2999)Jeremi Kurdek
* Test repro + fix * fix marked filter for events and properties * formatting fix * simplified Suppression constructor * Add more tests for events and properties
2022-08-24CodeFixer enhancements (#2994)Tlakaelel Axayakatl Ceja
* 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
2022-08-23Add generated test (#2995)Jackson Schuster
2022-08-23Add support for generic attributes (#2980)Sven Boemer
* Add generic attribute tests * Update cecil
2022-08-23Check variable type in ValidateNoReferencesToReferences instead of ↵Jackson Schuster
dataflow-tracked value and only validate on changes to locals (#2983)
2022-08-23Add documentation (#2989)Isabel Serrato
2022-08-19Generate attribute in Code Fix (#2985)Isabel Serrato
2022-08-19IL2121 warnings point to XML files correctly (#2965)Jeremi Kurdek
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.
2022-08-18CodeFix Support for Additional DAM IDs (#2939)Isabel Serrato
* 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
2022-08-18Don't track current field of state machines (#2979)Sven Boemer
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.
2022-08-17Add test for dotnet/runtime#73048 (#2977)Michal Strehovský
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.
2022-08-16Use HashSet instead of List for _virtual_methods (#2976)Jackson Schuster
* Use a HashSet instead of List for MarkStep._virtual_methods
2022-08-15Suppress warning in instance fields if the instance constructors are ↵Tlakaelel Axayakatl Ceja
annotated with Requires (#2973)
2022-08-15Add IL Verification to tests (#2960)Jackson Schuster
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.
2022-08-15Add MakeGenericMethod tests for static interface methods (#2962)Jackson Schuster
2022-08-13Fix exception when generating warning for method definition (#2972)Vitek Karas
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.
2022-08-12Dataflow support for ref fields (#2947)Jackson Schuster
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.
2022-08-12Fix il corruption (#2966)Sven Boemer
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>
2022-08-12Added IL2121 to error-codes.md (#2964)Jeremi Kurdek
2022-08-12Revert analyzer to lower CodeAnalysis version (#2968)Jackson Schuster
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.
2022-08-11Process static interface methods as virtual methods (#2926)Jackson Schuster
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.
2022-08-10Fix missing parenthesis (#2956)Sven Boemer
2022-08-10Pin compiler version to fix build (#2958)Sven Boemer
fe3a96424d28fb5b1eee4ca8c7e1713aa37247a4 and d9aebf322b9dd6dcea16576d886bffbbe15e902f together broke the build because we are referencing a version of the compiler package greater than that used to compile the project. This uses the same version for both.
2022-08-09Test that basic ref field operations don't crash linker (#2952)Jackson Schuster
Adds test to use ref fields in various ways to confirm that they don't cause the linker to crash.
2022-08-09Build with preview5 SDK (#2954)Sven Boemer
dede5f58dc9b7296de884ed62688b35d5b154b78 didn't fix the dependency flow, because the packages for some reason are still being produced with a preview7 in the runtimeconfig. Lacking better workarounds, this change builds with the preview5 SDK that was selected in #2884 before we decided to update to preview7 (due to a dotnet-format bug). This disables the lint job to prevent those failures. We should turn it back on once we can use preview7 (once dotnet/runtime and dotnet/sdk are on preview7).
2022-08-09Update dependencies from https://github.com/dotnet/runtime build 20220807.4 ↵dotnet-maestro[bot]
(#2951) [main] Update dependencies from dotnet/runtime
2022-08-09Fixed IL2121 single warn issue (#2953)Jeremi Kurdek
2022-08-08Aot to linker sync (#2944)Vitek Karas
Sync tweaks necessary for the linker/AOT integration
2022-08-08[analyzer tool] Avoid exceptions when loading dependencies (#2949)Vitek Karas
The existing code used exceptions as a way to determine if item is part of a dictionary. That is pretty expensive and slows down loading of the dependencies quite a bit (we do it A LOT). Rewrite the code to avoid exceptions in this case.
2022-08-06Use preview 5 framework version in runtimeconfig (#2948)Sven Boemer
2022-08-05Include all warnings under suppression setting (#2930)Sven Boemer
SuppressTrimAnalysisWarnings now includes all warning codes produced by the linker or trim analyzer. Previously, only warnings in the "Trim analysis" category (see MessageSubCategory.cs) were suppressed by this setting. This makes the logic more future-proof so we don't need to keep adding new warning codes to the list. This does change the behavior a bit. It includes warnings that weren't previously part of the list. Additionally, previously if you set: <EnableTrimAnalyzer>true</EnableTrimAnalyzer> <SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings> you wouldn't see trim analysis warnings from the analyzer. With this change, you will. Similarly, previously if you set <ILLinkWarningLevel>5</ILLinkWarningLevel> <SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings> you wouldn't see trim analysis warnings, but after this change you will.
2022-08-04Update MSBuild version to fix official build (#2945)Sven Boemer