This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-28
Channels
- # aleph (1)
- # arachne (4)
- # beginners (13)
- # boot (18)
- # clara (7)
- # cljs-dev (156)
- # cljsrn (278)
- # clojure (163)
- # clojure-conj (5)
- # clojure-dev (1)
- # clojure-losangeles (1)
- # clojure-poland (2)
- # clojure-sg (1)
- # clojure-spec (15)
- # clojure-uk (17)
- # clojurescript (275)
- # data-science (5)
- # datomic (23)
- # emacs (10)
- # leiningen (1)
- # lumo (16)
- # off-topic (98)
- # onyx (10)
- # parinfer (83)
- # re-frame (18)
- # reagent (47)
- # remote-jobs (1)
- # ring (1)
- # ring-swagger (5)
- # rum (6)
- # specter (8)
- # vim (5)
@anmonteiro I think CLJS-2279 would be worth addressing @thheller’s investigation here seems like the path to pursue
unless the overall sentiment is that we should get out what we have now, and address that in a future release
There might be value in doing a pre-release (like https://github.com/clojure/clojurescript/releases/tag/r1.7.189) making it easier for people to try the NPM stuff. (My guess is that corner cases are going to be found, some addressable, some not.)
Yeah, to us it seem trivial to build ClojureScript. Perhaps an order magnitude more people can try it if it is just a project.clj
tweak.
ok, so then I’ll just cut a release today and put together a short blog post about it - later I can post about :global-exports
will hold off till later in the afternoon - so there’s time to get some more feedback from people on the West Coast like António
I’m thinking we should always disable non standard JSDoc warnings for the JS modules types - these things are never going to be Closure stuff
^ I like this
It's that kind of thing that I keep doing all the time but don't feel enough pain to automate
I wanna try Thomas's approach too, it sounds like it would solve the ES6 problem if it works
But I might not get to it until tomorrow
@dnolen FWIW I've been testing Lumo with master every other day and everything looks good
There's maybe 1 self-host issue that we know about and it's in JIRA related to macro inference but doesn't seem critical to me
Sounds common enough to warrant a solution
Would also need to be loaded before every namespace
I can predict some people having problems achieving this last part
yeah I’m thinking we just provide the namespace, it’s always preloaded, and we set it automatically for compilation levels
Sounds good to me
@dnolen experimenting with @thheller ‘s suggestions right now for processing es6 modules
preliminary results are good, but I’m making sure by re-running tests again
tests pass, smoke testing now
there are a bunch of packages that don’t work in my testing, didn’t test if cljs.closure
works for them
@anmonteiro can you try any of those packages to see if it works with whats in CLJS?
it won’t work for "module"
entries
trying styled-components
also got ERROR: NON_TOP_LEVEL_STATEMENT_DEFINE. The define function must be called as a top-level statement
for stylis
I though that might have been and issue due to always enabling all rewrites but I guess not
looks related to AMD
works if I don’t set setTransformAMDToCJSModules
dunno
it does convert
I think
goog.provide("module$Users$anmonteiro$Documents$github$clojurescript$node_modules$stylis$stylis")
I don’t really care about AMD tbh
it’s dead in the water anyway
as long as we get ES6 / CommonJS I’m as happy as I can be
goog.provide("module$node_modules$stylis$stylis");
var module$node_modules$stylis$stylis = {};
(function(factory) {
typeof module$node_modules$stylis$stylis === "object" && typeof module !== "undefined" ? module["exports"] = factory(null) : typeof define === "function" && define["amd"] ? define(factory(null)) : window["stylis"] = factory(null);
})(function factory(options) {
that looks more related to weird dynamic stuff in JS
than module processing
well exactly, but most NPM modules won’t have that shit
we never promised to consume every module out there
that problem was there before CLJS-2279
I’m just focused on being able to support random NPM modules without having to bend over backwards trying to figure out if they’re ES6 or CommonJS
@dnolen looks like we might be able to solve CLJS-2279 cleanly and easily
so I would hold off on the release?
eg. ERROR: NON_TOP_LEVEL_STATEMENT_DEFINE. The define function must be called as a top-level statement
this error is “good”
@dnolen patch attached to https://dev.clojure.org/jira/browse/CLJS-2279
3-line diff
rest is tests
that’s not realistic
we should probably look at a module that can’t be processed
@anmonteiro but the rewritten stylis
file does not work
but I don’t think we should setProcessAMDToCJSModules
to true
in every case
it’ll make other modules fail
that work otherwise
@anmonteiro are you sure that those packages work? in case of stylis
it does not work at runtime
I won’t generalize without trying out some more
but why would you set the AMD transformation to true
if they don’t provide an AMD module
if you DO NOT SET IT and rewrite node_modules/stylis
it pretends to work but fails at runtime
I did not run into issues with always enabling the rewrite. only for packages that would otherwise not work anyways
the question is really, do those packages provide AMD modules?
@anmonteiro that is not the question .. if they don’t contain AMD wrapper closure will do nothing
gotcha
so the question is: does it hurt setting it? I have not run into a package where it does
so the advantage of setting AMD processing to true is just about failing early?
doesn’t convince me immediately
Cool. Self-parity was passing in my CI with the last commit https://github.com/mfikes/clojurescript/commits/master