Fork me on GitHub
#cljs-dev
<
2017-07-24
>
dnolen05:07:06

@mitchelkuijpers I think issues like this really necessitate a bit of due diligence from ClojureScript users to determine root causes, I tried npm ls after installing styled-components

dnolen05:07:42

I see that fbjs is the only thing that needs core-js. The I grepped a checked out fbjs and saw that core-js is only used for Jest testing.

dnolen05:07:17

given that I don’t think that @anmonteiro’s analysis correct in this particular case - and your actual projects errors seem to reflect that.

dnolen06:07:00

@martinklepsch I don’t think that’s really possible - instead, I think we need to focus on educating users to troubleshoot and enumerate various paths forward - I’ve opened up an issue on the ClojureScript site to make sure we document typical problems and potential solutions

dnolen06:07:36

this also seems like another possible usecase for cljs-oss? automatically testing major node_modules JS libs against the Closure compilation model

dnolen06:07:15

@mitchelkuijpers yeah I spent some time looking at this - it’s definitely not clear what the issue is - goog.requiring the rule ns works after the fact

dnolen10:07:00

yeah, the answer is styled-components needs to updated its vendorized version of postcss (or stop vendorizing it) - the version it currently uses is jacked

dnolen10:07:20

this is going to be a common narrative - submit a simple PR to fix a mostly resolved issue

dnolen10:07:49

the problem was that the old vendorized postcss relied on dynamic require which leads to circular imports and build time hacks

mhuebert11:07:01

@mfikes did you find another way around avoiding errors related to reloading namespaces with :const vars https://dev.clojure.org/jira/browse/CLJS-1854? I noticed that the purge!-related code mentioned in that issue - https://github.com/mfikes/planck/blob/1.17/planck-cljs/src/planck/repl.cljs#L329-L348 - is no longer in the latest version of Planck.

mhuebert11:07:05

@dnolen still thinking it makes sense to have an option to specify additional macros to be compiled (like core$macros) during a ClojureScript build?

mhuebert11:07:23

@dnolen I think this need is also why Planck has this additional build step: http://blog.fikesfarm.com/posts/2016-02-03-planck-macros-aot.html

dnolen11:07:40

@mhuebert yeah the thing we discussed

mfikes12:07:43

@mhuebert No. Planck now exhibits errors when reloading namespaces with ^:const vars. The reason the workaround lines are no longer in Planck is that Planck is no longer defining require as a REPL special (with the built-in workaround), but instead delegating to the new require macro, and it thus subject to the issue as well.

mhuebert12:07:54

@mfikes ah I see, makes sense

mitchelkuijpers16:07:40

Thank you @dnolen maybe we should create a wiki or blogpost about figuring out these problems. Highly appreciated I will go with the pull request I think