-
-
Notifications
You must be signed in to change notification settings - Fork 764
GH4520: add slnx support to SolutionParser #4666
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
GH4520: add slnx support to SolutionParser #4666
Conversation
|
@microsoft-github-policy-service agree |
|
Seems like the pipelines are failing however. Is that something I have to worry about? |
Yes, this is absolutely something that we need to worry about 😄 Looks like your changes are failing one of the StyleCop rules that we have in place. It could be that some newer syntax that you are using is causing a rule to be tripped. |
|
Ahh, I guess the |
75d5791 to
4c2e0d1
Compare
|
@wgnf, you can run it through this test suite https://github.com/microsoft/vs-solutionpersistence/tree/main/test/Microsoft.VisualStudio.SolutionPersistence.Tests/SlnAssets to iron out corner cases. i.e. As someone who added slnx support in |
|
Maybe the full-fledged support using the third-party library you mentioned, supporting all the edge-cases there might be, is something that can be done in a separate AddIn, as already mentioned in the Issue. I guess, but I might be alone on this, simple |
|
The current pipeline error is the following: Seems like some race-condition, but not something caused by my changes, to me? |
Yes, likely a file in use; I've seen the .NET 10 SDK holding on to files a bit more at times. |
I'm not sure what you meant by "all the edge cases". Did you find concrete results from that test suite like x/N cases are not handled such that those x case are unlikely to happen in reality and hence considered "edge cases"? |
|
No, I have not used that suite yet. |
They're likely be edge cases, but add a couple integration tests here Test solutions are added and copied from here And we then we can always add more tests if a new edge case or actual issue should arise. |
|
Something not in Slnx.xsd schema is considered edge case? or what is the definition of edge case here? We should at least gather the data what is not going to be supported and write it down in unit test in terms of: what is the expected behavior of cake when such content is provided that is understood by msbuild/vscode but rejected by cake. |
To be clear, with edge cases, we mean things not needed, known or tested at this point. We've not reviewed PR yet, but if it handles similar scenarios as existing sln parser, it'll likely be a good starting point. To fully handle everything string possible in format today or in the future is out of scope. For that we recommend creating an addin with official parser(or just reference it). 100% spec compliance is out of scope, if other common needs come up we can add more test scenarios and sort those. |
|
I just added two simple integration tests for
And this is something I don't feel comfortable changing. Or am I missing something that I could to, to be able to set up an integration-test considering these restrictions? |
|
@wgnf you can add completely new tests that you see appropriate, important part is we test the alias works as expected with real files and cake script context. |
|
Yeah, I've already gone ahead and added two integration tests |
devlead
left a comment
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.
Quick initial look, and this looks good to me, some minor comments. Will take a deeper look as soon as I can.
|
Thanks for the fast feedback! I think I'll be able to adress the requests later this week or on the weekend. |
Excellent, let us know if any questions arise. |
a23be00 to
51e604e
Compare
|
I integrated the requested changes. The Azure Pipeline has problems with a hanging process again however :/ |
51e604e to
d19be3a
Compare
devlead
left a comment
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.
LGMT 👍
|
@wgnf your changes have been merged, thanks for your contribution 👍 |
Closes #4520
As discussed in the above-mentioned issue I have added support for
.slnxSolution files without any third-party library.I have added the exact same tests as for the
.slnfiles, usingdotnet sln migrateto migrate the used.slnfiles to.slnxand keeping the assertions. That way, I could make sure that there aren't any regressions.There are few things to point out:
.slnxformat does not provide any IDs anymore, as cross-references between things in the Solution are not necessary anymore. TheSolutionProjectstill has a mandatory ID however (and I didnt't want to make breaking changes to that). So I just submittedstring.Emptyto the ID.slnand.slnxfiles support nested folders. In.slnxfiles these are modeled using the name of a solution-folder (i.e.Rootis the root folder, andRoot/Subis the folder "Sub" underneath thatRoot-Folder). To not make things too complicated for now, I did not adhere to that consideration just yet (for the above-mentioned example, the "Root"SolutionFolderwould not have an instance of the "Sub"SolutionFolder). If that is something that you want to see, I can make sure to respect that.slnxfiles are now also supportedIf something is unclear here in the PR or in the code, please feel free to reach out :)