Skip to content
This repository was archived by the owner on Aug 24, 2024. It is now read-only.
This repository was archived by the owner on Aug 24, 2024. It is now read-only.

LeanInk can't install itself for brew-installed elan #21

@utensil

Description

@utensil

Description

LeanInk can't install itself for brew-installed elan, the error output is:

Installing LeanInk...
cp: directory /Users/[MYUSERNAME]/.elan/bin does not exist
Failed copying LeanInk to .elan/bin!

Under my .elan, ls shows:

settings.toml   tmp             toolchains      update-hashes

no sign of bin.

The elan in use is:

% ls -lhta `which elan`
[OMITTED] /usr/local/bin/elan -> ../Cellar/elan-init/1.4.1/bin/elan

Expected behaviour

LeanInk could detect if elan is intalled into ~/.elan and act accordingly such as soft-lining from /usr/local/bin/.

Reproducing the issue

# 1. Follow https://leanprover-community.github.io/install/macos.html#m1-macs--apple-silicon to install elan on M1 Macs / Apple Silicon or just `brew install elan-init` for other Macs
# 2. Install LeanInk
sh -c "$(curl https://raw.githubusercontent.com/leanprover/LeanInk/main/init.sh -sSf)"

Environment information

  • Operating System: macOS Monterey 12.4 on MacBookPro (16-inch, 2021) with Apple M1 Pro
  • Lean version: Lean (version 4.0.0-nightly-2022-07-10, commit 23bae264fd1f, Release)
  • LeanInk version: Latest commit: 4b5e606
  • Alectryon version: N/A

Suggested fix

Two options:

  1. Fix the line ELAN_BIN="$HOME/.elan/bin/" in https://github.com/leanprover/LeanInk/blob/main/install.sh that assumes "that lean is already installed as expected we can assume that the .elan folder already exists and is correctly linked."
  2. Fix https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/elan-init.rb to add symlink for ~/.elan as well

1 is more pratical.

Additional Notes

I've bypassed the issue by following https://github.com/leanprover/LeanInk#building-from-source and manually copy leanInk to /usr/local/bin which seems to be working fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions