-
Notifications
You must be signed in to change notification settings - Fork 298
Using stdlib as an external dependency #6
Comments
You should just need |
Thanks, this worked. I just had to include the path to $PROJECT_DIR/_target/stdlib/ in my LEAN_PATH. This is less than ideal, but I'm happy with it for now. Ideally, either lean or VSCode would read the file "leanpkg.path", which was automatically created by running |
Lean will automatically pick up the path from the generated |
Thanks, that explains it -- I thought I needed custom LEAN_PATH, because I've compiled lean from source code and the executable, which resides in $LEAN_SOURCE_DIR/bin/ couldn't see the library which resides in $LEAN_SOURCE_DIR/library. The problem with this set-up is that I'll need a custom $LEAN_PATH for each project, which means I'll have to |
This should definitely work. Can you please try again without the LEAN_PATH environment variable, and report a bug if it doesn't work? |
I'd like to, but I don't know how to use lean without LEAN_PATH:
when I remove LEAN_PATH I'm just getting lots of errors complaining about missing core files from the lean source code. |
I've worked around it -- just modified the leanpkg.path to include path to the core library, and unset $LEAN_PATH. Yes it works, which is again, fine by me. Problems would only begin if I wanted to share my leanpkg.path with somebody else -- they may not have lean installed at the same path as me. |
The |
That's it:
|
Feel free to close this issue -- and thanks for your help. The setup I've got is good enough, if I ever encounter problems in the future I'll raise a separate issue. |
I'd like to use
subset.antisymm
fromstdlib/data/set/
in my pet project.I've specified stdlib as a dependency using the following leanpkg.toml
and run
leanpkg --configure
. This step created a local directory_target
with the desired dependency.But I'm not sure how to import
subset.antisymm
in my project.I couldn't find any documentation, and I've tried various combinations of
import
/open
andsubset.antisymm
with various different prefixes, from both VSCode extension and command line, but without luck.I can provide more detail, and a smaller example, but the specific file I'm talking about (along with leanpkg.toml) is here:
https://github.com/picrin/lean/blob/master/topology.lean#L53
The text was updated successfully, but these errors were encountered: