mike.holler
07/21/2021, 5:21 PMBig Chungus
07/21/2021, 5:30 PMBig Chungus
07/21/2021, 5:31 PMBig Chungus
07/21/2021, 5:32 PMBig Chungus
07/21/2021, 5:41 PMmike.holler
07/21/2021, 6:19 PMBig Chungus
07/21/2021, 6:24 PMBig Chungus
07/21/2021, 6:25 PMBig Chungus
07/21/2021, 6:28 PMmike.holler
07/21/2021, 6:57 PMBig Chungus
07/21/2021, 7:01 PMimplementation(npm("npm-module", "npm-version"))
are not embedded, but instead redeclared as regular js dependencies in final package.jsonmike.holler
07/21/2021, 7:09 PM1.2.3
of a library C and library B may need 1.5.0
of the same library C. If we depend on library A and B in our client application, then the internal dependencies might conflict between them. Or am I misunderstanding?Big Chungus
07/21/2021, 7:11 PMmike.holler
07/21/2021, 7:35 PMBig Chungus
07/21/2021, 7:39 PMmike.holler
07/21/2021, 7:42 PMnodejs
block and commented out the other block. Same issue.mike.holler
07/21/2021, 7:43 PMBig Chungus
07/21/2021, 7:44 PMmike.holler
07/21/2021, 7:46 PMmike.holler
07/21/2021, 7:46 PMmike.holler
07/21/2021, 7:47 PMmike.holler
07/21/2021, 7:47 PMmike.holler
07/21/2021, 7:50 PMnebula.release
plugin here to help version our projects. It is aware of git and assigns the versions internally.
Link to Nebula Release Plugin.
It makes the version object a DelayedVersion
instead of a String, in case any changes need to be made to the version after the plugin is applied. You can solve this in a compatible way by using version.toString()
in your code instead of version
. Surprisingly, this is the first library I've ever had a problem with in this regard, so most other libs must be doing what I am suggesting with .toString()
.mike.holler
07/21/2021, 7:51 PMid("nebula.release") version "15.3.1"
id("dev.petuska.npm.publish") version "2.0.3"
Then you'll see the failure I'm talking about.mike.holler
07/21/2021, 7:51 PMplugins {
id("nebula.release") version "15.3.1"
id("dev.petuska.npm.publish") version "2.0.3"
}
version = version.toString()
mike.holler
07/21/2021, 7:55 PM/**
* Weird, but needed for dev.petuska.npm.publish, which does not .toString()
* the version before using it. The nebula.release plugin uses a DelayedVersion
* object, which we are converting to a string here.
*/
version = version.toString()
mike.holler
07/21/2021, 8:02 PMBig Chungus
07/21/2021, 8:02 PMBig Chungus
07/21/2021, 8:05 PMversion as String?
-> version?.toString()
fixed it just as you saidmike.holler
07/21/2021, 8:08 PMversion
is just version: Object?
at its declaration. I had always assumed it had to be a string.Big Chungus
07/21/2021, 9:35 PMmike.holler
07/22/2021, 6:53 PMmike.holler
07/23/2021, 6:06 PM./gradlew pack
it builds the package in build/publications/npm/js/
what I'd expect to see is one of the .js
files containing the string Base64Encoder
or JsBase64Encoder
. Instead, I do not see anything that tells me that my code from src/commonMain
and src/jsMain
have been included in these JS files.
Could you help me figure out what's going on here?Big Chungus
07/23/2021, 6:12 PMBig Chungus
07/23/2021, 6:12 PMts-consumer
and sandbox module examples in npm-publish repomike.holler
07/23/2021, 6:13 PMmike.holler
07/23/2021, 6:25 PM@ExperimentalJsExport
exists, and it does not show compile errors, but it also doesn't put the code in the JS file. Do you have experience with this @Big Chungus?mike.holler
07/23/2021, 6:25 PMBig Chungus
07/23/2021, 6:25 PMmike.holler
07/23/2021, 6:26 PMmike.holler
07/23/2021, 6:26 PMmike.holler
07/23/2021, 6:27 PMBig Chungus
07/23/2021, 6:27 PMmike.holler
07/23/2021, 6:28 PMBig Chungus
07/23/2021, 6:29 PMmike.holler
07/23/2021, 6:29 PMmike.holler
07/23/2021, 6:29 PMmike.holler
07/23/2021, 6:29 PMmike.holler
07/23/2021, 6:30 PMmike.holler
07/23/2021, 6:30 PM@JsExport
works on the actual declarations, which is surprising because that's against what the docs say should happen. Hence the yellow warnings everywhere.mike.holler
07/23/2021, 6:31 PM@JsExport
the Base64Encoder
class.mike.holler
07/23/2021, 6:31 PMmike.holler
07/23/2021, 6:31 PMBig Chungus
07/23/2021, 6:31 PMmike.holler
07/23/2021, 6:31 PMBig Chungus
07/23/2021, 6:31 PMmike.holler
07/23/2021, 6:31 PMBig Chungus
07/23/2021, 6:32 PMmike.holler
07/23/2021, 6:32 PM.js
filemike.holler
07/23/2021, 6:32 PMBig Chungus
07/23/2021, 6:33 PMmike.holler
07/23/2021, 6:33 PMmike.holler
07/23/2021, 6:33 PM.ds.ts
file is badmike.holler
07/23/2021, 6:33 PMmike.holler
07/23/2021, 6:33 PMBig Chungus
07/23/2021, 6:34 PMBig Chungus
07/23/2021, 6:34 PMBig Chungus
07/23/2021, 6:35 PMmike.holler
07/23/2021, 6:35 PM.ds.ts
mentions the interface in it, and you see red underlines. Isn't that a problem?mike.holler
07/23/2021, 6:36 PMBig Chungus
07/23/2021, 6:37 PMBig Chungus
07/23/2021, 6:37 PMmike.holler
07/23/2021, 6:38 PMinterface Base64Encoder
with @JsExport
, I get a build error.mike.holler
07/23/2021, 6:39 PMe: /home/mjholler/Git/prototypes/public-multiplatform-base64/src/commonMain/kotlin/com/example/base64/Base64.kt: (7, 11): Declaration of such kind (interface) cant be exported to JS
Big Chungus
07/23/2021, 6:39 PMBig Chungus
07/23/2021, 6:39 PMBig Chungus
07/23/2021, 6:40 PMmike.holler
07/23/2021, 6:41 PM@JsExport expect interface Base64Encoder
?mike.holler
07/23/2021, 6:41 PMBig Chungus
07/23/2021, 6:45 PM@JsExport actual external interface Base64Encode
mike.holler
07/23/2021, 6:46 PMexternal
was a keyword that could describe interfaces.Big Chungus
07/23/2021, 6:46 PMBig Chungus
07/23/2021, 6:47 PMBig Chungus
07/23/2021, 6:47 PMmike.holler
07/23/2021, 6:47 PMmike.holler
07/23/2021, 6:48 PMexpect
if it has functions with default declarations.Big Chungus
07/23/2021, 6:48 PMmike.holler
07/23/2021, 6:48 PMmike.holler
07/23/2021, 6:49 PMmike.holler
07/23/2021, 6:49 PMBig Chungus
07/23/2021, 6:49 PMBig Chungus
07/23/2021, 6:50 PMBig Chungus
07/23/2021, 6:51 PMmike.holler
07/23/2021, 6:51 PMmike.holler
07/23/2021, 6:51 PMmike.holler
07/23/2021, 6:52 PMmike.holler
07/23/2021, 6:52 PMBig Chungus
07/23/2021, 6:54 PMArkadii Ivanov
07/24/2021, 12:02 AMnpm-publish
plugin and failed. Basically the library has multiple Gradle modules. And my issue is: if module A depends on module B, and I publish locally both modules using IR mode, and I check the content of the published module A, then module A does not contain most of the public code. Also module A has some code from the module B embedded. I wrote down all my observation in the following issue: https://github.com/badoo/Reaktive/issues/488#issuecomment-873378640
Is it something known? Looks like an issue.Big Chungus
07/24/2021, 6:04 AMBig Chungus
07/24/2021, 6:31 AM