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
Default classpath for bb "project" #680
Comments
Here is an idea from a conversation I just had: Instead of a config file we could just have a side-effecting setup script or function.
or
or a
function at the bottom of your script where you do the loading of the pods, setting of the classpath, adding of deps with babashka.deps, etc, so your ns form can be clean looking. pez:calva: 14 minutes ago borkdude 8 minutes ago |
Having NS declarations in an NS form also helps tooling, which does static analysis, like Cursive. Also, why call these files The other reason for keeping these things concise is to stay aligned with the core goal of Babashka: "Babashka is a native Clojure interpreter for scripting". To me scripting also carries the meaning of quick experimentation, where concision helps a lot. We can see the results in action if we look at the GNU |
@onetom About the naming: yes, we can have |
Went with option 2 on master now:
Not yet supported:
|
Setting the default classpath for a bb project was "traditionally" done using
$(clojure -Spath ...)
.This isn't very nice:
$ bb --classpath $(bb --clojure -Spath -Sdeps "{:deps {medley/medley {:mvn/version \"1.3.0\"}}}")
We can already do this from within a file (on master):
Options:
--deps-aliases
argument to modify the classpath using aliases. Not my favorite option, since it will change current behavior and typically you will have a different set of deps for bb and clj when bb is used for scripting inside a JVM project.:deps
and:paths
. Set classpath when present. Maybe also support command line aliases, although I'm not sure if someone is going to different sets of deps for one script.babashka.deps
andbabashka.classpath
is sufficientThis is a continuation of #473
The text was updated successfully, but these errors were encountered: