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

Incorrect path resolution for nbb.edn local deps #318

Closed
logseq-cldwalker opened this issue Apr 8, 2023 · 3 comments
Closed

Incorrect path resolution for nbb.edn local deps #318

logseq-cldwalker opened this issue Apr 8, 2023 · 3 comments

Comments

@logseq-cldwalker
Copy link
Contributor

Hi @borkdude

version

1.2.172

platform

osx 12.0.1 and node 18.14.1

problem

When using a local dep e.g. {:local/root "deps/bar"} in nbb.edn, nbb resolves local paths to be three directories deep in .nbb/ instead of the current directory. I think I started seeing this when upgrading nbb-logseq to 1.1.X.

repro

Basic repro at https://github.com/logseq-cldwalker/nbb-local-deps-repro. A more involved, nbb-logseq version of this issue exists at https://github.com/logseq/logseq/pull/9033/files#diff-fc5061296a8adfb6800fdedc2f3d0ab5b6ce8f8b7c55f4f9d737c1f4a73e768c

expected behavior

I expected to use a local dep the same way we use one in deps.edn. A temporary workaround is to change {:local/root "../../../deps/bar"}. However this workaround doesn't consistently work on CI and locally

@borkdude
Copy link
Collaborator

borkdude commented Apr 8, 2023

I noticed this too. The fix should be made here:

(cproc/execSync (str bb " --config " deps-edn-path " uberjar " jar-path))

by adding a --deps-root argument, setting that to the parent dir of the invoked script.

@borkdude
Copy link
Collaborator

borkdude commented Apr 9, 2023

Fixed in 1.2.173

@logseq-cldwalker
Copy link
Contributor Author

Thanks! That was quick. 😍 Confirmed it works great for the repro. Cutting a nbb-logseq release shortly

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