This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-15
Channels
- # aleph (5)
- # bangalore-clj (1)
- # beginners (53)
- # boot (1)
- # cljs-dev (327)
- # cljsrn (3)
- # clojure (16)
- # clojure-filipino (47)
- # clojure-nlp (4)
- # clojure-russia (1)
- # clojure-spec (3)
- # clojurescript (64)
- # core-async (6)
- # datomic (25)
- # hoplon (5)
- # jobs (5)
- # klipse (2)
- # lein-figwheel (2)
- # lumo (27)
- # om (2)
- # onyx (6)
- # parinfer (4)
- # pedestal (1)
- # protorepl (1)
- # re-frame (31)
- # ring-swagger (1)
- # specter (9)
- # unrepl (11)
Sweet, one way to judge the success of António’s “ClojureScript Is Not An Island” post is that it made it into the top 10 Hacker News “ClojureScript” posts of all time
Hrm I suppose that 2nd analyze
call might be needed https://dev.clojure.org/jira/browse/CLJS-2242
I wonder if we're just not loading macros on the first call or something
Summary of checked arrays for downstream Figwheel use:
- Patch landed there fixing its misuses: https://github.com/bhauman/lein-figwheel/commit/48eba2f7e481be4079fdfc4b606d3eb52217a891
- Patch exists for core.async
(which Figwheel uses) https://dev.clojure.org/jira/browse/ASYNC-201
This should be sufficient for mainstream use of the feature. The only remaining issue is that Figwheel transports *print-err-fn*
args using edn https://github.com/bhauman/lein-figwheel/issues/575
closing in on comprehensive support for all JS module types at the REPL in non-Node.js context
@dnolen let me know if there are any areas you think may be flaky and could use help with manual testing
I'll be really surprised if those just work
Esp. Rhino
Good luck!
I think we might be done wrt. self-hosted too
The global exports patch you applied this morning makes every new feature work downstream in Lumo
This should mean all downstream REPLs (Figwheel etc.) now get this functionality for free
That's awesome
I wonder how many JS people out there really understand what we have going on here wrt tooling 😛
Hopefully the blog is a good start
ok master is in a good state far as I can tell, tests passing, and I couldn’t break loading JS modules in my simple testing
there’s probably some finessing we could do - but everyone should try it out and bring feedback
How hard do you think it should be do add some REPL tests?
At least in a Node env
Maybe later use Chrome headless for browser repl now that it's a thing
I bet you feel this pain more than I do but we've broken REPLs on several occasions without knowing
yeah, automating REPL testing would be really sweet, it’s just an really easy step to miss
Cool, I may look into it in the near future
Testing has also been a theme for this release and I'd love to keep it that way
Really satisfying to see all these green ticks https://github.com/mfikes/clojurescript/commits/master
I’ve been testing with {:npm-deps {:lodash "4.17.4"}}
that’s all you need to do w/ your REPL options
There has to be a way to fix that
Not without some fiddling I imagine
We'd need to make it aware that React is Closure's React
Somehow
Maybe through a CommonJS shim or something
We actually might be extremely close to RN working with all of this. It is a Rumsfeldian issue right now.
I think if you had a module loader that understood Facebooks weird JSDoc @provides thing you’d be good
Hah didn't know they still used that
For me to contribute, I have to first understand what re-natal
is doing to make things work. I used to understand natal
/ Ambly
.
My mental model is that we may have 2 copies of React if we're processing it and the Packager is loading another copy from node_modules
Not sure if you can do RN without the Packager
Hrm but I saw something that might be of interest the other day, 1 sec
^ I think this replaces the pckager
And might be easier to integrate with
Right, someone in #cljsrn mentioned that thing. I’m starting to feel the tool fatigue 🙂
Yeah this might be a better conversation for that channel
@anmonteiro that package seems to imply this would be feasible now?
Where we stand right now in RN land is a bit fragile. It barely works, and whenever Facebook releases, it stands a good chance of breaking.
Yes. Right after we added that Levenstein distance suggestor in ClojureScript, Bruce out did it by a mile
so cool.
@anmonteiro One thing I’ve noticed, if I try to use :npm-deps
, my package.json
gets updated so that the line reading
"react": "16.0.0-alpha.6",
gets turned into
"react": "^16.0.0-alpha.6"
I don’t think it is
that’s probably the result of doing npm install [email protected]
@dnolen do you think we should npm install --no-save
?
that wouldn’t save deps in package.json
I don’t know what the most sensible default would be
The background of this: If you set up a new app using re-natal
and it sees that you have yarn
installed, it sets things up with a yarn.lock
file, etc.. I’m starting from that working state, and adding :npm-deps
as above and seeing if I can then make use of it.
the problem of using :npm-deps
& yarn
is that one will overwrite the other
like, there’s no way you can use the react you installed from yarn if you specify a new one in npm-deps
@anmonteiro I think current behavior is OK as default + we need a flag?
flag for what?
here’s a different suggestion: a flag that doesn’t install modules, but uses a node_modules
installation if it finds one
then people can use yarn
if they please
then we provide the blessed :npm-deps
path which saves by default
and people that want more control can tweak their behavior
I quite like the idea, let me prototype something
@dnolen should be OK to overload :npm-deps
to accept true
too, or would you prefer a new compiler option?
hrm the problem would be upstream npm-deps
maybe this could really be a big hammer in that you’d need to specify overrides for those upstream deps too
I can see that being useful for people that know what they’re doing
I don't think we need to do that now. Separate option please since :npm-deps is a deps.cljs thing
surprisingly clean now that we can index the top level node_modules
directory
then users can use whatever build tool they want
@mfikes mind giving this patch a try?
simply add
{"devDependencies":
{"module-deps": "*",
"resolve": "*",
"browser-resolve": "*"}}
to your package.json
along with your other deps
then replace the :npm-deps
entry in your compiler options with :node-modules true
it should now respect your yarn.lock
file
(make sure you install the dependencies yourself with yarn install
)
@darwin Is Canary actually building master now? (The version numbers look accurate. 🙂 )
@mfikes maybe you could look at env it is passing to project travis builds and prepare planck: https://travis-ci.org/binaryage/cljs-devtools/jobs/253987756/config
this is what I did in cljs-devtools, to make it participate: https://github.com/binaryage/cljs-devtools/commit/45c1df1e0de53c9d320963b296bd7a741056599c
I suppose I can mess with Planck’s .travis.yml
— if it is building in that particular environment, I’d need to sort out the fact that it does language: c
and has osx
and linux
-specific setups
wait, I want to trigger builds in your CI, I think there is no need to change anything, just make sure that CANARY_CLOJURESCRIPT_VERSION gets used
(Planck has a build matrix that fans out to 4 separate things, if you include gcc vs clang)
this is another thing you should look at, you need to pull that jar https://github.com/cljs-oss/canary/blob/master/scripts/install-canary.sh
I did this in before_install
https://github.com/binaryage/cljs-devtools/commit/45c1df1e0de53c9d320963b296bd7a741056599c#diff-354f30a63fb0907d4ad57269548329e3R18
OK, so if I add that line to Planck’s before install it would take care of getting the JAR?
I think a specific build is sufficient for these purposes. You could pick Linux, clang
@mfikes one last thing, will need CANARY_PLANCK_TRAVIS_TOKEN encrypted in https://github.com/cljs-oss/canary/tree/jobs
btw. it is nice that you don’t have to tell me, you will encrypt it for travis eyes only
So, I’ll get a token, substitute it in for xxx
above, and then what do I do with the result?
@darwin By “change also the env var name”, should I change CANARY_REPO_TOKEN
in the command above to, perhaps PLANCK_REPO_TOKEN
?
OK, so it indicated
Detected repository as mfikes/planck, is this correct?
I confirmed. It appears to have hopped over into my local Planck directory and modified the .travis.yml
there@darwin It is wanting to make changes that involve stripping off quotes. I’ll make a gist…
maybe you have some other travis cli tool version than I do? they also try to reformat .travis.yml
@mfikes FWIW [ci skip]
or [skip ci]
is a Travis thing, not canary
I wondered a bit why CLJS-2245 was necessary, because using local node modules worked before, but I see CLJS-2240 changed code so that node modules were indexed only when :npm-deps
is given
@juhoteperi right this is about making it explicit. It would shell out even if you didn’t want it to 😛
@mfikes I’ve added it here https://github.com/cljs-oss/canary/commit/38315c6056067d28e8898d620e5e2ba8f9a58433
will probably overwrite your compiler and os config keys without studying matrix.include stuff
@anmonteiro Hmm, it previously would only shell out to node
to resolve dep graph, not npm
I pushed the first commit. But I’ve not done
git commit -m "job --compiler-repo --compiler-rev canary" --allow-empty
Is that what you literally want me to do @darwin? (Followed by a push?)But it is fine it is now explicit. Just wanted to be sure to understand the changes
oh hrm you’re right
I might have missed that
I think we’ll have the same behavior if we revert both CLJS-2240 and CLJS-2245
because it detects node-required
anyway
@mfikes I’m not sure if clojurescript master would work now, did the testing on my fork with some patches applied, for master it would then be just git commit -m "job" --allow-empty
or git commit -m "job -r SHA" --allow-empty
@anmonteiro lein test
failed on my ClojureScript CI https://travis-ci.org/mfikes/clojurescript/builds/253989288
I forgot to commit an untracked directory
nice catch
I’ll fix in CLJS-2246
@mfikes the main job already finished with this report: https://github.com/cljs-oss/canary/tree/results/reports/job-000044-1.9.807-f63ab74 btw. canary just triggers the travis builds but does not wait for them, that is probably the last major thing to implement
and btw. I realized we cannot use http://shields.io badges or travis badges, they show just most recent build status
@juhoteperi nice catch. let me know if this looks good: https://dev.clojure.org/jira/browse/CLJS-2246
Yes, this should work. I'll leave it to you and David to decide if this or additional option is better choice.
@mfikes finished https://github.com/cljs-oss/canary/tree/results/reports/job-000045-1.9.806-a0ed8c4 btw. the output is more verbose: https://travis-ci.org/cljs-oss/canary/builds/254002712 that was killing travis in case of fresh caches
Canary built ClojureScript master, put a JAR at a URL that other repos can get, and triggered Planck to buiild with that JAR.
@mfikes didn’t find a way how to limit travis api request to launch only specific build from matrix, their docs are not very specific about this: https://docs.travis-ci.com/user/triggering-builds and google didn’t help, tried this https://github.com/cljs-oss/canary/commit/67ff99da0c5da9e711bbab7c0edf47c75b8fcd0f but had to revert it back, it didn’t work
@anmonteiro lein test
has an error for me on master, specifically test-node-modules-cljs-2246
has an exception
@dnolen you need to install yarn
or we could revise the test to not use yarn
I guess
actually that might be better
fixing
oh wow
getting some time to hang before the conf
@anmonteiro tests still failing for me after the patch
passing locally, what did I do wrong
CI also passes
do you have a package-lock.json
file or something?
something that may be preventing module-deps
from being installed
thanks
just re-ran lein test
again and no failures
already noticed some other broken things that need tests (:foreign-lib local overrides don’t appear to work anymore)
and I don’t have any untracked files
@anmonteiro still not working for me
so odd
lein test :only cljs.build-api-tests/test-node-modules-cljs-2246
^ does that succeed?
@anmonteiro running just that one worked
@dnolen ls $TMPDIR | grep 'test-out$' | xargs rm -rf
then lein test
again? 🙂
well that’s not deleting the folders for me
I might have given you a botched command
this is the actual command fwiw: cd $TMPDIR && ls $TMPDIR | grep 'test-out$' | xargs rm -rf
do you have a dirty worktree?
I’m out of ideas here
the patch applied, right?
@dnolen can you push it to master and let Mike’s CI run it?
node -v
npm -v
can you run those so I can try to repro?
thanks
I’m on 8.1.4 and NPM 5
so that’s probably why
installing those
I’ll modify the patch to make CI run Node 6 as well
so we can prevent further failures
I need to get master back to sensible state for myself - so first I’m probably going to comment out 2246 test
OK reproed your failure
feel free to comment that test
I’ll rebase on top of master when I figure this out
not really interested in bleeding edge Node.js stuff other than making sure it also isn’t breaking
agreed we should be on LTS
which is 6 currently
problem seems to be NPM
because we call test/delete-node-modules
and it leaves empty directories
on the subsequent npm install
NPM thinks the modules are installed
when really the folders are empty ¯\(ツ)/¯
fixed now I think, running lein test
@dnolen replaced the patch with one that makes tests pass: https://dev.clojure.org/jira/browse/CLJS-2248
just ran lein test
twice and couldn’t repro anymore
sorry to have made you waste so much time on this
also updated the Travis file to run Node 6
also waiting apply before the next release: https://dev.clojure.org/jira/browse/CLJS-2239
docstrings for :target :nodejs
under self-host
to get the string-requires goodness
hrm I’m seeing a regression with :foreign-libs
and :target :nodejs