-
Notifications
You must be signed in to change notification settings - Fork 78
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
Environment setup: requiring cljc source files and possibility of using cljs #568
Comments
For those of you following along, turns out I was overthinking 1). Turns out, it mainly arose from the way clerk reports compile errors of upstream requirements, that being silently. You can resolve similar issues by running a checker like clj-kondo prior to spinning up the notebook. General, it might be a good idea to add hooks to check updated files via custom tooling, as default Clojure error messages are pretty opaque anyways. EDIT: scratch that, I end up having to manually load the src file (by editing and triggering the file watcher) in order for the defs to be exported. Still, that unblocks me. 2) is still unresolved. Some other suggestions:
|
Clerk should display errors in the browser. If you've been using serve with the file watcher, this might be an actual bug #616, did you happen to use the |
There's some experiment (#607) in that direction to have |
I'm not sure what's the issue with 1) but perhaps you can make an example project to show what you mean. It should just work like you described, provided that you run clerk as part of your project classpath |
Hello all I'm having some issues with getting my clerk workflow setup and I would appreciate anyone's input on making this happen.
I have my project directory managed with deps.edn. This works perfectly fine when everything (aside from external dependencies) is defined within the notebook itself, but I have not had luck :require'ing source files from elsewhere in the directory. Ideally I would import it just as I would an external dependency or perhaps just use the same namespace and all of the definitions are loaded in, but another possibility might be to define the source files as another notebook directory via :watch-paths and use some clerk-specific mechanism to execute and run. Just want to get unblocked here.
The specifics of my case don't matter, but for generality let's say I have
notebooks
andsrc
directories, where the files undersrc
are written using thelib.{name}
namespace. What additional configuration,clj
commands, or clerk code do I need to execute in order use the code fromsrc
in a notebook? Bonus points if where is a demo or example repo that already demonstrates this.Is it possible to execute notebooks via ClojureScript instead of Clojure? I suspect the answer is no, but if it's a reasonable lift I can certainly help in making this happen.
Thanks!
The text was updated successfully, but these errors were encountered: