This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-26
Channels
- # announcements (5)
- # architecture (1)
- # bangalore-clj (4)
- # beginners (45)
- # boot (4)
- # cider (19)
- # clojure (56)
- # clojure-austin (1)
- # clojure-canada (1)
- # clojure-finland (1)
- # clojure-russia (67)
- # clojure-uk (2)
- # clojurescript (57)
- # clojutre (1)
- # cursive (15)
- # datomic (3)
- # emacs (2)
- # figwheel-main (71)
- # fulcro (117)
- # hoplon (33)
- # java (5)
- # off-topic (52)
- # pedestal (7)
- # remote-jobs (1)
- # shadow-cljs (134)
- # slack-help (9)
- # specter (1)
- # tools-deps (17)
- # vim (2)
I noticed that https://figwheel.org/docs/scripting_api.html says to start rebel readline with clj
( clj -m rebel-readline.main
) rather than clojure
. Is this a typo or does rebel-readline now work well with clj
now?
@thiru0130 you’re right that should be clojure
it will let folks run async tasks (like async tests) in a main script: clj -m figwheel.main -m exampl.test-runner
main scripts are tough to use because they will normally exit too early to allow anything useful to happen
Yup regarding clj
I've had strange behaviours in the past when using it with rebel accidentally (arch linux)
I'll send a pull request with the fix to that typo.. also seeing some other copy errors with the new docs
"We’ve successfully switched between ClojureScript REPLs for our builds all the while staying in a Rebel Readline environment." <-- wohoo!
Is the "o" in this name a typo or naming convention I'm not aware of: figwheel-config-o-build
that -o-
is an americanism, i think.
it came from some cartoons, i suspect, when they repurposed the word automatic
to different *-o-matic
s or something like that.
btw, for async build processes we are using https://github.com/DarthSim/overmind (or hivemind
), but the biggest problem with them is how to combine them into a pipeline.
many steps depend on or triggered by filesystem changes, which we monitor with http://www.entrproject.org (which is similar to http://wkf.github.io/hawk/ but without the jvm dependency), but it's cumbersome to notify another step in the build process to rerun at the right time.
what would be really good if existed is something like make
, but instead of simply executing commands when a make rule is matched, it should notify an already warmed up background process...
I’m talking more about the --main
option not being able to handle any sort of async process
and very useless for testing where you want something that will run the tests and system-exit with 1
i just did a quick experiment to clarify that i can't have multiple -m
on the clj
command-line, because subsequent -m
options would be just passed as params to the first -main
function.
$ rg .
deps.edn
1:{:deps {org.clojure/clojure {:mvn/version "1.9.0"}}}
src/m2.clj
1:(ns m2)
2:(defn -main [& args] (prn "m2"))
src/m1.clj
1:(ns m1)
2:(defn -main [& args] (prn "m1, args:" args))
then
$ clojure -m m1 -m m2
"m1, args:" ("-m" "m2")
instead of printing
m1
m2
im just saying i haven't realized until now that some of those -m
options are interpreted by the first -main
function
im not talking about figwheel now, just regular clojure.main
in fact, that's already a bit confusing that the clj
/ clojure
commands are running the clojure.main/-main
which in turn accepts a -m
/`--main` option to run another -main
function in some namespace, for example figwheel.main/-main
which then also interprets the next -m
option to run yet another -main
function...
you have that right clojure.main/-main is implicit and its’ what actually handles the CLI
but then i can make an uberjar, in which case my own app.main/-main
(with :gen-class
) will be the entry point to the java process
which i've just realized, i don't know how to make an uberjar with these new clojure cli... 😕
i've seen dnolen's Embracing Simpler Tools talk, regarding this "just make libraries" approach. very enlightening as usual! 🙂
thanks for the juxt/pack.alpha
pointer!
theres another one called mahyven or something like that. its impossible to search for
@onetom There's some tools here: https://github.com/clojure/tools.deps.alpha/wiki/Tools#packaging
At this point I want to start serving index.html from a different dev webserver than the figwheel one, such that relative AJAX calls go to the backend API dev server (written in a different language) as opposed to the figwheel dev server. As a first go, I served up an index.html from the python api dev server which pulled the css and js files from the figwheel server, and that works but subsequent js files (deps.js, cljs_deps.js, etc) fail as the browser tries to get these from python instead of figwheel. Is there an easier way to go about this?
@risinglight you need to serve the compiled static assets
remember that you can configure the output-to
and output-dir
to place them where ever you need them to go