leanprover / elan

The Lean version manager
Apache License 2.0
292 stars 34 forks source link

Create toolchain directory atomically #121

Closed Kha closed 6 months ago

Kha commented 7 months ago
$ elan toolchain install stable
info: syncing channel updates for 'stable'
info: latest update on stable, lean version v4.5.0
info: downloading component 'lean'
150.1 MiB / 150.1 MiB (100 %)  68.2 MiB/s ETA:   0 s
info: installing component 'lean'
^C
$ ls -R ~/.elan/toolchains/stable.tmp | wc -l
1444
$ elan toolchain install stable
info: syncing channel updates for 'stable'
info: latest update on stable, lean version v4.5.0
info: downloading component 'lean'
150.1 MiB / 150.1 MiB (100 %)  69.2 MiB/s ETA:   0 s
info: installing component 'lean'

  stable installed

$ ls -R ~/.elan/toolchains/stable | wc -l
2859
nomeata commented 6 months ago

I was wondering why we need this when elan is just a copy of rustup, and I was optimistically assuming that rustup gets this right, but it seems it doesn’t: https://github.com/rust-lang/rustup/issues/988