This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-02
Channels
- # babashka (117)
- # babashka-sci-dev (6)
- # beginners (34)
- # biff (2)
- # calva (7)
- # clj-kondo (27)
- # clojure (6)
- # clojure-dev (8)
- # clojure-europe (41)
- # clojure-israel (1)
- # clojure-nl (1)
- # clojure-norway (2)
- # clojure-uk (1)
- # clojurescript (22)
- # cursive (3)
- # datascript (12)
- # dev-tooling (4)
- # emacs (13)
- # hyperfiddle (60)
- # introduce-yourself (8)
- # joyride (9)
- # lsp (46)
- # malli (3)
- # mranderson (75)
- # off-topic (40)
- # pathom (9)
- # pedestal (4)
- # reagent (11)
- # reitit (18)
- # releases (2)
- # shadow-cljs (81)
- # squint (18)
I’m running a clojure.test test with bb, and getting a failure which is a sci exception. I am not understanding what the exception is being caused by. Any hints? https://gist.github.com/hugoduncan/dbd05c7a1cba78651a81d43bc4dd9a64
Happy new year! Great to see you back here.
Caused by: java.lang.NoSuchFieldException: ns
This error is usually caused by some lower level code which tries to print a namespace as a symbol, which you can nowadays just do using (symbol *ns*)
instead of (.ns whatever)
ok, the “ns” exception message from sci was causing me to wonder if this was some sort of sci internal issue
I guess Clojure doesn't have a nice way to get the namespace from a var without using Java interop
I’m interning vars for *compile-path*
and `*compiler-options*`, which could be part of the issue
In some cases it can... is it possible to make a clojure.test repro with this pretty bad internal stack trace leaking out?
I’m trying to update tools.bbuild to latest tolos.build, so I could PR that - would that be ok as a repro?
it’s on the update-to-tools-build-0.9.0
branch of tools.bbuild. You’ll need the PR version of tools-deps-native.
the linux PR is failing for a different unrelated reason I think it can be fixed by copying this file to the repo: https://github.com/babashka/babashka/blob/master/script/setup-musl
ok. perhaps the error is related to the s3 client, e.g. https://github.com/clojure/tools.deps.alpha/commit/f97452b478775796967baa17b2d5b9a5f660556e The changes over the past year, introduced quite some requiring-resolve which is terrible with graalvm native image
I think it's safest to update tools deps alpha to a version which is closer to the one before (or git/sha) so we can detect better where problems are coming from
@U0HFRSY0M What bb version are you using?
This is what I'm seeing with the last bb from homebrew: https://gist.github.com/borkdude/978f4336daf5879c22b131f4ce7dc9fe
I'm trying to push a branch, but it fails on trying to clone: git fetch --force origin +refs/heads/hugoduncan-update-to-tools-deps-latest:refs/remotes/origin/hugoduncan-update-to-tools-deps-latest
I wanted to ensure that the latest bb is used there since I see an acceptable error message locally
and xcode was necessary to update since 12.0.0 isn't supported, it just didn't run anymore
that error comes from the test using the babashka branch, which is still on tools.deps.alpha, vs the PR which is using my branch of tools.bbuild, updated to use tools.deps
$ git pull [email protected]:hugoduncan/tools-deps-native-experiment.git update-to-tools-deps-latest
From
* branch update-to-tools-deps-latest -> FETCH_HEAD
Already up to date.
O wait, it already has this?
(do (shell "git clone ")
(shell {:dir "tools.bbuild"} "git checkout update-to-tools-build-0.9.0"))
@U0HFRSY0M Does this output make more sense to you? https://gist.github.com/borkdude/978f4336daf5879c22b131f4ce7dc9fe
this is the change I made: https://github.com/babashka/babashka/commit/fc2762bdd2cfe23ed2acbd8c5b784bede3b3c0a2
ahh - I am still trying to understand the new trace. an exception message of “clojure.core/vec” doesn’t say much to me, and the line numbers in the stack trace don’t seem to point to the actual problem.
summary of current state:
the error seems to be caused by the attempt to intern *compile-path*
and *compiler-options*
. Also the tools.build tests user reader-conditional
which is unavailable in bb.
any workarounds for either of the above?
The intern hacks are I think what you needed, but the ns needs to be a real namespace object, not a symbol. I fixed this in the branch
And I also added reader-conditional
to SCI + bb master. I used --dev-build
to install the babashka dev build in CI
For testing locally, you can install the bb from master using:
bash <(curl -s ) --dir $(pwd) --dev-build
Now we're getting somewhere I think: https://app.circleci.com/pipelines/github/babashka/tools-deps-native/102/workflows/6798a7c9-700e-4e13-815f-59596ce4525f/jobs/237
I'm getting:
Ran 33 tests containing 95 assertions.
0 failures, 5 errors.
which is slightly better than before, I hope...So one thing is:
Unable to resolve classname: org.eclipse.aether.artifact.DefaultArtifact
I pushed a more-or-less fix to update-to-tools-build-0.9.0
for the compile script. The vars were printed wrong and the .ns
field was used to obtain the namespace name which you can't do in SCI right now
So now we're just left with:
FAIL in (test-compile) (/Users/borkdude/dev/tools.bbuild/src/test/clojure/clojure/tools/build/tasks/test_compile_clj.clj:17)
expected: (true? (.exists (jio/file (project-path "target/classes/foo/bar.class"))))
actual: (not (true? false))
Ahj, I found another issue. pprint-ing a var in SCI doesn't work properly $ bb -e "(clojure.pprint/pprint #'inc)" #<Var@3d01336f: #object[clojure.core$inc 0x69addece "clojure.core$inc@69addece"]>
Tests work now: https://app.circleci.com/pipelines/github/babashka/tools-deps-native/105/workflows/2a432a3c-091b-4947-93c3-3d8b5a9b3dce/jobs/243
did you force push this branch maybe...? https://github.com/babashka/tools.bbuild/tree/update-to-tools-build-0.9.0
woops, looks like I pushed instead of pulling. Hopefully you still have the branch locally
I want to use it with my makejack project. I also thought that a bb script to invoke a project’s (tools.build based) build scripts would be useful.
Basically trying to make it easy to run tools.build based tooling with babashka. Something of a complement to the babashka first approach provided by babashka tasks.
ok, released tools-deps-native v0.1.0 here https://github.com/babashka/tools-deps-native