Annotate Extensions.Options to make it linker friendly - #40294
Merged
Conversation
Collaborator
|
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
|
Tagging subscribers to this area: @maryamariyan |
davidfowl
reviewed
Aug 4, 2020
Member
Author
|
Failure is #40115. |
eerhardt
force-pushed
the
AnnotateOptions
branch
from
August 4, 2020 14:09
346c906 to
565a993
Compare
maryamariyan
approved these changes
Aug 4, 2020
Contributor
There was a problem hiding this comment.
I think CI also shows apicompat error for linker tests
e.g.:
.packages/microsoft.dotnet.apicompat/5.0.0-beta.20381.6/build/Microsoft.DotNet.ApiCompat.targets(82,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build) TypesMustExist : Type 'Microsoft.Extensions.DependencyInjection.DefaultServiceProviderFactory' does not exist in the implementation but it does exist in the contract. [/Users/runner/work/1/s/src/libraries/Microsoft.Extensions.DependencyInjection/src/Microsoft.Extensions.DependencyInjection.csproj]
Member
Author
re-running. I don't think my change caused these errors. |
Jacksondr5
pushed a commit
to Jacksondr5/runtime
that referenced
this pull request
Aug 10, 2020
* Annotate Extensions.Options to make it linker friendly Fix dotnet#40236
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
I choose to annotate the following interfaces and their implementations:
I didn't annotate
AddOptions<TOptions>,OptionsBuilder<TOptions>,Configure,PostConfigure, orValidatebecause these operations don't actually create an Options class - they just consume one. It is only once someone tries getting an Options from the ServiceProvider when the class actually gets instantiated. And they way they get the Options is through one of the above annotated interfaces.Fix #40236