-
Notifications
You must be signed in to change notification settings - Fork 692
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
Fix output path issues with customized builds #3270
Conversation
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.
Thank you so much for your contribution. We need some tests for this change.
src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.targets
Outdated
Show resolved
Hide resolved
src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.targets
Outdated
Show resolved
Hide resolved
src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.targets
Outdated
Show resolved
Hide resolved
src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.targets
Outdated
Show resolved
Hide resolved
src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.targets
Outdated
Show resolved
Hide resolved
src/NuGet.Core/NuGet.Build.Tasks.Pack/NuGet.Build.Tasks.Pack.targets
Outdated
Show resolved
Hide resolved
I have been going through the tests. Why are all tests written with project directory as the Is it okay if I left them as it is? The reason all the tests pass because all of them overrides the output paths from the command line invocation. So, No matter what we set they'll all pass. But when I rewrote the logic for invoking Pack cmd using the defaults, they all failed since they were hard coded for the above mentioned logic. Do I fix all of the tests or add a default path test separately while keeping the others working? |
I don't think there's a super special reason for this. It's all at the mercy of the person writing the tests. I'd don't change the tests, they are a good test that the packageoutputpath behavior is preserved. |
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.
There are lots of formatting changes in the targets file.
The way I see it, I don't tihnk this change set needs to be bigger than 10 lines.
Can you please fix the formatting changes without a functional impact.
Thanks!
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.
Hey @Nirmal4G,
We really appreciate all the effort you have put into this PR, especially your analysis which has been extremely detailed and spans more than just NuGet.
One of the things that would really help us expedite code reviews and the validation process is keeping PRs small and focused on solving one problem at the time. Therefore, we’d prefer it if you could move changes unrelated to the pack code in question to separate PRs as appropriate:
o Test code refactoring
o Build script improvements.
Doing this will also ensure that we can identify and revert potential regressions quickly without pulling out all the improvements that you have been kindly working on.
Again, on behalf of the @NuGet/nuget-client team thank you for your contributions, and we are looking forward to working with you on many more.
...uGet.Core/NuGet.Commands/RestoreCommand/RequestFactory/DependencyGraphSpecRequestProvider.cs
Outdated
Show resolved
Hide resolved
src/NuGet.Core/NuGet.Commands/RestoreCommand/Utility/NoOpRestoreUtilities.cs
Outdated
Show resolved
Hide resolved
test/NuGet.Core.FuncTests/Dotnet.Integration.Test/DotnetToolTests.cs
Outdated
Show resolved
Hide resolved
test/NuGet.Core.FuncTests/Dotnet.Integration.Test/MsbuildIntegrationTestFixture.cs
Outdated
Show resolved
Hide resolved
4f8f76e
to
054ccbc
Compare
This fixes a host of path related issues when doing a customized build with Pack targets. It also obsoletes the 'PackageOutputPath' in the SDK's 'DefaultOutputPaths' targets. It also ensures non-sdk style projects doesn't have to specify some default paths.
The Default is now implied and points to the same directory. It is now redundant, and by removing it, the tests should not fail.
- Checks the default output paths from Project/Solution builds. - Check both the default and custom paths from continuous Project/Solution builds.
The duplicate logic is not needed. (edited anyway but will push if anyone approves)
I have simplified this PR to only contain the |
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.
Thanks @Nirmal4G
@nkolev92 All green, good to go! |
@dominoFire your review is blocking the PR, can you please take a look. You can dismiss it if you'd rather not re-review. |
This PR Fixes NuGet/Home#9234
PackageOutputPath
in the SDK'sDefaultOutputPaths
targets.Requires dotnet/msbuild#5238