Skip to content
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

Use a static verison of nuget.build.tasks.pack, use licenseexpression #2574

Merged
merged 1 commit into from
Jan 7, 2019

Conversation

nkolev92
Copy link
Member

@nkolev92 nkolev92 commented Dec 18, 2018

Bug

Fixes: First part of NuGet/Home#7629.
Regression: No
If Regression then when did it last work:
If Regression then how are we preventing it in future:

Fix

Details:
Use a repeatable version of the pack target, don't depend on the machine dotnet sdk for packing.
Use LicenseExpression instead of license url.

Testing/Validation

Tests Added: No
Reason for not adding tests:
Validation done: Verified with a script that the packages generated are the same.
I will add a tool that does some validation of the packages after the fact.

fyi @karann-msft @anangaur @rrelyea

@@ -31,6 +31,7 @@
<XunitConsoleExePath>$(SolutionPackagesFolder)xunit.runner.console.2.3.1\tools\net452\xunit.console.x86.exe</XunitConsoleExePath>
<ILMergeExePath>$(SolutionPackagesFolder)ILMerge.2.14.1208\tools\ILMerge.exe</ILMergeExePath>
<XunitXmlLoggerDirectory>$(SolutionPackagesFolder)XunitXml.TestLogger.2.0.0\build\_common</XunitXmlLoggerDirectory>
<NuGetBuildTasksPackTargets>$(SolutionPackagesFolder)NuGet.Build.Tasks.Pack.4.9.2\build\NuGet.Build.Tasks.Pack.targets</NuGetBuildTasksPackTargets>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why can't we just use the one from the current build?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kind of breaks the whole repeatability thing. And it only works with build.ps1, not necessarily if you want to pack individual projects.
It also will have file access issues when you are trying to pack the pack tasks package itself.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not able to follow the repeatability concerns here. What exactly it breaks? why shouldn't this always pack our projects with in-built pack target? It will also add an additional check if our pack target breaks something for normal cases...

Also, not able to see through other concerns, may be it'll be better to talk offline and get clarity.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see the posting on testing "real scenarios".
What are integration tests for then? The pack scenarios for our solution are basic.

Furthermore we are not ready to conform to the changes in the pack targets immediately.
Say for example we were doing this for 4.9.1.
We'd have to suppress the license url warning in all our projects, just to build our packages the way they used to be built.
If we say wanted to build with license expressions or license file we wouldn't have been able to push because the server would not be ready to handle the new feature yet.
It just adds needless complexity in my opinion.

If you run the pack target with the built assemblies, you'd be trying to copy the current running assembly in which you have all the pack logic. That wouldn't work.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed offline, we're good here.

@nkolev92 nkolev92 merged commit ea26726 into dev Jan 7, 2019
@nkolev92 nkolev92 deleted the dev-nkolev92-nugetrepopack branch January 7, 2019 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants