Skip to content

Conversation

@robinsedlaczek
Copy link
Contributor

I've implemented the SyntaxFactory methods suggested in #218. Additionally, I added factory methods for the example and permission xml elements for documentation comments. And there are some tests for the new factory methods.

@davkean davkean added the Community The pull request was submitted by a contributor who is not a Microsoft employee. label Nov 18, 2015
@davkean
Copy link
Member

davkean commented Nov 19, 2015

tag @dotnet/roslyn-compiler @mattwar

@davkean
Copy link
Member

davkean commented Nov 20, 2015

test eta please

@robinsedlaczek
Copy link
Contributor Author

Can I help testing eta or is it internal?

@agocke
Copy link
Member

agocke commented Nov 20, 2015

@robinsedlaczek Sorry, that's a command to our internal bot :) @davkean is asking for the automated internal test run to kick in.

@robinsedlaczek
Copy link
Contributor Author

Got it! Was my hope. :) Many thx!

@davkean
Copy link
Member

davkean commented Nov 20, 2015

Sorry, just realized that could be misinterpreted. I'll prefix @dotnet-bot with it from now on. :)

@robinsedlaczek
Copy link
Contributor Author

Cool, you're welcome. May I ask, what eta means? Just for my understanding.

@davkean
Copy link
Member

davkean commented Nov 20, 2015

"Editor Test App". It's a cheap way to run our editor tests without requiring Visual Studio.

@robinsedlaczek
Copy link
Contributor Author

@davkean Thx! So hopefully you accept the PR.

@davkean
Copy link
Member

davkean commented Nov 20, 2015

Yep, the @dotnet/roslyn-compiler team will look over it when they have a chance.

@davkean
Copy link
Member

davkean commented Dec 4, 2015

Can someone from the @dotnet/roslyn-compiler team look at this?

@Pilchie
Copy link
Member

Pilchie commented Dec 4, 2015

Also tagging @AnthonyDGreen and @mattwar

@TyOverby
Copy link
Contributor

TyOverby commented Dec 4, 2015

Looks good to me; This does make a lot of additions to the public API though, so I think it'll require API review.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be using elastic trivia when creating nodes, so the formatter will correctly format them later. This is usually automatically specified when calling overloads that do not specify trivia. It looks like the SyntaxFactory does not have an overload that adds the elastic trivia. You could add that too. Look at the implementation of the Literal factory method for an example.

@mattwar
Copy link
Contributor

mattwar commented Dec 4, 2015

There is no corresponding change to the VB syntax factory. It has XML doc comment too. However, it also has XML nodes. So its likely the naming used for some of these factory methods will become ambiguous if not somehow changed to imply documentation comments and not any XML.

@davkean
Copy link
Member

davkean commented Dec 4, 2015

@mattwar Do you have some recommendations?

@davkean
Copy link
Member

davkean commented Dec 4, 2015

On names that is.

@robinsedlaczek
Copy link
Contributor Author

@mattwar @davkean Ok, I'll have a look at the elastic trivia and the implementation for VB.

@Pilchie
Copy link
Member

Pilchie commented Dec 7, 2015

Also tagging @DustinCampbell

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of the string literals used here should use the constants from DocumentationCommentXmlNames.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, thanks for the hint!

…eating xml documentation comments. Use elastic trivias when creating syntax token (in C# and VB SyntaxFactory). Use xml names from DocumentationCommentXmlNames class.
@robinsedlaczek
Copy link
Contributor Author

Hi together! A happy new year to all of you. So here is my solution for the new line problem stated by @AnthonyDGreen and @mattwar.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattwar @AnthonyDGreen Now, this code concerns me a bit. The XmlMultiLineElement factory method is the first method that generates multiline code (as far as I can see). And I need to use this method within the higher level factory methods like XmlSummaryElement. So I have to give some kind of new line text as parameter value to the XmlNewLine factory method. So I decided to use "\r\n". Alternatively, we have to pass a text parameter for the new line text to the XmlSummaryElement factory method as well. What would you suggest to handle this situation?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why this API needs to inject the new lines.. Shouldn't that be supplied as part of the content?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it should and now it is.

@robinsedlaczek
Copy link
Contributor Author

Following the log it seems that something is wrong with the build machines. Build processes for other PRs seems to run into same or similar problems in the last minutes. Compilation and unit tests were successful here locally. Can I help somehow?

@VSadov
Copy link
Member

VSadov commented Jan 7, 2016

there was some problem with build machines. As i understand it should be fixed now.

@robinsedlaczek
Copy link
Contributor Author

@VSadov Ok, thanks for the info! How are builds triggered again in such cases?

@robinsedlaczek
Copy link
Contributor Author

Problems with the build machine. Mac run out of disk space. On Linux csc exited with code 134.

@robinsedlaczek
Copy link
Contributor Author

@dotnet-bot test this please

@robinsedlaczek
Copy link
Contributor Author

Any news regarding the health of the build machines?

@robinsedlaczek
Copy link
Contributor Author

@dotnet-bot test prtest/mac/dbg/unit32 please

@TyOverby
Copy link
Contributor

TyOverby commented Jan 8, 2016

@robinsedlaczek It looks like we are actually having trouble with the linux and mac tests

A bug has been filed here #7854

@TyOverby
Copy link
Contributor

You changed the file mode of build/scripts/tests.sh from 100755 to 100644 which is making it not executable.

This is why the tests are failing. Please fix this and it'll kick off the tests again.

@robinsedlaczek
Copy link
Contributor Author

@dotnet-bot test prtest/mac/dbg/unit32 please
@dotnet-bot test prtest/lin/dbg/unit32 please

@robinsedlaczek
Copy link
Contributor Author

Finally we got it.

@TyOverby Many thanks for your help!

Hopefully, the PR can and will be accepted now. :)

@davkean
Copy link
Member

davkean commented Jan 14, 2016

Can more person to sign off from @dotnet/roslyn-ide @dotnet/roslyn-compiler, please?

@DustinCampbell
Copy link
Member

👍 from me

@davkean
Copy link
Member

davkean commented Jan 14, 2016

Thanks for the contribution!

davkean added a commit that referenced this pull request Jan 14, 2016
Improved SyntaxFactory for documentation comments (Issue #218)
@davkean davkean merged commit 911b63b into dotnet:master Jan 14, 2016
@mattwar
Copy link
Contributor

mattwar commented Jan 14, 2016

Okay, now where's the party?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the plan for resolving this TODO? @jaredpar? I think the ban against LINQ is using IEnumerable operators. System.Xml.Linq is really not the concern by that rule.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the ban is about not using LINQ queries in hot paths like parser and binder, because of the allocations. But they get used a lot in IDE layers.

@TyOverby
Copy link
Contributor

🎉

@robinsedlaczek
Copy link
Contributor Author

Many thanks for all the support and for accepting the PR! Now, here is the party! ✨ 🎆 🎉 ✨ 🎉 🎆 ✨ 🎉

github-actions bot pushed a commit that referenced this pull request Apr 1, 2025
Avoid reporting CA1823 for inline arrays
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Compilers cla-already-signed Community The pull request was submitted by a contributor who is not a Microsoft employee.

Projects

None yet

Development

Successfully merging this pull request may close these issues.