Zulip Chat Archive

Stream: general

Topic: Inconsistent file naming across utils


Yaël Dillies (Mar 28 2024 at 14:37):

If I want to get cache for Data.Finset.Basic, I need to run lake exe cache get Mathlib/Data/Finset/Basic.lean. However if I to build it I need to run lake build Mathlib.Data.Finset.Basic

Yaël Dillies (Mar 28 2024 at 14:37):

Can we fix the inconsistency here?

Michael Stoll (Mar 28 2024 at 14:41):

(Maybe allow both spellings in both cases?)

Anne Baanen (Mar 28 2024 at 14:46):

I have a strong preference for file paths over dots, since file paths work with many external tools (like tab completion in my shell).

Mauricio Collares (Mar 28 2024 at 14:50):

Make sure to react-vote at lean4#2756 :)

Johan Commelin (Mar 28 2024 at 14:54):

I have a strong preference for allowing both spellings.

  • Because in some situations I might want to copy a file path
  • Because in some situations I might want to copy from an import statement

Eric Wieser (Mar 28 2024 at 14:57):

What if your filesystem contains Foo.Bar.lean and Foo/Bar/lean.lean?

Eric Wieser (Mar 28 2024 at 14:58):

Maybe the answer is an -m flag for "module" (or -f for file) that switches from filepath to importpath mode

Johan Commelin (Mar 28 2024 at 14:58):

Happy with that

Johan Commelin (Mar 28 2024 at 14:59):

I just think that both scenarios are very common, and it would be very helpful if both are supported.

Mauricio Collares (Mar 28 2024 at 15:14):

Eric Wieser said:

Maybe the answer is an -m flag for "module" (or -f for file) that switches from filepath to importpath mode

The ergonomic option, in my opinion, would be to have flags for both and let the flag-less version guess what the user meant, possibly erroring out if both options are valid for the given input.


Last updated: May 02 2025 at 03:31 UTC