nbb.core/*file* doesn't survive bundle
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- clojure, node.js
- Domain
- build-system, cli
Research direction
Reproduce the behavior with the provided printme.cljs example and the nbb bundle commands, then trace how nbb.core/file is handled during bundling. Done means the generated printme.mjs reports its own script location when run with Node, rather than nil.
Written by the indexing model from the issue text.
Description
I am not sure if this is a bug or a feature request.
nbb v1.3.196
Ubuntu 22.04
Node v20.17.0
If you run nbb bundle printme.cljs -o printme.mjs and run the resulting script with node printme.mjs, any reference to nbb.core/*file* doesn't survive.
(ns printme
(:require [nbb.core :refer [*file*]]))
(print *file*)
npx nbb bundle printme.cljs -o printme.mjs
npx nbb printme.cljs # outputs the path to the script
node printme.mjs # outputs nil
I expected *file* to be the .mjs script's location.
I can hack around this for now of course but I thought I'd file it just in case.
- Dominant language
- Clojure
- Stars
- 972
- Forks
- 56
- Avg merge
- 1m
- Merged PRs (30d)
- 6
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from babashka/nbb
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 1/5 Under an hour Newbie friendliness 55/100
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
nextjournal/clerk#830 ·
-
IOP tokens release blocker team qa team qa autotests WG adoption
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
penpot/penpot#13540 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
izhangzhihao/intellij-rainbow-brackets#2903 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
-
Data Studio semantic layer: clicking a table or metric row only opens it when you click the namePossibly taken @sanketpatel32 claimed this 1 day ago. Open.Needs Triage .Team/UXWest Priority:P3 Type:Bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
metabase/metabase#88853 · 1 comment ·
Maintainers usually reply within 1 day