Skip to content
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

Graph transpose does not work correctly in ClojureScript #131

Open
kelvinqian00 opened this issue Feb 1, 2021 · 0 comments
Open

Graph transpose does not work correctly in ClojureScript #131

kelvinqian00 opened this issue Feb 1, 2021 · 0 comments

Comments

@kelvinqian00
Copy link

kelvinqian00 commented Feb 1, 2021

Description: When calling graph/transpose in compiled ClojureScript, it returns a nil value for :adj. For example:

(def g (-> graph/digraph (graph/add-edges ["foo" "bar"]))
=> {:nodeset #{"foo" "bar"}, :adj {"foo" #{"bar"}, "bar" #{"foo"}}, :in {"bar" #{"foo"}, "foo" #{"bar"}}}
(graph/transpose g)
=> {:nodeset #{"foo" "bar"}, :adj nil, :in {"foo" #{"bar"}, "bar" #{"foo"}}}

For some reason, this bug does not appear in Clojure, nor when I run ClojureScript on a REPL.

For reproduction purposes, here is part of my deps.edn file:

{:paths ["resources" "src"]
 :deps  {org.clojure/clojure    {:mvn/version "RELEASE"}
         cider/piggieback       {:mvn/version "0.5.2"}
         aysylu/loom            {:mvn/version "1.0.2"}
 :aliases
 {:test
  {:extra-paths ["test"]}
  :runner
  {:extra-deps {com.cognitect/test-runner ;; Latest commit: 9/30/20
                {:git/url "https://github.com/cognitect-labs/test-runner"
                 :sha     "b6b3193fcc42659d7e46ecd1884a228993441182"}}
   :main-opts  ["-m" "cognitect.test-runner" "-d" "test"]}
  :runner-cljs
  {:extra-deps {olical/cljs-test-runner {:mvn/version "3.8.0"}}
   :main-opts ["-m" "cljs-test-runner.main" "-d" "test" "-c" "build.edn"]}}
 :mvn/repos {"jitpack" {:url "https://jitpack.io"}}}

where build.edn is:

{
 :install-deps true
 :target       :nodejs
 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant