Paket install failure on GitHub file dependencies when file has been removed
Nobody has claimed this yet.
- Dominant language
- F#
- Stars
- 2.1k
- Forks
- 528
- Avg merge
- 1d 12m
- Merged PRs (30d)
- 54
Description
If you use GitHub dependencies with specific files:
github janl/mustache.js mustache.min.js
...and the file is there, at the time you reference it (https://github.com/janl/mustache.js/commit/8e52a4ac6cf4ed86d0fedb3c4dae643fd7b56998)... but then the author removes it from the repository in later https://github.com/janl/mustache.js/commit/2061046686c46fd5b2b54611f4eb55f56991a210 and then when you run install (not even update!), the Paket fails, throws the towel in, and stops the whole process:
A:\> .paket\paket.exe install
Downloading janl/mustache.js:550d1da9e3f322649d04b4795f5356914f6fd7e8 mustache.min.js to C:\git\welendus\paket-files\javascript\janl\mustache.js\mustache.min.js
- Download failed. Trying again. (4 trials left)
- Download failed. Trying again. (3 trials left)
- Download failed. Trying again. (2 trials left)
- Download failed. Trying again. (1 trials left)
- Download failed. Trying again. (0 trials left)
Performance:
- Average Download Time: 48 milliseconds
- Number of downloads: 6
- Average Request Time: 215 milliseconds
- Number of Requests: 13
- Runtime: 3 seconds
Paket failed with
-> Could not download from 'https://raw.githubusercontent.com/janl/mustache.js/550d1da9e3f322649d04b4795f5356914f6fd7e8/mustache.min.js'
A:\>
...after trying to get only the last commit in that repo https://github.com/janl/mustache.js/commit/550d1da9e3f322649d04b4795f5356914f6fd7e8
That is clearly incorrect.
After that, trying to trace every file history manually, what happened and where should I get it now is slow and time consuming.
Expected behavior
- Either keep the existing commit as I was not trying to upgrade the file.
- Or trace where the file was removed and use one before that commit (which may hammer GitHub API too much)
- Or try to take the most recent commit and if not found, then fall-back to the current version.
Just please don't fail. On every file. It's very typical the authors change the files in Github repositories, and if you have 15 file dependencies, you basically fail the install command every time.
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 by reproducing paket.exe install with a GitHub file dependency whose file was later removed, using the commits and mustache.min.js example in the report. Trace Paket's GitHub file-resolution and download path, then establish behavior that avoids failing installation when the pinned file is unavailable; add or run regression coverage for that scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, github
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100