Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src/scheme-lib/init.scm - No such file #4

Open
milahu opened this issue Nov 26, 2021 · 2 comments
Open

src/scheme-lib/init.scm - No such file #4

milahu opened this issue Nov 26, 2021 · 2 comments

Comments

@milahu
Copy link

milahu commented Nov 26, 2021

should be verbose error

current output

$ ./result/bin/main
No previous history.
Error: No such file or directory (os error 2)

$ strace --trace=file ./result/bin/main 2>&1 | grep 'No such file' | grep -v -e /nix/store -e /etc/ld-nix.so.preload
openat(AT_FDCWD, "history.txt", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "src/scheme-lib/init.scm", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
Error: No such file or directory (os error 2)

interpreter.initialize("src/scheme-lib/init.scm")?;

the file path src/scheme-lib/init.scm is relative to the current workdir (cwd)
suggestion: allow to set library path via argv or env

peroxide --scheme-lib /usr/share/peroxide/scheme-lib
SCHEME_LIB=/usr/share/peroxide/scheme-lib peroxide
@MattX
Copy link
Owner

MattX commented Nov 29, 2021

Yeah, that seems like a good option, and there should probably also be a mechanism to specify the library path at build time, probably through a build.rs script?

@MattX
Copy link
Owner

MattX commented Dec 7, 2021

This should be partially resolved with dee2de6, but I'd also like to add a way to change the library file location at build time, so we can keep this as a tracking issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants