-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
clojure.test #200
base: main
Are you sure you want to change the base?
clojure.test #200
Conversation
268b007
to
5d5447f
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #200 +/- ##
==========================================
- Coverage 58.55% 58.37% -0.19%
==========================================
Files 158 159 +1
Lines 19587 19936 +349
==========================================
+ Hits 11470 11637 +167
- Misses 8117 8299 +182 ☔ View full report in Codecov by Sentry. |
@@ -4094,7 +4094,7 @@ | |||
c. Returns true or false" | |||
[c x] | |||
;; (. c (isInstance x)) | |||
(throw "TODO: port")) | |||
(throw "TODO: port instance?")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fine to change all of these, but it wasn't needed to find your error. For that, I'd just hop into gdb and tell it to stop when an exception is thrown.
gdb --args ./build/jank run foo.jank
> catch throw
> run
... wait for an exception to be thrown and gdb will stop ...
> backtrace
... see where you are ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha, so (byte 1)
will give #2 0x00007fffe8df885d in clojure_core_byte_3074_1 ()
.
Very instructive thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not quite. clojure_core_byte_3074_1
means clojure.core/byte <gensym count> <arity 1>
. This is for the function itself, not a call to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I pointed it out because AFAICT this is the only frame that gives a hint of which function needs implementing. Is there a way to configure source mapping? e.g.,
;;foo.jank
(ns foo)
(defn -main [] (byte 1))
#8 0x00007ffff33850e0 in foo.main_1_0 >>here>> at foo.jank:2 <<here<< ()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There will be, but it's a large feature which involves a lot of LLVM IR work. Perhaps I know the right guy for it, though. I'll reach out to him.
Putting this back to draft actually, |
Opened and worked around #237 WDYT about the approach here of gradually adding the clojure-test suite? Just requires a deps.edn to be added to clojure-test: |
I think we can gradually add for now, but note that the clojure-test suite is specifically designed to support missing vars. It will skip them. So, we should just Syntactically, I think the only thing we're missing is big number support. Will need to get someone on that. |
Workarounds noted in comment at the top of
clojure/test.jank
.Needed
clojure.core/ns-interns
from clojure.core, but I had to add the function name to every(throw "TODO: port")
statement to figure that out.