-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Work around dotnet/msbuild#3274 #39146
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
Work around dotnet/msbuild#3274 #39146
Conversation
- #38547 - handle a ApiDescription.Client code generator that uses `%(OutputPath)` as a directory - see also <https://stackoverflow.com/questions/48868060/can-a-task-itemgroup-glob-files> - add tests for Microsoft.Extensions.ApiDescription.Client.targets - make `TemporaryCSharpProject` slightly extensible - allow project additions to `TemporaryDirectory` after `Create()` nits: - add comment about batching w/ a code generator that uses `%(OutputPath)` as a directory - fix `%(SourceDocument)` metadata - primarily for back-tracing in detailed / binary logs - remove useless `%(OutputPathExtension)` metadata; use `%(Extension)` - remove useless `ConsoleClient` test asset project
|
@dotnet/aspnet-build mainly including you to double-check my |
|
|
||
| <Target Name="_InnerGenerateOpenApiCode" DependsOnTargets="_GetCurrentOpenApiReference;$(GeneratorTarget)" /> | ||
|
|
||
| <!-- Note target will **always** execute when generator uses the OutputPath as a directory. --> |
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.
Noticed while testing other changes. After an email conversation w/ msbuild team, I doubt this will change because directory timestamps aren't updated when files in them are added or changed but docs might be improved.
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.
/fyi @darrelmiller
| <_Metadata>$(_Metadata) Options: '%(CurrentOpenApiReference.Options)'</_Metadata> | ||
| <_Metadata>$(_Metadata) OutputPath: '%(CurrentOpenApiReference.OutputPath)'</_Metadata> | ||
| <_Message>@(_Metadata, ' ')</_Message> | ||
| <_Lines>@(_HeaderMetadata -> '// %(Identity)', '%0A') |
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.
Generated C# files contain just enough content to compile.
| return WithCSharpProject(project); | ||
| } | ||
|
|
||
| public TemporaryCSharpProject WithCSharpProject(string name, out TemporaryCSharpProject project, string sdk = "Microsoft.NET.Sdk") |
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.
This overload was fairly silly and completely unused
- e.g. on macOS /var/folders resolves to /private/var/folders
...xtensions.ApiDescription.Client/src/build/Microsoft.Extensions.ApiDescription.Client.targets
Show resolved
Hide resolved
|
/backport to release/6.0 |
|
Started backporting to release/6.0: https://github.com/dotnet/aspnetcore/actions/runs/1635791981 |
|
@dougbu backporting to release/6.0 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Work around dotnet/msbuild#3274 - #38547 - handle a ApiDescription.Client code generator that uses `%(OutputPath)` as a directory - see also <https://stackoverflow.com/questions/48868060/can-a-task-itemgroup-glob-files> - add tests for Microsoft.Extensions.ApiDescription.Client.targets - make `TemporaryCSharpProject` slightly extensible - allow project additions to `TemporaryDirectory` after `Create()`
Using index info to reconstruct a base tree...
M src/Tools/Extensions.ApiDescription.Client/test/TestProjects/ConsoleClient/Program.cs
M src/Tools/Shared/TestHelpers/TemporaryCSharpProject.cs
M src/Tools/Shared/TestHelpers/TemporaryDirectory.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Tools/Shared/TestHelpers/TemporaryDirectory.cs
CONFLICT (content): Merge conflict in src/Tools/Shared/TestHelpers/TemporaryDirectory.cs
Auto-merging src/Tools/Shared/TestHelpers/TemporaryCSharpProject.cs
CONFLICT (content): Merge conflict in src/Tools/Shared/TestHelpers/TemporaryCSharpProject.cs
CONFLICT (modify/delete): src/Tools/Extensions.ApiDescription.Client/test/TestProjects/ConsoleClient/Program.cs deleted in Work around dotnet/msbuild#3274 - #38547 - handle a ApiDescription.Client code generator that uses `%(OutputPath)` as a directory - see also <https://stackoverflow.com/questions/48868060/can-a-task-itemgroup-glob-files> - add tests for Microsoft.Extensions.ApiDescription.Client.targets - make `TemporaryCSharpProject` slightly extensible - allow project additions to `TemporaryDirectory` after `Create()` and modified in HEAD. Version HEAD of src/Tools/Extensions.ApiDescription.Client/test/TestProjects/ConsoleClient/Program.cs left in tree.
Removing src/Tools/Extensions.ApiDescription.Client/test/TestProjects/ConsoleClient/ConsoleClient.csproj
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Work around dotnet/msbuild#3274 - #38547 - handle a ApiDescription.Client code generator that uses `%(OutputPath)` as a directory - see also <https://stackoverflow.com/questions/48868060/can-a-task-itemgroup-glob-files> - add tests for Microsoft.Extensions.ApiDescription.Client.targets - make `TemporaryCSharpProject` slightly extensible - allow project additions to `TemporaryDirectory` after `Create()`
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
%(OutputPath)as a directoryTemporaryCSharpProjectslightly extensibleTemporaryDirectoryafterCreate()nits:
%(OutputPath)as a directory%(SourceDocument)metadata%(OutputPathExtension)metadata; use%(Extension)ConsoleClienttest asset project