aysylu / loom

Graph library for Clojure. Mailing list https://groups.google.com/forum/#!forum/loom-clj
http://aysy.lu/loom/
886 stars 108 forks source link

Possible Clojurescript [any Long] issue #107

Open ClashTheBunny opened 5 years ago

ClashTheBunny commented 5 years ago

I did Day 6 of Advent of Code with the help of loom! Thanks so much!

I did run into an issue when I ran it in clojurescript:

=== Running clojure test aoc.y2018.d07.ClashTheBunny

Running tests in #{"src"}

Testing aoc.y2018.d07.ClashTheBunny
part-2 took 169.12 msecs
part-1 took 39.93 msecs

Ran 2 tests containing 2 assertions.
0 failures, 0 errors.

=== Running cljs test aoc.y2018.d07.ClashTheBunny
WARNING: cljs.core/bit-or, all arguments must be numbers, got [any Long] instead at line 494 cljs-test-runner-out/loom/alg_generic.cljc

Testing aoc.y2018.d07.ClashTheBunny
part-1 took 66.00 msecs

FAIL in (part-2) (cljs_test_runner.gen.js:768:286)
expected: (= (str answer-2) (str (:timer (solve-2 input 5 60))))
  actual: (not (= "891" "732"))
part-2 took 241.00 msecs

Ran 2 tests containing 2 assertions.
1 failures, 0 errors.

It passes fine in CLJ, but in cljs I get the wrong answer. I am using loom very lightly, so I doubt this is an issue with loom, but I saw the warning and figured you may want to know anyhow.

https://circleci.com/gh/borkdude/advent-of-cljc/235

ClashTheBunny commented 5 years ago

Just to follow up, I was able to make it work in clojurescript even with the warning, so the warning is 100% cosmetic for my use case.

johannesloetzsch commented 4 years ago

I just saw that this is the same issue as https://github.com/aysylu/loom/issues/124