-
Notifications
You must be signed in to change notification settings - Fork 4k
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
XML Documents for Positional Records #52663
Comments
@jcouv Can you take a look? |
@danstur Reading through the issue, there are couple of points:
|
@Youssef1313 Thanks for the explanation. So basically the linked issue was more of an internal plumbing point that requires additional work to make these improvements available. Not listing the documentation for the properties in the xml doc is a pity, because it means all projects using those files (e.g. Swashbuckle) will have to be adapted to handle records explicitly - and I think this might not even be completely possible without also having access to the source/binaries. Is it worth creating an issue about this or is this unlikely to be changed for some reason? And if this could be changed, would a pull request be accepted? |
As far as I understand, this is how doc comments for records was decided to work. The |
Yes I understand that this is working as intended currently. I'm wondering if there would be a chance that this behavior might be changed in the future for the reasons listed and if so if external pull requests would be accepted. In any case thanks for #52737 , it's always great to get such quick feedback and improvement when reporting things to a project 👍 |
Since I'm not working for Microsoft, I have no idea if this would be acceptable to the team. |
We'd intentionally taken a minimalistic approach for first pass (#44571 (comment)), so the feedback is important. My understanding of the proposal: extract contents of I understand how that would be convenient, but what makes me hesitate:
I would hold off on a PR until we can agree on desired design. Tagging @sharwell @AlekseyTs @RikkiGibson @BillWagner @jaredpar for thoughts |
I do think we need some sort of story here at the compiler-only layer. People need to doc these things, and they need those docs to appear in tools beyond the IDE. That said, we can also likely just do a spot fix on the ide side so these show up. |
Oh yes I was more thinking about whether creating a proposal would be worthwhile, not jumping head first into the implementation. I could summarize the use cases of our internal tools as well as for things like Swashbuckle ASP.NET Core if some more detailed practical examples would be helpful. Otherwise I'll just wait and see what the experts in the field have to say. (There's also an argument to be made that records are not necessarily the right choice for external API layers and that the workaround to explicitly specify properties might be acceptable anyhow since it also offers more flexibility and options. |
* docs: fix XML doc warning * refactor(entity): avoid use primary constractor dotnet/roslyn#52663
This issue is really preventing us from using records sometimes. I mean, we have to be able to document our properties somehow... |
From design discussion on 9/14/2021, we'll have the |
Following... |
Let's make sure we prioritize this in 17.1. |
I Expect that the xml comment will be added in the xml file for both params and properties. Is this correct? |
@VBAndCs In the currently shipped compiler, this doesn't happen, unfortunately. We intend to change this soon per #52663 (comment). I see the number of thumbs up on the issue and I can see that this is a significant inconvenience for people, so I am going to make every effort to get this done soon. |
This should ship in 17.2. |
Any idea when 17.2 will ship? As this fix went in beginning of Feb but it is now nearly end of March... |
It's currently available in public preview. It will probably be a few more months before it releases as a stable version. |
@RikkiGibson Can you also say of what |
That would be 6.0.300. See https://docs.microsoft.com/en-us/dotnet/core/porting/versioning-sdk-msbuild-vs. |
According to #44571 it should be possible with Visual Studio 16.9 to specify xml documents for auto generated properties based on the primary constructor.
When using VS 16.9.3 I can't seem to get this to work. Am I not using the correct syntax or is there still a problem?
Using the following definitions:
I get the following results:
The generated documentation file also does not include the information:
PS: I originally wrote this as a comment, but since the other issue is already closed and I didn't get any feedback in the last five days, I thought it might be more sensible to create a new issue to track this.
The text was updated successfully, but these errors were encountered: