Lake panics when creating new project with a numeric name
Open
Nobody has claimed this yet.
bug
Lake
P-medium
- Dominant language
- Lean
- Stars
- 9.2k
- Forks
- 990
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 175
Description
Running lake new 1234 gives me this panic:
PANIC at Lean.modToFilePath.go Lean.Util.Path:40:20: ill-formed import
backtrace:
0 libleanshared.dylib 0x0000000113a82728 lean_panic + 268
1 libleanshared.dylib 0x0000000113a8292c lean_panic_fn + 32
2 libleanshared.dylib 0x000000011358c574 l_Lean_modToFilePath + 20
3 libLake_shared.dylib 0x0000000105a0e32c l_Lake_initPkg___lambda__6 + 516
4 libLake_shared.dylib 0x0000000105a11b60 l_Lake_initPkg + 556
5 libLake_shared.dylib 0x0000000105a70734 l_Lake_lake_new___lambda__3 + 192
6 libLake_shared.dylib 0x0000000105a7381c l_Lake_lake_new___lambda__3___boxed + 96
7 libleanshared.dylib 0x0000000113a91674 lean_apply_3 + 960
8 libleanshared.dylib 0x0000000113a8f9a0 lean_apply_2 + 840
9 libLake_shared.dylib 0x0000000105a4bae8 l_Lake_noArgsRem___rarg + 72
10 libLake_shared.dylib 0x0000000105aecdb0 l_Lake_cli + 580
11 lake 0x0000000104a84734 _lean_main + 20
12 lake 0x0000000104a849a0 main + 204
13 dyld 0x00000001812f8274 start + 2840
Adding a letter to the front of the name prevents the panic.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with lake new 1234, then compare it with a project name beginning with a letter. Trace the lake new command from its CLI entry point to the project initialization step shown in the panic. Done means numeric project names are handled without a panic and a new project is created.
Written by the indexing model from the issue text.
Assessment
- 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