-
Notifications
You must be signed in to change notification settings - Fork 127
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
Enable processing of dynamically referenced assemblies #1611
Closed
Conversation
This file contains 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
This introduces the ability to add assemblies to LinkContext lazily and have them processed in MarkStep. For now, the only additional processing is to load references and run the TypeMap logic. Later, embedded XML processing and constant propagation will also happen for lazy assemblies. This is Phase 1 outlined in dotnet#1164 (comment). Fixes dotnet#943 Fixes dotnet#1079
- Use Resolve for debugger attributes and CreateInstance - Don't process references for types that come from already-processed assemblies - Don't throw when resolving dynamic references to assemblies - Don't allow specifying assembly with assembly-qualified type name
And update some tests
mateoatr
reviewed
Nov 6, 2020
mateoatr
reviewed
Nov 6, 2020
marek-safar
requested changes
Nov 6, 2020
@@ -7,6 +7,9 @@ namespace Mono.Linker.Tests.Cases.Attributes | |||
{ | |||
[Reference ("System.dll")] | |||
[SetupLinkerCoreAction ("link")] | |||
// IComponent has TypeConverterAttribute referencing System.dll, which has | |||
// unresolved references to Win32 assemblies. | |||
[SetupLinkerArgument ("--skip-unresolved", "true")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this. Is ths PR is making the situation worse instead of better?
And fix up some existing tests
This could lead to some extra processing, but it guarantees that references resolved in SweepStep will be registered with the context. Also make TryParseTypeName return a bool.
Closing in favor of #1666 |
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.
This introduces the ability to add assemblies to LinkContext lazily and have them
processed in MarkStep. For now, the only additional processing is to
load references and run the TypeMap logic. Later, embedded XML processing and
constant propagation will also happen for lazy assemblies.
This is Phase 1 outlined in #1164 (comment).
Fixes #943
Fixes #1079
This still needs a bit of work to handle a case where a dynamic assembly is resolved but not marked (for example when using
GetType
for an assembly-qualified type where the assembly exists, but the type doesn't). In this case, SweepStep can make some false assumptions.