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: seems to accumulate ././'s #6186

Open
2 of 3 tasks
juhp opened this issue Nov 23, 2024 · 0 comments
Open
2 of 3 tasks

lake: seems to accumulate ././'s #6186

juhp opened this issue Nov 23, 2024 · 0 comments
Labels
bug Something isn't working Lake Lake related issue

Comments

@juhp
Copy link
Contributor

juhp commented Nov 23, 2024

Prerequisites

  • Check that your issue is not already filed
  • Reduce the issue to a minimal, self-contained, reproducible test case.
  • Test your test case against the latest nightly release

Description

lake seems to generate extra "././" relative directory prefixes.
It is confusing to read and parse (eg also for Emacs).

Context

I read this new note in the code.
https://github.com/leanprover/lean4/blob/master/src/lake/Lake/Load/Materialize.lean also seems to deal with relPkgDir.
I appreciate that the current implementation works and might be considered safe or foolproof,
and perhaps was introduced also for simple portability? But there ought to be some
straightforward operator to join these paths without introducing redundant ./'s?
I feel it would be great to get rid of all the ./'s altogther if possible.

Steps to Reproduce

$ lean new test
$ cd test
$ vi Main.lean # break compile
$ lake build

Expected behavior:
No "././" or "././././":

$ lake build
✖ [4/8] Building Main
trace: .> LEAN_PATH=./.lake/build/lib LD_LIBRARY_PATH= /usr/lib64/lean4/bin/lean ./Main.lean -R . -o ./.lake/build/lib/Main.olean -i ./.lake/build/lib/Main.ilean -c ./.lake/build/ir/Main.c --json
error: ./Main.lean:5:0: expected '}'
error: Lean exited with code 1
Some required builds logged failures:
- Main
error: build failed

Actual behavior:

lake generates relative directory prefixes like "././" and "././././"

$ lake build
✖ [4/8] Building Main
trace: .> LEAN_PATH=././.lake/build/lib LD_LIBRARY_PATH= /usr/lib64/lean4/bin/lean ././././Main.lean -R ./././. -o ././.lake/build/lib/Main.olean -i ././.lake/build/lib/Main.ilean -c ././.lake/build/ir/Main.c --json
error: ././././Main.lean:5:0: expected '}'
error: Lean exited with code 1
Some required builds logged failures:
- Main
error: build failed

Versions

4.14-rc2
Fedora Linux

Additional Information

Impact

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

@juhp juhp added the bug Something isn't working label Nov 23, 2024
@juhp juhp changed the title lake: seems to accumulate "././"s with dependencies lake: seems to accumulate "././"s Nov 25, 2024
@juhp juhp changed the title lake: seems to accumulate "././"s lake: seems to accumulate ././'s Nov 25, 2024
@tydeu tydeu added the Lake Lake related issue label Nov 25, 2024
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
Projects
None yet
Development

No branches or pull requests

2 participants