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 Cache: avoid duplicate nupkg file #4135

Merged
merged 1 commit into from
Mar 29, 2022

Conversation

cdrnet
Copy link
Member

@cdrnet cdrnet commented Mar 29, 2022

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
Copy link
Member Author

cdrnet commented Mar 29, 2022

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.

None yet

2 participants