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 failing because of camel casing overriding user intentions #2567

Closed
kim-em opened this issue Sep 20, 2023 · 0 comments · Fixed by #2889
Closed

lake failing because of camel casing overriding user intentions #2567

kim-em opened this issue Sep 20, 2023 · 0 comments · Fixed by #2889
Labels
bug Something isn't working Lake Lake related issue

Comments

@kim-em
Copy link
Collaborator

kim-em commented Sep 20, 2023

lakefile.lean:

import Lake
open Lake DSL

package «foo» {
  -- add any package configuration options here
}

@[default_target]
lean_lib «bar» {
  -- add any library configuration options here
}

(Note lowercase lean_lib name.)

  • bar/A.lean empty
  • bar/B.lean just containing import bar.A
  • bar.lean just containing import bar.B

I think this is a valid setup, even if the choice of filename casing is contrary to standard usage.

However it currently fails:

% lake build
[0/1] Building Bar
error: > LEAN_PATH=./build/lib DYLD_LIBRARY_PATH=./build/lib /Users/kim/.elan/toolchains/leanprover--lean4---v4.1.0-rc1/bin/lean ./././Bar.lean -R ././. -o ./build/lib/Bar.olean -i ./build/lib/Bar.ilean -c ./build/ir/Bar.c
error: stdout:
./././Bar.lean:1:0: error: unknown package 'bar'
You might need to open '/Users/kim/scratch/foo' as a workspace in your editor
./././Bar.lean:4:13: error: unknown constant 'String'
error: external command `/Users/kim/.elan/toolchains/leanprover--lean4---v4.1.0-rc1/bin/lean` exited with code 1

Similarly opening either bar.lean or bar/B.lean in VSCode gives:

unknown package 'bar'
You might need to open '/Users/kim/scratch/foo' as a workspace in your editor

This is on both v4.1.0-rc1 and nightly-2023-09-19.

This is caused by multiple usages of toUpperCamelCase name in lake.

(From zulip.)

@kim-em kim-em added the bug Something isn't working label Sep 20, 2023
@tydeu tydeu added the Lake Lake related issue label Sep 25, 2023
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

Successfully merging a pull request may close this issue.

2 participants