jank-lang / jank

The native Clojure dialect hosted on LLVM
https://jank-lang.org
Mozilla Public License 2.0
1.69k stars 50 forks source link

Fix build on Mac OS #112

Closed jianlingzhong closed 1 month ago

jianlingzhong commented 1 month ago

Verified that build and test work:

❯ ./bin/test
ninja: no work to do.
Bottom of clojure.core
[doctest] doctest version is "2.4.11"
[doctest] run with "--help" for options
testing file test/jank/form/native-raw/fail-no-arg.jank => success
testing file test/jank/form/native-raw/fail-exception.jank => success
testing file test/jank/form/native-raw/fail-invalid-arg-type.jank => success
In file included from <<< inputs >>>:1:
input_line_586:8:185: error: expected ';' after expression
    8 |         jank::profile::timer __timer{ "repl_fn" };object_ptr const repl_fn{ this };object_ptr native_84{ obj::nil::nil_const() };{ object_ptr __value{ obj::nil::nil_const() };not valid C++ code;native_84 = __value; }return native_84;}};}
      |                                                                                                                                                                                         ^
      |                                                                                                                                                                                         ;
input_line_586:8:180: error: use of undeclared identifier 'valid'
    8 |         jank::profile::timer __timer{ "repl_fn" };object_ptr const repl_fn{ this };object_ptr native_84{ obj::nil::nil_const() };{ object_ptr __value{ obj::nil::nil_const() };not valid C++ code;native_84 = __value; }return native_84;}};}
      |                                                                                                                                                                                    ^
input_line_586:8:186: error: use of undeclared identifier 'C'
    8 |         jank::profile::timer __timer{ "repl_fn" };object_ptr const repl_fn{ this };object_ptr native_84{ obj::nil::nil_const() };{ object_ptr __value{ obj::nil::nil_const() };not valid C++ code;native_84 = __value; }return native_84;}};}
      |                                                                                                                                                                                          ^
error: Parsing failed.
testing file test/jank/form/native-raw/fail-compilation-error.jank => success
testing file test/jank/form/native-raw/pass-practical.jank => success
testing file test/jank/form/native-raw/interpolate/pass-symbol.jank => success
testing file test/jank/form/native-raw/interpolate/fail-invalid-code.jank => success
testing file test/jank/form/native-raw/interpolate/fail-multiple-expresssions.jank => success
testing file test/jank/form/native-raw/pass-empty-string.jank => success
testing file test/jank/form/def/pass-meta.jank => success
testing file test/jank/form/def/fail-too-many-args.jank => success
testing file test/jank/form/def/fail-qualified.jank => success
testing file test/jank/form/def/pass-docstring.jank => success
testing file test/jank/form/def/pass-practical.jank => success
testing file test/jank/form/def/pass-declare.jank => success
testing file test/jank/form/do/pass-top-level-empty.jank => success
testing file test/jank/form/do/pass-in-if.jank => success
testing file test/jank/form/do/pass-nested.jank => success
testing file test/jank/form/do/pass-top-level.jank => success
testing file test/jank/form/do/pass-fn-return-empty.jank => success
testing file test/jank/form/nil/pass-nil.jank => success
testing file test/jank/form/if/pass-non-bool-condition.jank => success
testing file test/jank/form/if/fail-extra-inputs.jank => success
testing file test/jank/form/if/pass-nested.jank => success
testing file test/jank/form/if/fail-empty.jank => success
testing file test/jank/form/if/pass-top-level.jank => success
testing file test/jank/form/if/pass-sub-expression.jank => success
testing file test/jank/form/if/pass-return-position.jank => success
testing file test/jank/form/if/pass-no-else.jank => success
testing file test/jank/form/throw/throw-nested-throws.jank => success
testing file test/jank/form/throw/fail-no-value.jank => success
testing file test/jank/form/throw/throw-top-level.jank => success
testing file test/jank/form/throw/fail-unknown-value.jank => success
testing file test/jank/form/throw/throw-return-position.jank => success
testing file test/jank/form/throw/throw-if-branch.jank => success
testing file test/jank/form/throw/throw-if-condition.jank => success
testing file test/jank/form/map/pass-homogeneous.jank => success
testing file test/jank/form/map/fail-odd.jank => success
testing file test/jank/form/map/pass-nested.jank => success
testing file test/jank/form/map/pass-empty.jank => success
testing file test/jank/form/let/binding/fail-odd.jank => success
testing file test/jank/form/let/binding/fail-qualified-symbol.jank => success
testing file test/jank/form/let/binding/pass-reference-previous.jank => success
testing file test/jank/form/let/binding/pass-shadow.jank => success
testing file test/jank/form/let/binding/pass-literal.jank => success
testing file test/jank/form/let/binding/pass-shadow-outer-scope.jank => success
testing file test/jank/form/let/binding/fail-self-reference.jank => success
testing file test/jank/form/let/binding/pass-same-name-as-param.jank => success
testing file test/jank/form/let/binding/fail-non-symbol.jank => success
testing file test/jank/form/let/pass-practical.jank => success
testing file test/jank/form/let/pass-empty.jank => success
testing file test/jank/form/try/fail-other-form-after-finally.jank => success
testing file test/jank/form/try/pass-no-throw-with-catch.jank => success
testing file test/jank/form/try/fail-no-catch.jank => success
testing file test/jank/form/try/fail-multiple-catch.jank => success
testing file test/jank/form/try/pass-unboxed-position.jank => success
testing file test/jank/form/try/pass-expression-no-throw.jank => success
testing file test/jank/form/try/pass-no-value-from-finally.jank => success
testing file test/jank/form/try/pass-catch-returns-exception.jank => success
testing file test/jank/form/try/fail-catch-after-finally.jank => success
testing file test/jank/form/try/pass-nested.jank => success
testing file test/jank/form/try/fail-multiple-finally.jank => success
testing file test/jank/form/try/fail-recur-in-try.jank => success
testing file test/jank/form/try/pass-no-throw-with-catch-and-finally.jank => success
testing file test/jank/form/try/fail-recur-in-finally.jank => success
testing file test/jank/form/try/fail-recur-in-catch.jank => success
testing file test/jank/form/try/pass-expression-with-throw.jank => success
testing file test/jank/form/fn/arity/fail-duplicate.jank => success
testing file test/jank/form/fn/arity/pass-immediate-call.jank => success
testing file test/jank/form/fn/arity/variadic/fail-param-after-rest.jank => success
testing file test/jank/form/fn/arity/variadic/pass-packing-exceeds-max-params.jank => success
testing file test/jank/form/fn/arity/variadic/pass-with-fixed-arities.jank => success
testing file test/jank/form/fn/arity/variadic/fail-multiple-variadic-arities.jank => success
testing file test/jank/form/fn/arity/variadic/fail-nothing-after-ampersand.jank => success
testing file test/jank/form/fn/arity/variadic/fail-packing-exceeds-max-params-but-not-variadic.jank => success
testing file test/jank/form/fn/arity/variadic/fail-multiple-adjacent-ampersands.jank => success
testing file test/jank/form/fn/arity/variadic/pass-ambiguous.jank => success
testing file test/jank/form/fn/arity/variadic/fail-same-position-as-fixed.jank => success
testing file test/jank/form/fn/arity/variadic/pass-dynamic.jank => success
testing file test/jank/form/fn/arity/variadic/pass-position-0.jank => success
testing file test/jank/form/fn/arity/pass-multiple.jank => success
testing file test/jank/form/fn/arity/fail-invalid-arity-wrapper-type.jank => success
testing file test/jank/form/fn/arity/pass-single-wrapped.jank => success
testing file test/jank/form/fn/closure/pass-multiple-arities-using-captures.jank => success
testing file test/jank/form/fn/closure/pass-nested-fn-skip-level.jank => success
testing file test/jank/form/fn/closure/pass-nested-fn.jank => success
testing file test/jank/form/fn/fail-missing-params.jank => success
testing file test/jank/form/fn/fail-too-many-params.jank => success
testing file test/jank/form/fn/fail-too-many-names.jank => success
testing file test/jank/form/fn/pass-params-with-same-name.jank => success
testing file test/jank/form/fn/recur/fail-recur-within-recur.jank => success
testing file test/jank/form/fn/recur/pass-in-if-do.jank => success
testing file test/jank/form/fn/recur/pass-variadic-position-0.jank => success
testing file test/jank/form/fn/recur/pass-variadic-position-1.jank => success
testing file test/jank/form/fn/recur/fail-invalid-arity-fixed.jank => success
testing file test/jank/form/fn/recur/fail-outside-of-fn-unary.jank => success
testing file test/jank/form/fn/recur/fail-not-tail-in-body.jank => success
testing file test/jank/form/fn/recur/fail-invalid-arity-variadic.jank => success
testing file test/jank/form/fn/recur/fail-not-fail-in-if-do.jank => success
testing file test/jank/form/fn/recur/fail-outside-of-fn-nullary.jank => success
testing file test/jank/form/fn/recur/pass-countdown.jank => success
testing file test/jank/form/fn/fail-just-fn.jank => success
testing file test/jank/form/fn/fail-not-all-params-symbols.jank => success
testing file test/jank/form/fn/named-recur/pass-recur-from-closure.jank => success
testing file test/jank/form/fn/named-recur/pass-same-name-param.jank => success
testing file test/jank/form/fn/named-recur/pass-practical.jank => success
testing file test/jank/form/fn/pass-named.jank => success
testing file test/jank/form/fn/fail-qualified-param.jank => success
testing file test/jank/form/fn/fail-named-not-symbol.jank => success
testing file test/jank/form/fn/pass-empty.jank => success
testing file test/jank/form/set/pass-literal-with-quoted-item.jank => success
testing file test/jank/form/vector/pass-literal-with-quoted-item.jank => success
testing file test/jank/form/loop/recur/fail-recur-within-recur.jank => success
testing file test/jank/form/loop/recur/pass-in-if-do.jank => success
testing file test/jank/form/loop/recur/fail-invalid-arity-fixed.jank => success
testing file test/jank/form/loop/recur/fail-not-tail-in-body.jank => success
testing file test/jank/form/loop/recur/fail-not-fail-in-if-do.jank => success
testing file test/jank/form/loop/recur/pass-countdown.jank => success
testing file test/jank/form/loop/pass-count.jank => success
testing file test/jank/form/loop/pass-as-let.jank => success
testing file test/jank/form/loop/binding/fail-odd.jank => success
testing file test/jank/form/loop/binding/fail-qualified-symbol.jank => success
testing file test/jank/form/loop/binding/pass-reference-previous.jank => success
testing file test/jank/form/loop/binding/pass-shadow.jank => success
testing file test/jank/form/loop/binding/pass-literal.jank => success
testing file test/jank/form/loop/binding/pass-shadow-outer-scope.jank => success
testing file test/jank/form/loop/binding/fail-self-reference.jank => success
testing file test/jank/form/loop/binding/fail-non-symbol.jank => success
testing file test/jank/form/loop/pass-practical.jank => success
testing file test/jank/form/loop/pass-empty.jank => success
testing file test/jank/var/ref/pass-qualified.jank => success
testing file test/jank/var/ref/pass-unqualified.jank => success
testing file test/jank/var/ref/fail-missing-qualified.jank => success
testing file test/jank/var/ref/fail-missing-unqualified.jank => success
testing file test/jank/var/deref/pass-qualified.jank => success
testing file test/jank/var/deref/pass-unqualified.jank => success
testing file test/jank/var/deref/fail-missing-qualified.jank => success
testing file test/jank/var/deref/fail-missing-unqualified.jank => success
testing file test/jank/syntax-quote/pass-unaffected.jank => success
testing file test/jank/syntax-quote/pass-namespace-resolution.jank => success
testing file test/jank/syntax-quote/unquote-splice/fail-no-quote.jank => success
testing file test/jank/syntax-quote/unquote-splice/pass-body.jank => success
testing file test/jank/syntax-quote/unquote-splice/fail-not-in-seq.jank => success
testing file test/jank/syntax-quote/unquote-splice/pass-values.jank => success
testing file test/jank/syntax-quote/pass-adjacent.jank => success
testing file test/jank/syntax-quote/unquote/fail-no-quote.jank => success
testing file test/jank/syntax-quote/unquote/pass-quote.jank => success
testing file test/jank/syntax-quote/unquote/pass-value.jank => success
testing file test/jank/syntax-quote/fail-no-value.jank => success
testing file test/jank/syntax-quote/pass-gensym.jank => success
testing file test/jank/call/pass-literal.jank => success
testing file test/jank/call/fail-nil.jank => success
testing file test/jank/call/fail-incorrect-arity.jank => success
testing file test/jank/call/pass-empty.jank => success
testing file test/jank/reader-macro/var-quote/fail-eof.jank => success
testing file test/jank/reader-macro/var-quote/fail-unresolved.jank => success
testing file test/jank/reader-macro/var-quote/pass-qualified.jank => success
testing file test/jank/reader-macro/var-quote/fail-not-a-symbol.jank => success
testing file test/jank/reader-macro/var-quote/pass-unqualified.jank => success
testing file test/jank/reader-macro/function/fail-nested.jank => success
testing file test/jank/reader-macro/function/pass-syntax-quote.jank => success
testing file test/jank/reader-macro/function/fail-eof.jank => success
testing file test/jank/reader-macro/function/fail-%5.5.jank => success
testing file test/jank/reader-macro/function/pass-variadic.jank => success
testing file test/jank/reader-macro/function/pass-single-percent.jank => success
testing file test/jank/reader-macro/function/fail-too-many-args.jank => success
testing file test/jank/reader-macro/function/pass-fixed-args.jank => success
testing file test/jank/reader-macro/function/pass-empty.jank => success
testing file test/jank/reader-macro/function/fail-%0.jank => success
testing file test/jank/reader-macro/function/fail-%foo.jank => success
testing file test/jank/metadata/pass-meta.jank => success
testing file test/jank/metadata/pass-hint.jank => success
testing file test/jank/metadata/fail-with-meta-not-metadatable.jank => success
testing file test/jank/metadata/pass-with-meta.jank => success
tested 174 jank files
===============================================================================
[doctest] test cases:  41 |  41 passed | 0 failed | 0 skipped
[doctest] assertions: 636 | 636 passed | 0 failed |
[doctest] Status: SUCCESS!
jianlingzhong commented 1 month ago

Code changes were referenced from https://github.com/jank-lang/jank/pull/111 with some editions.