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

can't use ubergraph (exception thrown on startup) #36

Open
boxxxie opened this issue Jul 22, 2023 · 6 comments
Open

can't use ubergraph (exception thrown on startup) #36

boxxxie opened this issue Jul 22, 2023 · 6 comments

Comments

@boxxxie
Copy link

boxxxie commented Jul 22, 2023

./clojure/deps.edn

:aliases {
           :clograms {
                      :extra-deps {
                                   ;; code base doc/viewer
                                   ;; https://github.com/jpmonettas/clograms
                                   ;; clj -Sforce -M:clograms -m clograms.server --platform clj clojure-project-folder
                                   com.github.jpmonettas/clograms {:mvn/version "0.1.141"}
                                   }
                      }
}

project deps.edn
ubergraph/ubergraph {:mvn/version "0.8.2"}

command clj -Sforce -M:clograms -m clograms.server --platform clj .

Exception in thread "main" Syntax error compiling at (ubergraph/core.clj:963:44).
        at clojure.lang.Compiler.analyze(Compiler.java:6825)
        at clojure.lang.Compiler.analyze(Compiler.java:6762)
        at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3832)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7126)
        at clojure.lang.Compiler.analyze(Compiler.java:6806)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7112)
        at clojure.lang.Compiler.analyze(Compiler.java:6806)
        at clojure.lang.Compiler.analyze(Compiler.java:6762)
        at clojure.lang.Compiler$IfExpr$Parser.parse(Compiler.java:2841)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7124)
        at clojure.lang.Compiler.analyze(Compiler.java:6806)
        at clojure.lang.Compiler.access$300(Compiler.java:38)
        at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6401)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7124)
        at clojure.lang.Compiler.analyze(Compiler.java:6806)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7112)
        at clojure.lang.Compiler.analyze(Compiler.java:6806)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7112)
        at clojure.lang.Compiler.analyze(Compiler.java:6806)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7112)
        at clojure.lang.Compiler.analyze(Compiler.java:6806)
        at clojure.lang.Compiler.analyze(Compiler.java:6762)
        at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6137)
        at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6453)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7124)
        at clojure.lang.Compiler.analyze(Compiler.java:6806)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7112)
        at clojure.lang.Compiler.analyze(Compiler.java:6806)
        at clojure.lang.Compiler.analyze(Compiler.java:6762)
        at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6137)
        at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6453)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7124)
        at clojure.lang.Compiler.analyze(Compiler.java:6806)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7112)
        at clojure.lang.Compiler.analyze(Compiler.java:6806)
        at clojure.lang.Compiler.analyze(Compiler.java:6762)
        at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6137)
        at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5479)
        at clojure.lang.Compiler$FnExpr.parse(Compiler.java:4041)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7122)
        at clojure.lang.Compiler.analyze(Compiler.java:6806)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7112)
        at clojure.lang.Compiler.analyze(Compiler.java:6806)
        at clojure.lang.Compiler.access$300(Compiler.java:38)
        at clojure.lang.Compiler$DefExpr$Parser.parse(Compiler.java:596)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7124)
        at clojure.lang.Compiler.analyze(Compiler.java:6806)
        at clojure.lang.Compiler.analyze(Compiler.java:6762)
        at clojure.lang.Compiler.eval(Compiler.java:7198)
        at clojure.lang.Compiler.load(Compiler.java:7653)
        at clojure.lang.RT.loadResourceScript(RT.java:381)
        at clojure.lang.RT.loadResourceScript(RT.java:372)
        at clojure.lang.RT.load(RT.java:459)
        at clojure.lang.RT.load(RT.java:424)
        at clojure.core$load$fn__6908.invoke(core.clj:6161)
        at clojure.core$load.invokeStatic(core.clj:6160)
        at clojure.core$load.doInvoke(core.clj:6144)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.core$load_one.invokeStatic(core.clj:5933)
        at clojure.core$load_one.invoke(core.clj:5928)
        at clojure.core$load_lib$fn__6850.invoke(core.clj:5975)
        at clojure.core$load_lib.invokeStatic(core.clj:5974)
        at clojure.core$load_lib.doInvoke(core.clj:5953)
        at clojure.lang.RestFn.applyTo(RestFn.java:142)
        at clojure.core$apply.invokeStatic(core.clj:669)
        at clojure.core$load_libs.invokeStatic(core.clj:6016)
        at clojure.core$load_libs.doInvoke(core.clj:6000)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invokeStatic(core.clj:669)
        at clojure.core$require.invokeStatic(core.clj:6038)
        at clojure.core$require.doInvoke(core.clj:6038)
        at clojure.lang.RestFn.invoke(RestFn.java:3894)
        at nvestiv.config.core$eval7499$loading__6789__auto____7500.invoke(core.clj:1)
        at nvestiv.config.core$eval7499.invokeStatic(core.clj:1)
        at nvestiv.config.core$eval7499.invoke(core.clj:1)
        at clojure.lang.Compiler.eval(Compiler.java:7194)
        at clojure.lang.Compiler.eval(Compiler.java:7183)
        at clojure.lang.Compiler.load(Compiler.java:7653)
        at clojure.lang.RT.loadResourceScript(RT.java:381)
        at clojure.lang.RT.loadResourceScript(RT.java:372)
        at clojure.lang.RT.load(RT.java:459)
        at clojure.lang.RT.load(RT.java:424)
        at clojure.core$load$fn__6908.invoke(core.clj:6161)
        at clojure.core$load.invokeStatic(core.clj:6160)
        at clojure.core$load.doInvoke(core.clj:6144)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.core$load_one.invokeStatic(core.clj:5933)
        at clojure.core$load_one.invoke(core.clj:5928)
        at clojure.core$load_lib$fn__6850.invoke(core.clj:5975)
        at clojure.core$load_lib.invokeStatic(core.clj:5974)
        at clojure.core$load_lib.doInvoke(core.clj:5953)
        at clojure.lang.RestFn.applyTo(RestFn.java:142)
        at clojure.core$apply.invokeStatic(core.clj:669)
        at clojure.core$load_libs.invokeStatic(core.clj:6016)
        at clojure.core$load_libs.doInvoke(core.clj:6000)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invokeStatic(core.clj:669)
        at clojure.core$require.invokeStatic(core.clj:6038)
        at clojure.core$require.doInvoke(core.clj:6038)
        at clojure.lang.RestFn.invoke(RestFn.java:3894)
        at user$eval140$loading__6789__auto____141.invoke(user.clj:1)
        at user$eval140.invokeStatic(user.clj:1)
        at user$eval140.invoke(user.clj:1)
        at clojure.lang.Compiler.eval(Compiler.java:7194)
        at clojure.lang.Compiler.eval(Compiler.java:7183)
        at clojure.lang.Compiler.load(Compiler.java:7653)
        at clojure.lang.RT.loadResourceScript(RT.java:381)
        at clojure.lang.RT.loadResourceScript(RT.java:368)
        at clojure.lang.RT.maybeLoadResourceScript(RT.java:364)
        at clojure.lang.RT.doInit(RT.java:486)
        at clojure.lang.RT.init(RT.java:467)
        at clojure.main.main(main.java:38)
Caused by: java.lang.RuntimeException: No such var: d/save!
        at clojure.lang.Util.runtimeException(Util.java:221)
        at clojure.lang.Compiler.resolveIn(Compiler.java:7405)
        at clojure.lang.Compiler.resolve(Compiler.java:7375)
        at clojure.lang.Compiler.analyzeSymbol(Compiler.java:7336)
        at clojure.lang.Compiler.analyze(Compiler.java:6785)
        ... 111 more

i did have code that was actually making a .dot of my clojure dep tree, that file was being pointed at in the initial exceptions. i commented out all the code in that file. still got error.

i then removed ubergraph from my code completely, including deps.

Downloading: ubergraph/ubergraph/0.8.1/ubergraph-0.8.1.pom from clojars
Downloading: ubergraph/ubergraph/0.8.1/ubergraph-0.8.1.jar from clojars

running the program again downloaded a different ubergraph (i'm guessing one of the deps in this codebase is using ubergraph).
the same exception persists.
i missed some ubergraph requires (not using, just ns required uber)
removing all ubergraph refs in my code lead to clograms starting, or getting closer to starting, my tools.namespace deps is now causing problems

this is a bit funny, ubergraph is pretty handy for solving some of my problems. it would be nice to not have to remove it from my code base to use this cool documentation tool

@boxxxie boxxxie changed the title conflict with ubergraph (exception on startup) can't use ubergraph (exception thrown on startup) Jul 22, 2023
@jpmonettas
Copy link
Owner

Interesting, I'll take a look. Thanks for reporting it!

@boxxxie
Copy link
Author

boxxxie commented Jul 23, 2023

i'll post another issue after this one is fixed, cus i'm getting exceptions for my use of tools.namespace as well. maybe fixing this will also fix that

@jpmonettas
Copy link
Owner

jpmonettas commented Jul 24, 2023

Ok, I just got to try this but wasn't able to reproduce the issue, so still not sure.
This is what I tried, created a empty project with a deps.edn like this :

{:paths ["src"]
 :deps {ubergraph/ubergraph {:mvn/version "0.8.2"}}
 :aliases {:clograms {:extra-deps {com.github.jpmonettas/clograms {:mvn/version "0.1.141"}}
                      :main-opts ["-m" "clograms.server" "--platform" "clj" "."]}}}

and then run clj -M:clograms

Didn't see any exceptions.

latest-screenshot

Do you have the possibility to share your repo or something I could try to reproduce the issue?

@jpmonettas
Copy link
Owner

Regarding tools.namespace yeah, that is an issue that I'll address soon. The thing is that currently Clograms uses a patched version of tools.namespace, so if you use tools.namespace in your project it should show a message on the console that tells you to remove your version for creating the diagram.This is annoying and I'll revisit it soon, but it is a known issue.

@boxxxie
Copy link
Author

boxxxie commented Jul 24, 2023

I'll investigate further.
maybe tools.namespace is the issue all along. i'll play around with my project a bit on the weekend to see if i can make progress with it using this tool

@jpmonettas
Copy link
Owner

@boxxxie sure, I'm on Clojurians slack under the same handle if you want to troubleshoot something a little faster.

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

2 participants