paket pack and developmentDependency: Fail on Linux (works on Windows)
Nobody has claimed this yet.
- Dominant language
- F#
- Stars
- 2.1k
- Forks
- 528
- Avg merge
- 1d 12m
- Merged PRs (30d)
- 54
Description
Description
tl;dr; paket pack handles development depencencies correctly (aka not placing it in the resulting dependency list) on Windows, but fails so on Linux (i.e. does add dependencies on development dependencies).
I have a library targeting netstandard20, developed using .NET Core SDK 2.2.
I'm using a paket.template, type project, to create the nupkg via paket pack. Using paket v5.219.0, installed as a local dotnet tool.
The library depends on some other nugets, two of them being "development dependencies" (marked with <developmentDependency>true</developmentDependency> in their nuspec).
Running paket pack on a Windows 10 workstation results in a nupkg that does not have those development dependency nugets listed in its nuspec, as expected.
Running the very same command, using the very same version of paket, on a Linux CI server, running Microsoft's official SDK-2.2 docker image, paket generates a nuspec that does have those dependencies listed.
Repro steps
(paket bootstrapping as in https://github.com/fsprojects/Paket/issues/3623#issuecomment-541098823)
On Windows:
git clone ....
dotnet restore .paket
dotnet build
.paket\paket pack
results in a correct nuget.
On Linux
git clone ....
dotnet restore .paket
dotnet build
.paket/paket pack
results in a nuget falsely depending on the development dependencies, too.
(And having only \n as line separator, opposed to the \r\n in the windows-created nuget, but that's the only difference when diffing the two packages and doesn't matter at all)
Expected behavior
Running paket pack on Linux should honor the development dependencies correctly, just like it's doing already on Windows.
Actual behavior
On Linux, paket pack adds wrongly dependencies to development-only dependencies.
Known workarounds
Use excludeddependencies in the templates and list all development dependencies explicitly. -- This defeats the whole purpose of having developmentDependency, though.
I haven't checked dotnet pack on Linux, as on Windows it does not handle development dependencies (see #2370). In addition, dotnet pack reads the package version from the PackageVersion msbuild property while paket pack (with type project) infers it from the AssemblyInformationalVersion attribute, which fits better for us.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the paket pack entry point and reproduce the issue with the provided paket.template and .paket/paket commands on Linux. Compare the generated nuspec with the Windows result, focusing on developmentDependency handling. Done means the Linux package omits development-only dependencies as the Windows package does.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp, linux
- Domain
- build-system, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100