-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Provide a compiler level API to list used (or the opposite unused) references per compilation #37768
Comments
5 tasks
This is not possible (too complex for the bar) in 16.3. |
This is a significant work item for the compiler team: both in design and implementation. It's not going to meet our bar for 16.3 and almost certainly won't meet the bar for 16.4 either. |
The following aspects should be taken into consideration:
|
AlekseyTs
added a commit
to AlekseyTs/roslyn
that referenced
this issue
Nov 13, 2019
Detect used assembly references from: - explicit references to types in source; - explicit references to namespaces in source; - explicit references to fields in source; - explicit method invocations in source; Usings flagged by the compiler as unused shouldn’t contribute to the set of used references.
AlekseyTs
added a commit
that referenced
this issue
Nov 19, 2019
This is a beginning of work on #37768. Detect used assembly references from: - explicit references to types in source; - explicit references to namespaces in source; - explicit references to fields in source; - explicit method invocations in source; Usings flagged by the compiler as unused shouldn’t contribute to the set of used references.
AlekseyTs
added a commit
to AlekseyTs/roslyn
that referenced
this issue
Nov 25, 2019
AlekseyTs
added a commit
that referenced
this issue
Nov 28, 2019
AlekseyTs
added a commit
to AlekseyTs/roslyn
that referenced
this issue
Dec 4, 2019
- Merged extern aliases - Embeddable attributes - Usage of canonical definitions for NoPia embedded types - nameof of a method - Deconstruction - Collection initializers Related to dotnet#37768.
AlekseyTs
added a commit
to AlekseyTs/roslyn
that referenced
this issue
Dec 20, 2019
- Merged extern aliases - Embeddable attributes - Usage of canonical definitions for NoPia embedded types - nameof of a method - Deconstruction - Collection initializers Related to dotnet#37768.
AlekseyTs
added a commit
that referenced
this issue
Dec 31, 2019
…blies (#40560) The basic idea is that dependencies should be tracked along with use-site diagnostics and should be collected together with regular diagnostic messages and bubble up to the top. The final consumer of the combined diagnostics and dependencies is responsible for “registering” dependencies with the compilation or ignore them (due to the context, etc.). I believe this is a very robust approach and would require little maintenance going forward, because every time a symbol is used, a use-site diagnostics should be reported. We just need to keep doing that for every new feature and dependencies will be tracked automatically. Also, the code performing binding no longer needs to be context aware (should dependencies be tracked at this moment or not), they should always be tracked and collected along with the regular diagnostics and it is up to the consumer to decide what to do with them, if anything. For example, when SemanticModel performs binding, dependencies are not registered, etc. Record used assembly references for more scenarios. - Merged extern aliases - Embeddable attributes - Usage of canonical definitions for NoPia embedded types - nameof of a method - Deconstruction - Collection initializers Related to #37768.
@AlekseyTs Can we close this? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Required for #6763
The text was updated successfully, but these errors were encountered: