This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # admin-announcements (2)
- # aws (3)
- # beginners (25)
- # boot (7)
- # cider (27)
- # cljs-dev (30)
- # clojure (106)
- # clojure-boston (1)
- # clojure-czech (3)
- # clojure-dev (3)
- # clojure-estonia (1)
- # clojure-italy (1)
- # clojure-russia (11)
- # clojure-uk (3)
- # clojurescript (83)
- # clojurex (1)
- # datascript (1)
- # datomic (21)
- # docs (7)
- # funcool (1)
- # hoplon (8)
- # jobs (2)
- # ldnclj (9)
- # leiningen (6)
- # om (6)
- # onyx (29)
- # re-frame (41)
- # reagent (64)
- # spacemacs (2)
- # test200 (1)
@oskarth: your write up is very good. https://gist.github.com/oskarth/de185c3e7e108af54619 What is the case you want to move forward? C? or B & C?
@bensu and thanks. I don't know if this is a good direction, but it seems as if (a) you can detect if source is a single file (b) filter out other notifications here: https://github.com/clojure/clojurescript/blob/3ecf5aff4151b10d8abf2376f8fae735c61f28a6/src/main/clojure/cljs/closure.clj#L1799-L1804
I feel like I'm missing something with the single segment file story. Why is this important?
I don't have final say in anything but, single segment namespaces are a problem in Clojure JVM and ClojureScript respects that: http://stackoverflow.com/questions/13567078/whats-wrong-with-single-segment-namespaces
The issue that might be more relevant is to allow you to watch only one file at a time. As you discovered this seems to be more of a limitation of the underlying watch mechanism than ClojureScript's design.
So assuming you have a file called hello.cljs in current directory, what's its namespace if it isn't just
One thing that boot et al allows is to do more scripting, so you can even start without a namespace, and then add that in organically as a script turns into a real project. I think this is how a lot of JS dev is done too, so it would be neat to have something similar for CLJS
Well, the compiler can support that: https://github.com/clojure/clojurescript/blob/master/src/test/cljs/hello.cljs
I'm not sure I follow, what prevents you from writing a script when using a two-segment namespace like
Nothing, except then the namespace doesn't match the filename. But maybe that's fine too?
No, that is not fine :simple_smile: I meant having
My point was just that I might be missing something with watching a single file because I didn't understand what the single segment namespace limitations design imposes
Ah right, so yeah issue remains. The use case is just having a single file without any directories for easy scripting, just like in bash, racket, go, js, etc
@oskarth: there’s no reason that’s not supported other than nobody’s worked on it and at this point that means few users see it as a priority
I think it would probably be conservative to say 90% of users are using ClojureScript for the web
@dnolen: cool, I want to give it a stab. Tinkering with checking parent dir if source is a single file. Does that approach makes sense?
@oskarth: I don’t have ideas about the the approach, my brain is too far into some other things to empty my cache for this at the moment.
Ok no worries, if I get something up and running that seems reasonable I'll put it up on JIRA
my only advice, keep it simple - ideally this only should unlock what’s already there.
far as I know passing a single file to
cljs.closure/build was always supposed to work,
watch may be another story.