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

NuGet pack should reject duplicated entries in the same directory #9939

Closed
mmitche opened this issue Aug 25, 2020 · 7 comments
Closed

NuGet pack should reject duplicated entries in the same directory #9939

mmitche opened this issue Aug 25, 2020 · 7 comments
Assignees
Labels
Functionality:Pack Type:DCR Design Change Request

Comments

@mmitche
Copy link

mmitche commented Aug 25, 2020

Please read the following information before posting the issue.

Details about Problem

NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe): Any nuget path that can pack.

NuGet version (x.x.x.xxx): Any recent nuget version.

Detailed repro steps so we can see the same problem

It is possible to create a package that contains multiple files with the same name in the same directory. This cannot be unpacked on any operating system in a predictable manner, and a push to nuget.org fails.

@mmitche
Copy link
Author

mmitche commented Aug 25, 2020

/cc @jaredpar Do you have detailed info on how this actually comes about? I'm still digging into the current windowdesktop failure.
/cc @zkat

@jaredpar
Copy link

@ericstj did the investigation and can comment on how the pack ended up with two different files with the same name.

@jaredpar
Copy link

jaredpar commented Aug 25, 2020

Related change is here: dotnet/arcade#5818

Essentially we found that we had created NuPkg files with duplicate files and had to work to undo this. Such packages are essentially broken and can't be reliably used. Tooling that operates at the ZIP level don't expect to see this and ended up failing in our build pipeline. This change is us undoing that mistake.

@mmitche
Copy link
Author

mmitche commented Aug 25, 2020

This change regressed this in Arcade: dotnet/arcade@50da2e6#r40426132

And it was fixed in the Arcade currently in use in rc1 in windowsdesktop: dotnet/arcade@b1754cc

@mmitche
Copy link
Author

mmitche commented Aug 25, 2020

I think this actually may be because windowsdesktop was creating its nuget packages using a non-standard process, but @zkat we should still ensure that you can't get into this situation using the standard usage paths. @jaredpar said he had seen similar issues with roslyn, which I believe does use the standard pack processes.

@nkolev92
Copy link
Member

@zkat this is probably a duplicate of #6941.

@zkat
Copy link
Contributor

zkat commented Aug 27, 2020

Closing as dupe, and assigning that one to myself instead.

@zkat zkat closed this as completed Aug 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Functionality:Pack Type:DCR Design Change Request
Projects
None yet
Development

No branches or pull requests

5 participants