-
Notifications
You must be signed in to change notification settings - Fork 9
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
Do not require deps.edn when using local bbin install #78
Comments
cc @rads |
I've run into this issue another way: I have a deps.edn that has a dependency that doesn't work with babashka, so in my bb.edn, I don't depend on the local deps.edn, I just specify #?(:bb (do (require '[babashka.deps :as deps])
(deps/add-deps '{:deps {io.github.babashka/tools.bbuild
{:git/sha "f5a4acaf25ec2bc5582853758ba81383fff5e86b"}}})) If I run the script with babashka, this works, but if I run it with |
I had a look at this, made a reproduction, and wrote a very long summary of what I learned: Summary of what I learned:
For 3 I see two options:
(See heading in linked document: https://github.com/teodorlu/bbin-testdata/blob/72934325b97ce431c57ef0c581b4ed1aeedf70af/fail1/README.md#question-for-borkdude-should-classpath-be-inferred-for-bb---config-some-deps-edn-or-bb-edn-file) |
With bb |
@teodorlu: It's been a while since I looked at this code in detail so I appreciate the overview. You've already started moving towards the right direction in your PR, but I'll summarize my suggested plan here for clarity:
If the above points look good to you and @borkdude, then we can move forward with finalizing the implementation. |
Looks good, except maybe for this one?
Why throw an exception in this case, one could have a valid |
Good point. I'll fix that to say that we don't want to add inference rather than adding a strict check. |
I think that it might be a good idea to move away from string-based selmer templates for the shims to code as data.
To get pretty-printed code, we could use something like @rads / @borkdude thoughts on this? (Just saying this now, because I felt it made the last "chunk" of work harder than necessary) |
I'm fine with this, but it seems like a different issue to me, let's not try to do too many changes at once, unless it makes your life easier in the PR? |
@teodorlu What's necessary to wrap this issue up? I think it was mentioned in the bbin channel on Clojurians slack once again |
Hey! It's been a while since I last looked at this. I lost a bit of steam working on the Clojure code we generate by interpolating values into strings. I also remember feeling slightly uneasy changing the generated Clojure code fearing Windows regressions. Maybe first refactoring to generate Clojure code as Clojure data is easier. If you want to take a stab (possibly you'll just steam through in an hour as you sometimes do), feel free! Otherwise I'll give it another shot in a day or two. |
I have been working on a babashka project with the following
bb.edn
(the script's name issecrets
):Installation via
bbin install .
works, but when I call the resulting script, a classpath not found error is raised. So I added an emptydeps.edn
:Now the reinstalled script works. But why is that necessary? The
deps.edn
is useless, since I am already declaring the dependencies in thebb.edn
file and do not callclj
. So I expectedbbin install
to work autonomously.So if I did not miss something, I think it would be better to drop this dependency. Not least because jacking into the script with CIDER causes unnecessary confusion (I have to choose "clojure or babashka?"). If that will not be changed, I would recommend at least to document that a
deps.edn
is also necessary.The text was updated successfully, but these errors were encountered: