ClojureScript namespaces missing from required deps in .cljs files loaded via `:require-cljs`
@borkdude is already working on this.
Since Oct 21, 2024.
Assessment
This issue has not been assessed yet.
Description
Since the most recent version it is possible to load .cljs files from Clerk viewers using :require-cljs true. This works fine, but when I try to require a library in such a file (added in my deps.edn), several namespaces normally included in ClojureScript are reported missing: "Could not find source for CLJS namespace x"
When testing it with a library of my own[1], the following namespaces are missing:
- cljs.core
- clojure.math
- clojure.pprint
- clojure.spec.alpha
- clojure.spec.gen.alpha
- goog (yeah, just "goog")
- goog.math.Long
In our discussion on Clojurians Slack yesterday, @mk added clojure.math: https://github.com/nextjournal/clerk/commit/319c00221862ee3fb975a3b75bdc1d6b5d9e0754 which worked fine when I tested it. Maybe the other namespaces can also be added to increase compatibility?
Here is a test repo with my library as a dependency to reproduce the issue: https://github.com/formsandlines/clerk-cljs-test If all namespaces are included, the test-viewer in notebooks/index.clj using the render-test function from src/render.cljs should display :I without any errors.
[1]: https://clojars.org/eu.formsandlines/formform (works both in clj and cljs) - I would like to render some visualizations I created as web components that need functions from that lib, so I hope to get it working there
- Dominant language
- Clojure
- Stars
- 2.1k
- Forks
- 87
- Avg merge
- 3m
- Merged PRs (30d)
- 2
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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 nextjournal/clerk
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
nextjournal/clerk#830 ·
-
Build with ssr failsOpen
Difficulty 3/5 Half a day Newbie friendliness 55/100
nextjournal/clerk#831 ·
-
Cross-Site WebSocket Hijacking in the dev server's /_ws endpoint leads to arbitrary code executionOpen
Difficulty 3/5 1-2 days Newbie friendliness 45/100
nextjournal/clerk#825 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
nextjournal/clerk#818 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
nextjournal/clerk#807 ·
All issues in nextjournal/clerk
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
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