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

lake: could not materialize package #5330

Closed
jcommelin opened this issue Sep 13, 2024 · 2 comments · Fixed by #6231
Closed

lake: could not materialize package #5330

jcommelin opened this issue Sep 13, 2024 · 2 comments · Fixed by #6231
Assignees
Labels
bug Something isn't working Lake Lake related issue P-medium We may work on this issue if we find the time

Comments

@jcommelin
Copy link
Contributor

jcommelin commented Sep 13, 2024

While working on mathlib branch bump/nightly-2024-09-11 (see leanprover-community/mathlib4#16716) we used the new Reservoir dependency syntax, but received the error message:

$ lake update LeanSearchClient
error: leanprover-community/LeanSearchClient: could not materialize package: dependency has no explicit source and was not found on Reservoir

This error is both going to be reasonably common (whenever someone doesn't understand how reservoir works), and is not actionable.

Could we please add:
"

  • To see why it is not on Reservoir, visit https://...
  • If you did not intend to use Reservoir, and the dependency is available on GitHub, please replace your require line with
require foo from git "https://github.com/org/repo" @ hash
  • or otherwise with the https URL for the git repository of this package.
    "

If the first bullet point is complicated to implement, we should implement the 2nd and 3rd bullet points in the meantime.

We could do even more here:

  • explain why it is not on reservoir?
  • check if it is on github and then be more specific in the help
@jcommelin jcommelin added the bug Something isn't working label Sep 13, 2024
@kim-em
Copy link
Collaborator

kim-em commented Sep 13, 2024

@jcommelin, I took the liberty of rewriting. :-)

@tydeu
Copy link
Member

tydeu commented Sep 13, 2024

As an aside, in regards to this particular error, note that a package can use both an explicit source (i.e., from git) and still provide a Reservoir require. For example:

require "leanprover-community" / "LeanSearchClient" 
  from git "https://github.com/leanprover-community/LeanSearchClient.git" @ "main"

@tydeu tydeu added the Lake Lake related issue label Sep 13, 2024
@leanprover-bot leanprover-bot added the P-medium We may work on this issue if we find the time label Sep 20, 2024
github-merge-queue bot pushed a commit that referenced this issue Nov 27, 2024
This PR improves the errors Lake produces when it fails to fetch a
dependency from Reservoir. If the package is not indexed, it will
produce a suggestion about how to require it from GitHub.

Closes #5330.
kim-em pushed a commit that referenced this issue Nov 27, 2024
This PR improves the errors Lake produces when it fails to fetch a
dependency from Reservoir. If the package is not indexed, it will
produce a suggestion about how to require it from GitHub.

Closes #5330.
kim-em pushed a commit that referenced this issue Nov 29, 2024
This PR improves the errors Lake produces when it fails to fetch a
dependency from Reservoir. If the package is not indexed, it will
produce a suggestion about how to require it from GitHub.

Closes #5330.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Lake Lake related issue P-medium We may work on this issue if we find the time
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants