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

Support substituting in fetchGit #25

Merged
merged 4 commits into from
Jun 23, 2020
Merged

Conversation

matthewbauer
Copy link
Collaborator

Supports using fetchGit with substitutions.

builtins.fetch* aren’t technically derivations, so they never got
substituted. To work around this, we can try to substitute this store
path during evaluation. This can happen any time a hash is provided.

Updated to be closer to how the flakes branch works.
@matthewbauer matthewbauer changed the base branch from ipfs-develop to git-objects-develop June 22, 2020 23:21
@matthewbauer matthewbauer changed the base branch from git-objects-develop to ipfs-develop June 22, 2020 23:21
@matthewbauer matthewbauer changed the base branch from ipfs-develop to git-objects-develop June 22, 2020 23:24
This is disabled automatically when we’re offline.
@@ -134,6 +134,20 @@ static void fetch(EvalState & state, const Pos & pos, Value * * args, Value & v,
if (evalSettings.pureEval && !expectedHash)
throw Error("in pure evaluation mode, '%s' requires a 'sha256' argument", who);

// try to substitute if we can
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isn't actually necessary, but eventually we may want to support fetchGit

@Ericson2314 Ericson2314 merged commit 0de3063 into git-objects-develop Jun 23, 2020
@Ericson2314 Ericson2314 deleted the ipfs-git-ipld branch June 23, 2020 19:34
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.

2 participants