Zulip Chat Archive

Stream: general

Topic: Error: unknown package 'Init' with Chinese characters


Floris van Doorn (Nov 03 2023 at 11:40):

I just installed a fresh copy of Lean for one of my students. This is a Chinese student with Chinese characters in their username.
When we open a Lean file outside a project in VSCode, and write #eval 1 + 1, Lean is working correctly.
When we open a Lean file with just #eval 1 + 1 in a repository (this repository, on lean v4.2-rc1), then we get the error "unknown package 'Init'" when compiling the lakefile. This happens both in VSCode and on the command line.

Related:
https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/error.3A.20file.20'init'.20not.20found.20in.20the.20search.20path

Mauricio Collares (Nov 03 2023 at 11:42):

4.2.0-rc1 does not contain lean4#2633

Mauricio Collares (Nov 03 2023 at 11:42):

So probably upgrading to 4.2.0 helps

Mauricio Collares (Nov 03 2023 at 11:44):

(there is a "v4.2.0" mathlib tag which may help a bit with the upgrade)

Mauricio Collares (Nov 03 2023 at 11:45):

By the way, the repo contains a file named lecture1.lean (lowercase L) so Linux users will probably have trouble

Mario Carneiro (Nov 03 2023 at 11:46):

lowercased files aren't a problem AFAIK, except for lake init

Floris van Doorn (Nov 03 2023 at 11:46):

oh, lowercase filenames cause issues? I tried to uppercase my file names indeed.

Mauricio Collares (Nov 03 2023 at 11:47):

They don't cause issues by themselves, but I think you refer to LeanCourse.Lectures.Lecture1 (uppercase L) in your repo

Floris van Doorn (Nov 03 2023 at 11:51):

Ok, thanks!

Floris van Doorn (Nov 03 2023 at 11:52):

Mauricio Collares said:

So probably upgrading to 4.2.0 helps

We're now running lake exe cache get, that indeed seems to work correctly! Thanks a lot.

Floris van Doorn (Nov 03 2023 at 11:52):

Now I have the difficult decision: ask everyone to upgrade, or have my students work on two different versions of Lean/mathlib... Neither option is great.

Eric Wieser (Nov 03 2023 at 12:08):

At least you weren't on rc2 or rc3...


Last updated: Dec 20 2023 at 11:08 UTC