cljs-dev

ClojureScript compiler & std lib dev, https://clojurescript.org/community/dev
dnolen 2020-06-11T13:29:09.242300Z

@henryw374 this is doesn't affect most libs in CLJSJS, so this isn't needed - it's easy to miss the details here

dnolen 2020-06-11T13:30:00.242900Z

it's also a potential caching issue (you might not hit, because you install your deps first), not a overall support problem

dnolen 2020-06-11T13:31:20.244300Z

anyways I don't want to go over it again - just sitting on it for now until there's more feedback and better ideas

dnolen 2020-06-11T13:31:36.245Z

flags don't really help at all because it's not about configuration - only caching

2020-06-11T13:31:59.245300Z

oh I see. I was thinking that dropping cljsjs deps would become the preferrred thing for libs to do generally

dnolen 2020-06-11T13:32:11.245800Z

yes so users don't inadvertently hit the caching issue

dnolen 2020-06-11T13:32:26.246300Z

which can always be fixed by blowing away ~/.cljs and your build

dnolen 2020-06-11T13:32:56.246700Z

and no, dropping cljsjs deps is not preferred

dnolen 2020-06-11T13:33:02.247Z

no interest in breaking anything and dropping support for anything

dnolen 2020-06-11T13:33:10.247300Z

anything that worked before will continue to work

dnolen 2020-06-11T13:33:40.248500Z

the only time we've ever not followed that was because the maintenance is impractical and the affected users are too small

dnolen 2020-06-11T13:34:03.249200Z

i.e. the less popular REPLs

2020-06-11T13:34:21.249500Z

cool. I still think the flag would be good, so non-shadow npm users don't have to track down and exclude cljsjs deps. the flag could work so you set it to ignore foreign-libs - so it's an opt-in

dnolen 2020-06-11T13:34:50.249900Z

more flags means more confusion - so just not interested at the moment

2020-06-11T13:35:19.250300Z

fair enough. there are quite a few flags already

dnolen 2020-06-11T13:35:32.250500Z

too many

dnolen 2020-06-11T13:36:12.250900Z

but it's still way better than most JS tooling - let's keep it that way

2020-06-11T13:37:41.251100Z

:thumbsup:

2020-06-11T13:43:54.251300Z

“There’s a flag for that” ™️

dominicm 2020-06-11T19:51:38.251900Z

https://github.com/clojure/clojurescript/blob/0eaa19f4326f02d4dc4e8660ad5f13329b73e3af/src/main/clojure/cljs/analyzer/api.cljc#L171-L178 this docstring seems misleading given that it doesn't use *compiler* and actually rebinds *compiler*

dominicm 2020-06-11T19:54:06.252100Z

I think it was lifted from https://github.com/clojure/clojurescript/blob/0eaa19f4326f02d4dc4e8660ad5f13329b73e3af/src/main/clojure/cljs/analyzer.cljc#L4721-L4725 which does have that behavior

dominicm 2020-06-11T20:28:18.252300Z

@dnolen https://github.com/clojure/clojurescript/commit/45022fa177dc900b774c6736e04e698426bf55c8#diff-3f5db04e51ac4262a2042aa4d80010a2L137-R131 looks like this commit (and line number) changed the behavior of the function. This has broken cljdoc upstream.

dnolen 2020-06-11T20:29:29.252700Z

docstring patch would be cool! 🙂

dominicm 2020-06-11T20:29:58.252800Z

@dnolen just to clarify - does that mean it's intentional that it no longer uses cljs.env/*compiler* (it used to)

dominicm 2020-06-11T20:31:06.253700Z

Maybe cljdoc shouldn't be using that API if it's unstable. Is there an alternative?

dnolen 2020-06-11T20:31:07.253800Z

it uses empty-state from the analyzer api so that the dyn var can become a detail

dnolen 2020-06-11T20:31:33.254500Z

I've tried to start hiding the dyn vars, you can see this in the various changes to the api

dnolen 2020-06-11T20:31:55.255Z

and the dogfooding as in this case

dominicm 2020-06-11T20:33:49.255100Z

OK. No problem. In that case I'll merge the change to cljdoc which will explicitly pass the state in instead :)

dominicm 2020-06-11T20:38:00.255200Z

If I don't forget, I'll put a docstring patch together (I'll check any other relevant fns from that commit too).