peroxide
peroxide copied to clipboard
src/scheme-lib/init.scm - No such file
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)
https://github.com/MattX/peroxide/blob/a36a6359dba9351533066de7aa5e655855f53760/src/bin/main.rs#L62
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
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?
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.