This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # admin-announcements (42)
- # aws (15)
- # beginners (8)
- # boot (102)
- # cider (7)
- # clojure (141)
- # clojure-italy (10)
- # clojure-japan (4)
- # clojure-russia (26)
- # clojure-seattle (1)
- # clojurescript (239)
- # core-matrix (13)
- # cursive (19)
- # datascript (54)
- # datomic (21)
- # editors (2)
- # events (1)
- # hoplon (125)
- # instaparse (10)
- # jobs (3)
- # ldnclj (13)
- # ldnproclodo (1)
- # om (1)
- # onyx (2)
- # rdf (206)
- # re-frame (30)
- # reagent (7)
- # yada (4)
@alandipert: thanks for the link. I still think the
README should be changed. The wiki page for Windows describes how to setup an environment where you can build and install boot, but you already provide a pre-built executable. My issue is - if you just link to an executable people expect it to just work. This isn't true due to what we discussed with @micha and the user ends up installing boot, running it and getting huge stacktraces. That is not a good start. If the temp file deletions don't work and they are critical to do then the tool is broken on the platform.
Something like "We're looking for a Windows developer to help us fix some issues we have on the platform. In the meantime you can use docker with our container." would set up the expectations and call for some help
@martinklepsch: @juhoteperi @micha we see there is some dependency order carried within the boot fileset for cljs files
since we have an issue with ordering, we were thinking if there is any docs about this somewhere?
we would like to write an initialization script in CLJS and let a
:foreign-lib :require it.
but the CLJS code is located after the foreign-lib code in the :simple or :advanced optimized source,
the foreign-lib can not see the effects of CLJS init code.
can we use this
:dependency-order somehow to control this ordering?
But the dependency order is build from cljs namespaces and not closure modules currently
@micha: you said the issue might be with non-closed handles on the files. Does this come from clojure's core? Can't that be fixed? However reading through the web I found that java might not be the only culprit - it is common for other programs to look through newly created files - search indexers, antivirus software etc. If these are using the file at the moment of deletion then it will fail.
I'm quite surprised this cannot be fixed, damn windows Couldn't there be some safety code that e.g. tries to delete the file several times with some small delay, up till a fixed amount of retries?
@onetom: Did it work with no optimization? I’m seeing there might be a problem with changing contents of foreign-lib js
reading through issues on JIRA for clj and cljs there are fixes on the file handle leaks but they'll only get into the next versions
oh boy, it works with clojure 1.8.0-alpha4 and clojurescript 1.7.58 (107 died with some horrible error), which is strange because 1.7.58 doesn't include the fix on the leak yet
@micha: this ^ means that going forward the new versions might fix these issues on windows. Mind you it still might fail randomly if any other program gets its hand on the file(s)
@onetom: Foreign-dep source is concatenated to start of output file in optimization mode by Cljs compiler
Few lines up,
optimize is called with js sources, including compiled cljs files but excluding foreign-dep files and that creates the optimized source
@juhoteperi: are you talking about foreign libs reloading? Seems like fig wheel recently added such feature, maybe worth drawing inspiration from there
@martinklepsch: Problem is not with reloading but with Cljs compiler, it doesn’t copy changed foreign-dep files to output-dir, not much we can or should do
@juhoteperi: in non optimised mode the execution order was correct IF we only required the foreign lib from the main namespace and let it trasitively require the cljs init code
But since there is no explicit reference to the cljs init code from the foreign lib, it gets dead code eliminated in adv mode and combined in the wrong order in simple mode
In dev mode the files are copied to output folder and they have dependency data mocked
They still aren’t Closure modules though their dependency info is added to dependency index
In optimized mode Closure compiler takes care of concatenating the files to correct order but it doesn’t handle foreign-deps at all
> In dev mode Closure compiler is not used at all (Closure lib is used) ^^^ this was unclear to me until now! so the cloSure compiler is not consuming the "mocked dependency data"?
https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/closure.clj#L1702-L1716 this is the relevant part and it does filter foreign-deps out of
if i would ask: "can a foreign-lib depend on cljs code and expect the side-effects of the cljs code accessible to visible to the foreign-lib?" would that precisely summarize the issue im facing now?
what do u mean by necessary? foreign-libs are stupid to expect global state before they start
@onetom you can make a foreign lib into a real google closure lib if you want. then it would behave exactly the way any lib in the goog.* namespaces do with respect to dependency ordering and cljs compiler will not treat it specially
then it's a bona fide closure library and can be passed through the closure compiler etc
hmm... all these things are relevant when im acquiring the foreign-lib during build time, not runtime. i just realized i forgot to think about the runtime case totally...
if i acquire the foreign lib at runtime (let the browser of the client download it) then the lib dev can seamlessly distribute minor version upgrades and im not forced to redeploy my app which depends on that lib
when you package it as a
:lib i think you short circuit some of the cljs compiler stuff that might be messing you up
but if i get the foreign lib at compile time, then i wont "benefit" from their minor version upgrades automatically
i've never messed with that, because i want to lock down the versions of code that's running in my application to protect me from upstream regressions
also i personally feel like it's somewhat rude to load foreign code that i haven't seen into my page that has my SSL cert showing in the address bar in the green padlock
you can't trust the browser, but i'd like you to be able to trust adzerk, inc. when you see the green padlock in the address bar
if i were to load these async, then i would need to be able to have a callback on them, so i can kickstart them after they loaded
@xifi: that's fair, thanks for the feedback re: windows. btw would you happen to have access to windows 10?
@alandipert: hi. No I don't. I'm only running win7 because I have to at work. Otherwise I'd wipe that virus out
i had win on my home laptop and wanted to try a linux distro one day. So I made a separate partition and installed it. Then I found out I chose the wrong partition. And I never looked back.
btw i made an #C09N0H1RB channel where those of us on amazon can compare notes, if anyone is interested
@juhoteperi: this is failing again with
-3 : https://github.com/martinklepsch/boot-cljs-multiple-builds
app.out.cljs.core, could not locate app/out/cljs/core.cljs, app/out/cljs/core.cljc, or Closure namespace “app.out.cljs.core"