-
Notifications
You must be signed in to change notification settings - Fork 128
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
Support feature settings on descriptor files #1277
Conversation
bc8dff0
to
7b81c4a
Compare
7b81c4a
to
ae977ed
Compare
test/Mono.Linker.Tests.Cases/FeatureSettings/Dependencies/ResourceFile.txt
Show resolved
Hide resolved
@tlakollo Could you please double check that we don't "return" from the attribute XML parser in places where we should "continue" instead? Also would be nice to add a test to validate at least one of those cases. |
Since they conflict with the --exclude-feature "feature" attributes in the descriptor XML.
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.
Few minor things, otherwise LGTM
This reverts commit 78c2f52.
To indicate that a substitution or descriptor should be applied in the absence of a feature setting. Note that this is restricted to still require the featurevalue attribute, to prevent the definition of default substitutions that are never applied for any feature settings. Also address PR feedback: - Move the feature checks into a separate class - #ifdef an implementation instead of callsites
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.
What happens in the case where a Substitutions.xml file doesn't specify a featuredefault
, but a Descriptors.xml does for the same feature switch?
Nothing interesting 😉 . Each element in the XML is independent. So if you want to have the same behavior between substitutions and descriptors, you'll need to specify the same thing twice. |
Sorry, I missed this question - thanks for answering it @vitek-karas |
Add comments about order of checking assemblyname and feature attributes, and make processing consistent in LinkAttributesStep.
* Support feature settings on descriptor files Fixes dotnet/linker#1268. * Disable feature descriptors for mono Since they conflict with the --exclude-feature "feature" attributes in the descriptor XML. * Revert "Disable feature descriptors for mono" This reverts commit dotnet/linker@78c2f52. * Support featuredefault="true" To indicate that a substitution or descriptor should be applied in the absence of a feature setting. Note that this is restricted to still require the featurevalue attribute, to prevent the definition of default substitutions that are never applied for any feature settings. Also address PR feedback: - Move the feature checks into a separate class - #ifdef an implementation instead of callsites * Fix signatures in tests * Update data format docs * Fix whitespace * PR feedback Add comments about order of checking assemblyname and feature attributes, and make processing consistent in LinkAttributesStep. * Clarify featuredefault behavior in documentation Commit migrated from dotnet/linker@f87cfa2
Fixes #1268.