fsprojects / fsprojects/Paket

Paket Case-Sensitivity when creating package references

Open
#2,941 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug paket pack
Dominant language
F#
Stars
2.1k
Forks
528
Avg merge
1d 12m
Merged PRs (30d)
54

Description

Description

SDKRepro.zip

This repo contains two projects: MySDK and MyClient.
MyClient has a project reference to MySDK.

Expected behaviour:

When creating nuget packages using the provided pack command-line, two packages should be created and MyClient should have a dependency on the MySDK package.

paket.exe pack nuget --build-config Debug --build-platform "AnyCPU" --version 1.0.0

MyClient.nuspec inside MyClient-1.0.0.nupkg should look like this:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
  <metadata>
    <id>MyClient</id>
    <version>1.0.0</version>
    <title>MyClient</title>
    <authors>MyCompany</authors>
    <description>MyClient program.</description>
    <dependencies>
      <dependency id="MySDK" version="1.0.0" />
    </dependencies>
  </metadata>
</package>
Actual behaviour

The dependency is not found:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
  <metadata>
    <id>MyClient</id>
    <version>1.0.0</version>
    <title>MyClient</title>
    <authors>MyCompany</authors>
    <description>MyClient program.</description>
  </metadata>
</package>

This behaviour seems to depend on casing of the MySdk directory:

  • If the directory is renamed to MySDK, the dependency is found
  • If the directory name is Pascal case (MySdk), the dependency is not found

Tested on Windows 7 on an NTFS file system

Known workarounds

Be careful with casing.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with SDKRepro.zip and reproduce the issue using paket.exe pack nuget --build-config Debug --build-platform "AnyCPU" --version 1.0.0. Compare the generated MyClient.nuspec when the MySDK directory uses MySDK versus MySdk; done means the MyClient package contains a MySDK dependency regardless of directory casing.

Written by the indexing model from the issue text.

Assessment

Tech stack
fsharp
Domain
build-system, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.