-
Notifications
You must be signed in to change notification settings - Fork 128
[feature/damAnalyzer] Merge from main #2298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GitHub is removing support for unauthenticated git soon: https://github.blog/2021-09-01-improving-git-protocol-security-github/
* Nullable annotations part 1 Enable nullable annotations for LinkContext and the XML processing classes.
…otnet#2257) This reverts commit 3e5edda.
…0906.1 (dotnet#2262) [main] Update dependencies from dotnet/runtime
[main] Update dependencies from dotnet/arcade - Workaround crashing analyzer
* PR feedback * Remove unnecessary method
This uncovers a null ref in sweepstep. The test is order dependent: - Assembly (librarywithnonemtpy) has a virtual method which referes to type from second library (library). This processes the type reference. - The type is removed from library - The virtual method is re-processed again -> hits a type def which does not belong to any assembly/scope For this to happen the virtual method must be processed after the type has been removed. This also requires the method to be meant for removal later on (the body will be rewritten to throw), since otherwise the type would have been marked. This also requires the library with the removed type to be kept (so something else in it must be kept).
Basically a workaround for dotnet#2260. This simply goes back to using the `Resolve` method and avoid the cache for now.
…lyzer (dotnet#2254) * Add support in RUC analyzer for new() constraint on generics * Support `new()` constraint on types * Use SyntaxNodeAnalysisContext for constructor constraints * Lint * Update justification
* Add MakeGenericMethod and MakeGenericType to the special incompatible members of the RUC analyzer. * Don't produce diagnostics for MakeGenericMethod/MakeGenericType * Add comment * Lint
* Warn on usage of attributes with annotated ctors * PR feedback Add ProducedBy from Test Restructure Add support for SetupCompileBefore in the analyzer Run analyzer tests on all members (not only methods) Move tests to RequiresCapability * Enable analyzer tests for attributes which use RUC annotated properties * Lint * Rename CheckAttributeCtor Check for instantiations that set annotated properties * Apply suggestions from code review Co-authored-by: Andy Gocke <angocke@microsoft.com> * Update comment Rename Linker => Trimmer in ProducedBy * Fix applied suggestions * Lint Co-authored-by: Andy Gocke <angocke@microsoft.com>
Enable nullable on Annotations.cs Check for null after TryResolve using 'is' keyword in MarkStep()
…916.4 (dotnet#2283) [main] Update dependencies from dotnet/arcade
…0920.1 (dotnet#2284) [main] Update dependencies from dotnet/runtime
* Build testcases against reference assemblies * Reproduce issue in testcase * Add TypeReferenceMarker * Update one more testcase * Don't mark forwarders in TypeReferenceMarker Leave the logic as before and mark them from MarkStep. * PR feedback - Use ref assemblies for ReferenceAttribute - Avoid adding to common references unless needed by test dependencies
* Nullable annotations part 3 * Fix spelling
` GetDynamicallyAccessedMemberTypesFromBindingFlagsForXXX` would return `DynamicallyAccessedMembers.None` when the binding flags are null/unknown. This fix is a bit more targeted so that we can potentially take it to 6.0. In general, there's some duality in how BindingFlags are handled - there are places that call `BindingFlagsAreUnsupported` and avoid `GetDynamicallyAccessedMemberTypesFromBindingFlagsForXXX` for null that way. Others call into this API without checking whether the flags are supported first. I'm unclear whether it would be more appropriate to check for `BindingFlagsAreUnsupported` in the code I'm adding. It's a valid option as well.
* Share logic for discovering typereferences * PR feedback - Add non-nullable property over "visited" hashset - Hide construction/process pattern in static helpers
Make the walker a true use-once class.
…924.2 (dotnet#2294) [main] Update dependencies from dotnet/arcade
…0926.2 (dotnet#2295) [main] Update dependencies from dotnet/runtime
`IgnorableBindingFlags` are all new - we wouldn't consider them supported in the past. I'm also adding `BindingFlags.ExactBinding` in the first group - that one was considered unsupported in the past but this flag just disallows implicit widening and similar things that don't affect our binding logic (I don't think we would ever want to go in that territory).
* Improve analyzer test checker - When diagnostics are missing, display all missing diagnostics - Show candidate diagnostics that didn't match any expected ones - Adjust match criteria to match Roslyn strings - Clean up nullable annotations in test infra - Remove cctor warnings from analyzer to match linker - Remove redundant attribute property setter warnings - Fix location filtering for warnings that originate from types
mateoatr
approved these changes
Sep 29, 2021
agocke
pushed a commit
to dotnet/runtime
that referenced
this pull request
Nov 16, 2022
[feature/damAnalyzer] Merge from main Commit migrated from dotnet/linker@83c51d4
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Picking up recent test infra changes from main so we can use them in the DAM analyzer.
As part of the merge I moved
GetMissingMemberTypes
fromReflectionMethodBodyScanner.cs
into the sharedAnnotations.cs
and replaced the older logic inSourceHasRequiredAnnotations
.