This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-12
Channels
- # arachne (1)
- # beginners (26)
- # cljs-dev (53)
- # cljsrn (1)
- # clojure (140)
- # clojure-italy (13)
- # clojure-russia (14)
- # clojure-spec (5)
- # clojure-uk (6)
- # clojurescript (52)
- # datascript (4)
- # datomic (11)
- # dirac (11)
- # emacs (12)
- # hoplon (9)
- # jobs (4)
- # lein-figwheel (1)
- # off-topic (29)
- # om (10)
- # om-next (1)
- # pedestal (3)
- # protorepl (1)
- # re-frame (16)
- # ring (12)
- # rum (27)
- # slack-help (12)
- # spacemacs (27)
- # unrepl (19)
- # untangled (26)
- # yada (8)
@shaun-mahood wrt CLJSJS I think this would make it much easier to maintain by just packaging externs and a deps.cljs
file
answering your 2nd question, this is about making NPM more like Maven/Clojars, yes, by automatically installing Node.js deps and computing their dependency files
> assuming the tooling is in place
^ this is actually not true, as it doesn't require any changes to tooling 馃檪
because everything will go under foreign-libs
anyway, and tooling is already prepared to handle that
of course you should have NPM and Node installed when providing a :npm-deps
option, but that goes without saying
we also won't require you to have any of those installed if you're never providing the option
in any case, I'm glad you asked. I'm sure others will have the same exact questions, so I'll write a blog post to clarify all this
Wow, better than I thought 馃檪 This is going to be fun!
@dnolen: Added a deprecation notice to https://github.com/clojure/clojurescript/wiki/Rationale - do you want to make any tweaks to wording or format before I go through the rest of the pages?
FWIW I think managing npm
via CLJS is a bad idea. I voiced my concerns over too much "tooling" creeping into core cljs some time ago although I still seem to be the only one with those concerns
https://groups.google.com/d/msg/clojurescript/xMQuEmQt7oQ/AWT5RZe_nQQJ (disregard that I was talking about REPLs)
npm
would be equal to having lein
in clojure.core
IMHO, not only do we inherit all the headaches npm
brings
@anmonteiro talking specifically about some of the commits you did recently. it is all very interesting work but could/should probably happen in a library (ie. http://dev.clojure.org/jira/browse/CLJS-1973)
I don't like calling npm either
For Cljsjs I would still like to have all the files in the packages
But instead of foreign libs, I'd like to package files from npm packages
The current implementation messes with the node_modules on current directory, which is quite "un-Boot", though it works
The interesting part of this is that those files are copied to output-dir before running module processing
Or are they? Probably not as Closure gives some warnings about those files before Cljs copies them to output-dir
@thheller this is only about basic module support. We provide a default, easy way for people to manage their node modules.
You can use them or not. The different pieces are still there if you want more control over your module build process, e.g. look at cljs.closure/index-node-modules
. That's tool agnostic and just needs a node_modules
folder with the modules installed
^ @juhoteperi you should also look at this function if you want to package the files too
Packaging the npm files in jars is not the problem, I already have solution to that.
The problem is that Closure node_module resolution only works if the files are found in filesystem.
@thheller also this is only "too much tooling" if you ever decide to use it. You won't need to have Node or NPM installed if you don't use :npm-deps
@anmonteiro that is not true, any dependency I might want to use may expect me to use it
to be fair .. i have nothing against :npm-deps
. that is useful information any tool could use.
That's fair, that an upstream library might use :npm-deps
The NPM problem is a little different. How would you solve it in a way that allows upstream libs to depend on NPM packages?
That is up to whatever tool you are using. The tool may decline to build, informing you do add the deps to your package.json or do it automatically like you are doing now.
and to be clear here: I'm not saying that you should not do it, you should totally do all of this. Just in a library
if all is stable and "done" we could still have discussions about including it in core
but doing alpha-level experiments with no clear design goals is not something that should happen in core
the point about unknowingly picking an npm
module via upstream is probably a valid concern - simple enough to put a compiler flag around it either preventing or warning about it
but in general I鈥檓 of the opinion if you don鈥檛 like this feature, don鈥檛 use it. If you want it in 3rd party library go make that and do it better so people use it instead 馃檪
I agree with overall assessment that dealing with NPM or anything 3rd party JS dep thing is a bit of gamble
but the idea around this feature is to address a pain point for applications developers not library developers
which is why we鈥檙e not really going to spend much time around the NPM/Yarn rabbit hole
@juhoteperi the Module resolver is a pluggable thing, but I believe perhaps not fully exposed
working with https://github.com/Microsoft/monaco-editor right now .. they sort of use npm but not really ... very confusing
@favila the minimal case for our issue