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

No need to wrap git binary with process/exec #50

Open
jeroenvandijk opened this issue Jan 26, 2023 · 3 comments
Open

No need to wrap git binary with process/exec #50

jeroenvandijk opened this issue Jan 26, 2023 · 3 comments

Comments

@jeroenvandijk
Copy link
Contributor

jeroenvandijk commented Jan 26, 2023

Like #46 scripts installed from a git dependency don't have to be called via process/exec. Instead, they can be called directly in combination with babashka.deps/add-deps.

The time savings depend on your local hardware, but should be something like:

time bb -e 'nil'
bb -e 'nil'  0.02s user 0.01s system 83% cpu 0.036 total

(Some background in a recent discussion around Carve)

@borkdude
Copy link
Contributor

This may need a change in bb, allowing you to call bb --deps-root ... programmatically instead of from the CLI, for projects that are composed of multiple dependencies (like carve)

@borkdude
Copy link
Contributor

Or perhaps adding the project as :local/root works...

jeroenvandijk added a commit to jeroenvandijk/bbin that referenced this issue Jan 26, 2023
Test with 
```
bb bbin install io.github.borkdude/carve --as carve-dev && cat $(which carve-dev) && carve-dev ; time carve-dev
```

0.069

Vs 

bbin install io.github.borkdude/carve --as carve-wrapped && cat $(which carve-wrapped) && carve-wrapped ; time carve-wrapped

0.100
@jeroenvandijk
Copy link
Contributor Author

I think it works already, but need to fix some tests

jeroenvandijk added a commit to jeroenvandijk/bbin that referenced this issue Jan 26, 2023
-f might need —-deps-root like @borkdude mentioned
here babashka#50 (comment)
jeroenvandijk added a commit to jeroenvandijk/bbin that referenced this issue Jan 30, 2023
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

2 participants