I just added `@actions/cache` to my npm dependenci...
# javascript
v
I just added
@actions/cache
to my npm dependencies. Now I get 2285 compile errors because Dukat is creating many duplicated declarations. 😕 Anyone seen this before and has some idea?
t
I think will be better to copy those declarations. Otherwise you will fix the same errors/problems, which already fixed by Vladimir 🙂 Current fix process for
@actions
: 1. Run
dukat
2. Fix errors 3. Add kotlin package Also you can ask Vladimir to publish declarations to simplify declaration sharing :)
v
My current process is to have the built-in Dukat run in the Gradle plugin enabled so all declarations are translated automatically. Additionally I have a
doLast
action that fixes problems in the generated files. But 2286 errors is quite a bit, and many are duplicate declarations in node.is files. :-/
👍 1
v
Additionally I have a 
doLast
 action that fixes problems in the generated files.
Oh, that would probably take a while. Frankly speaking, I would love to go with that approach (all headers generated by Dukat) as well. Here are the issues that bother me the most: 1. All headers are generated into the root package. That makes API uses awkward. For instance
(@actions/core).info
should probably be converted to
package actions.core
2. Overloads are not generated properly (Dukat often produces conflicting overloads) 3. Other Dukat issues 🙂 However, I would try to implement the business logic first, and only then go with fixing Dukat.
👍 1
v
All headers are generated into the root package.
Yes, that's indeed annoying.
Overloads are not generated properly (Dukat often produces conflicting overloads)
Other Dukat issues
Yep, also quite annoying, but at least so far I was able do work-around these in the
doLast
with not too much effort. But that I now get 2286 is really bad. There are many redeclarations, conflicting declarations and duplications now, even in
....module_node.kt
files, since I added
@actions/cache
. And I currently see no real way besides also not using the built-in integrated Dukat task. 😕 And this is actually the last damn dependency I had to add. 😞
😞 2
Ah, nice, 3 days ago the 1.4.0 release was built and half-way published and it contains a way to not run Dukat for selected dependencies. 🙂
Now if it just would work like expected. 😞 https://youtrack.jetbrains.com/issue/KT-41232