Skip to content

NuGet Cache: avoid duplicate nupkg file - #4135

Merged
forki merged 1 commit into
fsprojects:masterfrom
cdrnet:nuget-cache-avoid-duplicate-nupkg
Mar 29, 2022
Merged

forki merged 1 commit into
fsprojects:masterfrom
cdrnet:nuget-cache-avoid-duplicate-nupkg

Conversation

@cdrnet

@cdrnet cdrnet commented Mar 29, 2022 •

Copy link
Copy Markdown
Member

Currently Paket ends up putting each nupkg file twice into the NuGet cache: once in the folder of the package, and once in the subfolder for the specific version. NuGet itself puts it only into the version subfolder - as did Paket before v6.

The reason for this seems to be that we first download the nupkg to the expected folder. However, because NuGet's PackageExtractor.InstallFromSourceAsync doesn't support inplace extraction where the nupkg is already there in the correct place, we first move it to the parent folder and then extract from there.

The proposed change would delete that file in the parent folder after the extraction.

Advantage of deleting:

  • Closer to NuGet behavior
  • Better compatibility with tools which get confused and break by the extra file (e.g. NUKE).
  • No redundant file, less disk usage

@forki
forki merged commit a72f1c5 into fsprojects:master Mar 29, 2022
@cdrnet

cdrnet commented Mar 29, 2022 •

Copy link
Copy Markdown
Member Author

Thank you very much for the super fast release! 🚀

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.

3 participants