Repository navigation
Dependency downloads, clones and unpacking: complete, or not there at all - #25
Merged
Merged
Conversation
The caches in $MISO_HOME/src were filled in place, and a folder that was there was taken as complete: - a git dependency was cloned and then checked out in its folder; a clone cut short, or a checkout that failed, left a folder at another commit, which later builds used without a word - a Hackage tarball was downloaded to its final name; one cut short was taken as the whole tarball (and a package not locked yet got the sha256 of the partial file in miso.lock) - a tarball was unpacked into src/hackage; an unpacking cut short left half a package - the clone that resolves short commits had the same problem Each is now written next to its final name and renamed when complete (as miso vendor and the package store already do): cloneAt and unpackHackage in Miso.CLI.Lock, and a .part file for downloads. A git checkout that is there is also checked to be at its commit, and cloned again when it is not. Checked with a test program against a local repository and tarballs: a checkout at a commit; one moved to another commit is cloned again; a checkout of a rev that does not exist, and a broken tarball, leave no folder.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The caches in
$MISO_HOME/srcwere filled in place, and any folder already there was treated as complete:miso.lock.src/hackage, so an unpack cut short left half a package.Now each one is written next to its final name and renamed when complete, as
miso vendorand the package store already do. That's two helpers inMiso.CLI.Lock(cloneAt,unpackHackage), plus a.partfile for downloads. A git checkout that already exists is also checked to be at its commit, and is cloned again if it isn't.Checked with a small test program against a local repository and local tarballs:
Generated by Claude Code