-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Fix #8520 - Component parameters not found #8811
Conversation
Hmm looking at the ref assembly output, I'm not sure this will fix the problem. The setters aren't generated in ref assemblies. |
OK, this is inconvenient. It seems that Maybe the correct fix is for us to change our parameter detection logic so we don't care whether there's a setter or not. As long as something is a property annotated with The original reason for checking for the existence of Potential further improvement: We have an analyzer that currently errors if you make the setter public. We could change it so that it also errors if you have no setter at all, so nobody would get confused. This wouldn't affect the ref assemblies because we're not running the roslyn analyzer on those. |
ee1b82e
to
3002637
Compare
Or we would make the properties public set/get and add an analyzer to tell you not to set them. I've updated this PR to include the setters in the ref assembly. Given that our nightly builds are broken (and have been for weeks) I don't really want to deliberate on the right solution until its working again. I think that this is an awful workaround, and I've logged #8825 to follow up on this issue. |
src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.Manual.cs
Show resolved
Hide resolved
src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs
Outdated
Show resolved
Hide resolved
3002637
to
cef7577
Compare
LGTM |
src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.Manual.cs
Show resolved
Hide resolved
src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs
Outdated
Show resolved
Hide resolved
cef7577
to
d5d5ca4
Compare
d5d5ca4
to
9ddfed3
Compare
This resolves the issue blocking use of component parameters from our ref assemblies. Making properties public with private get is our recommended guidance for wanting documentation to work in the IDE. We also now need to manually generate the ref-assembly types for these so they will show up for tooling with setters. I've logged an issue to track whether we want to keep this long term, it seems like a suitable workaround for now.
9ddfed3
to
b83ef78
Compare
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.
Great!
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'd like to understand why the project's properties are insufficient and when GenAPI.exclusions.txt changes will be needed going forward. But, that shouldn't block this PR…
@aspnet/brt |
I'd be happy to chat about this in more detail in the office. Ultimately we don't want to maintain this long term, but we need a solution right now. |
This comment was made automatically. If there is a problem contact ryanbrandenburg. I've triaged the above build. |
This resolves the issue blocking use of component parameters from our
ref assemblies. Making properties public with private get is our
recommended guidance for wanting documentation to work in the IDE, and
it will be required when you ship ref assemblies - since ref assemblies
only contain public members.