Zulip Chat Archive

Stream: computer science

Topic: Using CSLib as a dependency


Iván Renison (Dec 06 2025 at 18:06):

Hi, do you know what do I have to make to use CSLib as a dependency?
I tried to do something similar to the "Using mathlib4 as a dependency" explanation, and I ran: lake +leanprover/cslib:lean-toolchain new ProjectName math, but it didn't work

Kevin Buzzard (Dec 06 2025 at 18:19):

I would just make a new repository and then add to your lakefile.toml

[[require]]
name = "cslib"
git = "https://github.com/leanprover/cslib.git"

and then check it works by making a new file and putting import Cslib at the top.

Iván Renison (Dec 06 2025 at 18:35):

I get the error error: /home/ivan/Desktop/TeoFundArit/.lake/packages/cslib: revision not found 'master'
Maybe it has to do with the fact that CSLib has a main branch instead of a master branch

Shreyas Srinivas (Dec 06 2025 at 18:37):

You need to add rev = "main"

Iván Renison (Dec 06 2025 at 18:49):

This worked, but Cslib was build in my computer. lake exe cache get only downloaded Mathlib cache

Iván Renison (Dec 06 2025 at 18:49):

Thank you

Shreyas Srinivas (Dec 06 2025 at 18:49):

yeah that's something for the FRO to fix and they are working on adding a general cache for all projects

Chris Henson (Dec 06 2025 at 18:50):

Yes, cache does not get CSLib. But at this point it is relatively quick to build, so it's not too painful.

Chris Henson (Dec 06 2025 at 18:50):

Note also that there are tags for each release if you need that for any reason.


Last updated: Dec 20 2025 at 21:32 UTC