Git Product home page Git Product logo

Comments (14)

mhuebert avatar mhuebert commented on July 30, 2024 2

I can confirm that updating spyscope to 0.1.5 fixed my error. Thank you to all.

from chestnut.

natew avatar natew commented on July 30, 2024

I'm also seeing some problems, but coming up differently. For some reason it runs on port 3449:

lein figwheel
Compiling ClojureScript.
Figwheel: Starting server at http://localhost:3449
Figwheel: Serving files from '(dev-resources|resources)/public'
Compiling "resources/public/app.js" from ["src/cljs"]...
WARNING: Use of undeclared Var cljs.core.async/do-alts at line 62 file:/Users/nw/.m2/repository/org/clojure/core.async/0.1.278.0-76b25b-alpha/core.async-0.1.278.0-76b25b-alpha.jar!/cljs/core/async/impl/ioc_helpers.cljs
WARNING: Bad method signature in protocol implementation impl/Handler lock-id at line 214 file:/Users/nw/.m2/repository/org/clojure/core.async/0.1.278.0-76b25b-alpha/core.async-0.1.278.0-76b25b-alpha.jar!/cljs/core/async.cljs
WARNING: Use of undeclared Var cljs.core.async.impl.protocols/lock-id at line 217 file:/Users/nw/.m2/repository/org/clojure/core.async/0.1.278.0-76b25b-alpha/core.async-0.1.278.0-76b25b-alpha.jar!/cljs/core/async.cljs
WARNING: Bad method signature in protocol implementation impl/Handler lock-id at line 214 resources/public/out/cljs/core/async.cljs
WARNING: Use of undeclared Var cljs.core.async.impl.protocols/lock-id at line 217 resources/public/out/cljs/core/async.cljs
Successfully compiled "resources/public/app.js" in 24.134 seconds.
notifying browser that file changed:  /app.js
notifying browser that file changed:  /out/goog/deps.js
notifying browser that file changed:  /out/chesttest2/core.js
notifying browser that file changed:  /out/chesttest2/dev.js

And when I load localhost:3449 it gives me Page Not Found

from chestnut.

plexus avatar plexus commented on July 30, 2024

@natew the figwheel server is different from the web server serving the web app. The former runs on 3449 and is started with lein figwheel, the latter is started by running (run) in a repl and runs on 10555. Please check the README of the generated project for more details.

@mhuebert not sure what the issue is. Does your repl start in the right namespace (project-name.server)? If not try switching namespaces or doing a fully qualified (project-name.server/run). Are you running lein repl in a shell, or running a repl inside emacs or something? Emacs's CIDER seems to not always respect the repl initial namespace declaration in project.clj. Make sure you're on the latest version if that's what you use.

It seems someone else also came across the in-seconds error. Did you add extra dependencies? Mayeb in your ~/.lein/profiles.clj? see https://groups.google.com/forum/#!topic/ring-clojure/UtCclmV0ToM

from chestnut.

plexus avatar plexus commented on July 30, 2024

Closing this now. Feel free to reopen if this is still an issue.

from chestnut.

johnthethird avatar johnthethird commented on July 30, 2024

FYI I had this same in-seconds error, and my ~/.lein/profiles.clj looked like this

{:user {:dependencies [[org.clojure/tools.namespace "0.2.3"]
                       [spyscope "0.1.3"]
                       [org.clojars.gjahad/debug-repl "0.3.3"]]
        :injections [(require 'alex-and-georges.debug-repl)
                     (require '(clojure.tools.namespace repl find))
                     #_(vinyasa.inject/inject 'clojure.core '>' [[alex-and-georges.debug-repl debug-repl]])
                     (try (require 'spyscope.core)
                       (catch RuntimeException e))]
        :plugins [[lein-pprint "1.1.1"]
                  [lein-gorilla "0.1.2"]]}}

Once I removed that Chestnut started up fine.

from chestnut.

plexus avatar plexus commented on July 30, 2024

@johnthethird would you be interested in tracking this down a bit more? It would be great if you could try to find a minimal profiles.clj that still causes this error.

from chestnut.

johnthethird avatar johnthethird commented on July 30, 2024

The problem has to do with spyscope requiring an out of date version of clj-time. With a minimal ~/.lein/profiles.clj of this

{:user {:dependencies [[spyscope "0.1.4"]]}}

then lein repl gives the #<CompilerException java.lang.IllegalAccessError: in-seconds does not exist, compiling:(ring/middleware/cookies.clj:1:1)> error.

Running lein deps :tree also notes this conflict, among lots of others.

(...snip...)
[spyscope "0.1.4"] -> [clj-time "0.5.0"]
 overrides
[ring "1.3.1"] -> [ring/ring-jetty-adapter "1.3.1"] -> [ring/ring-core "1.3.1"] -> [clj-time "0.6.0"]
 and
[ring "1.3.1"] -> [ring/ring-devel "1.3.1"] -> [ring/ring-core "1.3.1"] -> [clj-time "0.6.0"]
 and
[compojure "1.2.0"] -> [ring/ring-core "1.3.1"] -> [clj-time "0.6.0"]
 and
[ring "1.3.1"] -> [ring/ring-core "1.3.1"] -> [clj-time "0.6.0"]

Consider using these exclusions:
[ring "1.3.1" :exclusions [clj-time]]
[ring "1.3.1" :exclusions [clj-time]]
[compojure "1.2.0" :exclusions [clj-time]]
[ring "1.3.1" :exclusions [clj-time]]
(...snip..)

from chestnut.

plexus avatar plexus commented on July 30, 2024

Does it help to add [clj-time "0.6.0"] in your project.clj dependencies?

from chestnut.

plexus avatar plexus commented on July 30, 2024

This should go away with the next release of spyscope, see dgrnbrg/spyscope#15

from chestnut.

plexus avatar plexus commented on July 30, 2024

Spyscope 0.1.5 has been released, I've confirmed this makes the issue go away.

from chestnut.

 avatar commented on July 30, 2024

I am also having this same problem, but I am not using spyscope:

CompilerException java.lang.RuntimeException: Unable to resolve symbol: run in this context,

In my case, the error started when I made my ~/.lein/profiles.clj look like this:

https://github.com/clojure-emacs/example-config/blob/master/profiles_sample.clj

I just added the refactor-nrepl and the errors started. Note that this profiles.clj example is an official recommendation from the clojure-emacs team.

My profiles.clj in .lein looks exactly like the sample.

from chestnut.

plexus avatar plexus commented on July 30, 2024

Do you also get the in-seconds error?

Do a lein deps :tree and you should see which offender is pulling in the outdated clj-time. This really is an upstream issue. We can't guarantee compatibility with every lib out there, especially not for outdated versions.

from chestnut.

 avatar commented on July 30, 2024

I do not get an in-seconds error.

from chestnut.

plexus avatar plexus commented on July 30, 2024

In that case your problem is probably unrelated to the one reported here. Anything that causes compilation or loading of your-project.server to fail would show the same symptom of run not being defined.

Do you see any other warnings or errors?

Could you please file a new issue? Include the link to your profiles.clj, the output of lein clean ; lein repl, and the version of chestnut you're using.

from chestnut.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.