leanprover / leanprover/lean4

`lake update` output is inconsistent between path and Git dependencies

Open
#7,025 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Lake P-low
Dominant language
Lean
Stars
9.2k
Forks
990
Avg merge
1d 17h
Merged PRs (30d)
175

Description

Description

When using lake update with a Git dependency that is updated (leading to a change in the manifest), it prints something like:

info: verso: checking out revision 'd39b497d766da4a19b8b2b5ac348df404b1af42a'

This also occurs when switching a dependency from a path dependency to a Git dependency. It does not print anything, however, when switching from a Git to a path dependency, which is convenient when checking whether a bug fix worked from client code.

Context

I find myself frequently checking the Lake configuration file to see if I made the change that I thought I did when testing the reference manual against Verso updates locally. This is a papercut.

Steps to Reproduce
  1. Check out some Lean library locally (here, I'm using Verso)
  2. Create a package with lake new and add a dependency:
    [[require]]
    name = "verso"
    path = "PATH/TO/VERSO"
    # git = "https://github.com/leanprover/verso"
    
  3. Run lake update
  4. Comment out the path line, and uncomment the git line. Run lake update.
  5. Restore the file and run lake update.

Expected behavior:

The output should be consistent. Either both switching to the remote Git version or switching to the local path should be silent, or both should output info. Ideally, both would emit info.

Actual behavior:

Only switching to the online version outputs info:

info: verso: URL has changed; deleting '././.lake/packages/verso' and cloning again
info: verso: cloning https://github.com/leanprover/verso
Versions
$ lake --version
Lake version 5.0.0-128a1e6 (Lean version 4.16.0)
$ uname -a
Darwin David-LeanFRO 23.6.0 Darwin Kernel Version 23.6.0: Fri Nov 15 15:11:49 PST 2024; root:xnu-10063.141.1.702.7~1/RELEASE_ARM64_T6020 arm64
Additional Information

None

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the described path-to-Git and Git-to-path transitions with lake update, using the configuration and command sequence in the issue. Trace the lake update dependency-handling entry point and compare the reported output for both transitions; done means the two switch directions produce consistent, intentional information messages.

Written by the indexing model from the issue text.

Assessment

Tech stack
git
Domain
build-system, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.