Coder Social home page Coder Social logo

Comments (11)

yogthos avatar yogthos commented on June 18, 2024

So, if you're runing lein figwheel then you do not need to run (browser-repl) manually. The REPL workflow is for using something like Emacs where you would start up a REPL and and then hook up the browser REPL from there.

I recommend not worrying about it too much at this point. When figwheel starts up it will automatically reload any changes in the browser for you already.

For the server side you don't have to do anything special for the code to reload. When you run lein ring server it already runs in dev mode and watches for changes in the source.

Finally, I don't believe there is a separate way to reload cljx. I know some people use boot that lets you do some fancier workflows than lein, but I haven't used it myself.

from reagent-template.

matystl avatar matystl commented on June 18, 2024

Is it ok to close this issue? You answer most of my question and currently my workflow was to run in 3 consols commands lein cljx auto lein ring server lein figwheel and everything was working as should. But lein repl is still not working(checked at time of writing comment). So it would be good to closed this after lein repl will be working or at least write somehing about it in readme.

from reagent-template.

yogthos avatar yogthos commented on June 18, 2024

Ah ok, I missed the lein repl part re-reading the issue. I recently made a similar fix for Luminus, so I think I could add something similar here as well.

from reagent-template.

yogthos avatar yogthos commented on June 18, 2024

@matystl I just checked in a fix for the REPL, could you test to confirm that it works as expected?

from reagent-template.

matystl avatar matystl commented on June 18, 2024

@yogthos just checked it and it doesnt look like your latest commit v0.6.6 is live on https://clojars.org/reagent/lein-template can i check it from git repositary directly? If yes than what i need to write instead of lein new reagent bug +cljx?

from reagent-template.

yogthos avatar yogthos commented on June 18, 2024

It's not pushed out yet, I want to test it to make sure it fixes the issue. :) And yeah you'd just check it out and then run lein install to install it in the local repo

from reagent-template.

matystl avatar matystl commented on June 18, 2024

cloned repo and install it and checked that it have latest commit. But still not working now with another error:

maty@maty-linux ~/vacuumlabs/clojure/bug4 $ lein repl
Rewriting src/cljx to target/generated/clj (clj) with features #{clj} and 0 transformations.
Rewriting src/cljx to target/generated/cljs (cljs) with features #{cljs} and 1 transformations.
#<CompilerException java.io.FileNotFoundException: Could not locate ring/server/standalone__init.class or ring/server/standalone.clj on classpath: , compiling:(bug4/repl.clj:1:1)>
Error loading cljx.repl-middleware: Could not locate cljx/repl_middleware__init.class or cljx/repl_middleware.clj on classpath: 
Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: cljx.repl-middleware/wrap-cljx in this context, compiling:(/tmp/form-init1919806377048152094.clj:1:2991)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6651)
    at clojure.lang.Compiler.analyze(Compiler.java:6445)
    at clojure.lang.Compiler.analyze(Compiler.java:6406)
    at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3719)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6646)
    at clojure.lang.Compiler.analyze(Compiler.java:6445)
    at clojure.lang.Compiler.analyze(Compiler.java:6406)
    at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3719)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6646)
    at clojure.lang.Compiler.analyze(Compiler.java:6445)
    at clojure.lang.Compiler.access$100(Compiler.java:38)
    at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6050)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6644)
    at clojure.lang.Compiler.analyze(Compiler.java:6445)
    at clojure.lang.Compiler.analyze(Compiler.java:6406)
    at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5782)
    at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5217)
    at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3846)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6642)
    at clojure.lang.Compiler.analyze(Compiler.java:6445)
    at clojure.lang.Compiler.eval(Compiler.java:6700)
    at clojure.lang.Compiler.eval(Compiler.java:6693)
    at clojure.lang.Compiler.eval(Compiler.java:6693)
    at clojure.lang.Compiler.load(Compiler.java:7130)
    at clojure.lang.Compiler.loadFile(Compiler.java:7086)
    at clojure.main$load_script.invoke(main.clj:274)
    at clojure.main$init_opt.invoke(main.clj:279)
    at clojure.main$initialize.invoke(main.clj:307)
    at clojure.main$null_opt.invoke(main.clj:342)
    at clojure.main$main.doInvoke(main.clj:420)
    at clojure.lang.RestFn.invoke(RestFn.java:421)
    at clojure.lang.Var.invoke(Var.java:383)
    at clojure.lang.AFn.applyToHelper(AFn.java:156)
    at clojure.lang.Var.applyTo(Var.java:700)
    at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: Unable to resolve var: cljx.repl-middleware/wrap-cljx in this context
    at clojure.lang.Util.runtimeException(Util.java:221)
    at clojure.lang.Compiler$TheVarExpr$Parser.parse(Compiler.java:659)
    at clojure.lang.Compiler.analyzeSeq(Compiler.java:6644)
    ... 34 more
REPL server launch timed out.

from reagent-template.

yogthos avatar yogthos commented on June 18, 2024

looks like it might need additional dependencies for repl/cljx

from reagent-template.

yogthos avatar yogthos commented on June 18, 2024

OK, so figured out the missing dependency and everything should be working as expected now. I pushed out the latest to Clojars, let me know if there's any other issues.

from reagent-template.

matystl avatar matystl commented on June 18, 2024

Nice it's working without exceptions. Last thing is that now you have to swich namespaces when you want to run (browser-repl). It would be nice to mension it in readme. Also nice would be to describe what (start-server) and (stop-server) are for or better how is prefered way to start project for people new to clojure. Thanks for help

from reagent-template.

yogthos avatar yogthos commented on June 18, 2024

Right, I just pushed out a new version that references the dev ns in the repl ns so that you don't have to switch namespaces. I'll update the docs with the server commands. Sounds like we got this one resolved. :)

from reagent-template.

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.