You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[http-client-csharp] the post processor should always keep customized code as root documents (#5481)
Fixes#5441
Previously in our generator, we have two instances of
`GeneratedCodeWorkspace`: one for the project that is being generated
right now (the generated code project), one for the existing part of the
generated library (the customized code project).
This leads to an issue that in the post processor, only the generated
documents are passed into the post processor, therefore the post
processor actually does not know about the existence of the customized
files.
This is not very correct because the generated files must need those
customized files to work properly therefore they should be in the same
project.
This PR refactors this part to change the structure of
`GeneratedCodeWorkspace`: now we only create one instance of
`GeneratedCodeWorkspace`, and the project inside it will be initialized
with shared files and all the customized files in it.
In this way, when we get to the post processor, it should be able to
access all the necessary documents.
---------
Co-authored-by: Wei Hu <[email protected]>
Copy file name to clipboardexpand all lines: packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/PostProcessing/GeneratedCodeWorkspace.cs
+8-34
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,6 @@ internal class GeneratedCodeWorkspace
0 commit comments