Consolidate csproj writing#4027
Merged
ArcturusZhang merged 27 commits intoAzure:feature/v3from Dec 24, 2023
Merged
Conversation
8ce3588 to
0e9550e
Compare
ArcturusZhang
commented
Dec 11, 2023
…t plane libraries, this is an issue
This comment was marked as outdated.
This comment was marked as outdated.
…has a test generated along with
ArcturusZhang
commented
Dec 12, 2023
ArcturusZhang
commented
Dec 12, 2023
ArcturusZhang
commented
Dec 12, 2023
…ause that changes on different machines
ArcturusZhang
commented
Dec 12, 2023
archerzz
approved these changes
Dec 12, 2023
ArthurMa1978
approved these changes
Dec 13, 2023
27992eb to
6293d02
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Reason of making this change
This change uncovers an issue of the sequence of reading and writing
csproj.The autorest pipeline might parallelize the plugins when they do not have dependencies to each other, in our case, it is
csharpgenandcsharpproj, they are running in parallel - and in this change, we read csproj incsharpgen, and writecsprojincsharpprojwhich might lead to read file exception because the file is locked to be edited.We once introduced a partial solution in this issue when we first find the issue with the same root cause, by introducing a
CSProjConfigurationclass to hold those configurations that are needed when writing csproj file.Since these configuration should never have a different value from the one when writing source code, and we will never have a concurrent issue when we put them into the same plugin, this class (and its corresponding test cases) is not need therefore removed in this PR.
Changes included in this PR
csharpprojplugin (and all the other types and test cases related to it), and move the functionality of this plugin (writes a csproj file) tocsharpgenplugin.XmlWriterinstead to make it to have semantics.NewProjectScaffoldingclass) because we previously have multiple classes doing the same thing.Follow ups needed to be done after this PR: #4037
Checklist
To ensure a quick review and merge, please ensure:
Ready to Land?