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

Runtime loading of ClojureRS source tree-specific file paths in Environment silently fails, resulting in missing expected bindings/vars/etc #92

Open
phrohdoh opened this issue Sep 9, 2021 · 1 comment

Comments

@phrohdoh
Copy link
Contributor

phrohdoh commented Sep 9, 2021

//
// Read in clojure.core
//
// @TODO its time for a RT (runtime), which environment seems to be becoming
let _ = Repl::new(Rc::clone(&environment)).try_eval_file("./src/clojure/core.clj");
// TODO: should read into namespace if (ns ..) is given in source file
let _ = Repl::new(Rc::clone(&environment)).try_eval_file("./src/clojure/string.clj");

My (Bevy-based) app does not have a src/clojure/core.clj nor a src/clojure/string.clj so the resulting load errors (observed by printing the return value of the try_eval_file calls) are silently ignored/swallowed/eaten/etc (due to the let _ = ...s).

@phrohdoh
Copy link
Contributor Author

phrohdoh commented Sep 9, 2021

format!("{}/src/clojure/core.clj", env!("CARGO_MANIFEST_DIR")) as the file path seems to work as desired for ClojureRS and downstream crates.

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

1 participant