hello once again, I have bumped into an issue that...
# javascript
a
hello once again, I have bumped into an issue that I don't know if it is a bug or not. since koltin 1.4, gradle installs npm transitive dependencies without a problem. i.e. a lib which declares an npm dependency will be picked uo and its npm dependency will also be downloaded. I expected devNpm to be the same but it is not. Is that expected? In addition, I also noticed declaring dependencies (both npm and devNpm dependencies) in test sourcesets wont provoke a download of those dependencies. Is this also expected, should I file an issue on YT?
t
I expected devNpm to be the same but it is not. Is that expected?
AFAIK NPM works the same way
a
do you mean npm doesn't install transitive devDependencies?
👌 2
i
Why do you need downloading of devDependencies? The idea was that devDeps is for development of this particular module, and should not be transitively downloaded As for test source sets dependencies, it should be downloaded, if you run tasks depending on tests, if you run only assemble tasks or something like that, test dependencies are not resolved
a
your explanation regarding devDependencies makes a lot of sence. I just thought they would transitively be downloaded as the kotlin IR compiler backend actually builds (or developes) a kotlin/js library when it is creating the final js bundle.
regarding test source sets, then it is a bug. As any thing npm or devNpm in gradle isn't directly installed. I had to put the dependency on main source sets to get the desired outcome
t
In common case
dev
(test) environments can be fully different
i
Honestly, point about dev dependencies can be discussed Main reason I see is for transitive webpack loaders for example. And lib module can declare its own loaders as dev dependencies, and it will be transitively resolved. In fact it requires not only dev dependencies, but way to transitively share loaders information (or maybe other webpack config stuff), but information about dev deps can be useful in leaf module.
t
Could it be Gradle
configuration
responsibility?
a
as @Ilya Goncharov [JB] this is exactly what I am stating, my library has a file-loader devDependency, I expeted it be to transitively loaded by my consumer application. It wasn't