Vampire
09/10/2024, 9:54 PMturansky
09/11/2024, 10:53 AMVampire
09/11/2024, 11:56 AMturansky
09/11/2024, 1:08 PMWhat's the process to get new wrappers in?We use Karakum in Kotlin Wrappers
turansky
09/11/2024, 1:09 PMSergei Grishchenko
09/11/2024, 1:12 PMVampire
09/11/2024, 1:16 PMVampire
09/11/2024, 1:17 PMVampire
09/11/2024, 1:17 PMSergei Grishchenko
09/11/2024, 1:17 PMVampire
09/11/2024, 1:18 PMVampire
09/11/2024, 1:18 PMSergei Grishchenko
09/11/2024, 1:18 PMSergei Grishchenko
09/11/2024, 1:18 PMVampire
09/11/2024, 1:19 PMVampire
09/11/2024, 1:20 PMbut if you want to convert this lib using Karakum by yourself, I can help with consultation and advice.You mean "to convert and have it in my project", or "to convert and bring it to kotlin-wrappers"?
Sergei Grishchenko
09/11/2024, 1:24 PMVampire
09/11/2024, 2:38 PMtypes-kotlin in relation to kotlin-wrappers, or what should go where under which conditions.Vampire
09/11/2024, 2:39 PMturansky
09/11/2024, 3:03 PMtypes-kotlin - legacy convertorsturansky
09/11/2024, 3:04 PMVampire
09/11/2024, 3:11 PMtypes-kotlin is not the way to go, right?
I've seen that every readme, including kotlin-typescript (with the exception of kotlin-node) refers to types-kotlin, so started into looking at that.turansky
09/11/2024, 3:12 PMturansky
09/11/2024, 3:13 PMVampire
09/11/2024, 3:13 PMtypes-kotlin I guess πturansky
09/11/2024, 3:14 PMturansky
09/11/2024, 3:14 PMtypes-kotlin for exampleturansky
09/11/2024, 3:15 PMturansky
09/11/2024, 3:16 PMturansky
09/11/2024, 3:16 PMturansky
09/11/2024, 3:17 PMVampire
09/11/2024, 3:18 PMtypes-kotlin and in kotlin-node just there with Karakum. So it is only wrong in kotlin-typescript and everywhere else only inconsistent ;-Dturansky
09/11/2024, 3:25 PMVampire
09/11/2024, 3:52 PMfile:///D:/Sourcecode/other/kotlin-wrappers/build/js/node_modules/karakum/build/generate.js:146
plugin.setup(context);
^
TypeError: Cannot read properties of undefined (reading 'setup')
at generate (file:///D:/Sourcecode/other/kotlin-wrappers/build/js/node_modules/karakum/build/generate.js:146:16)
at async file:///D:/Sourcecode/other/kotlin-wrappers/build/js/node_modules/karakum/build/cli.js:23:1
Node.js v22.7.0Vampire
09/11/2024, 3:52 PMVampire
09/11/2024, 3:52 PMVampire
09/11/2024, 3:59 PMkotlin-wrappers/build/js/packages/kotlin-ajv.
Deleting the files in kotlin-wrappers/kotlin-ajv did not help, just deleting them there.
Seems again somewhere someone used a Copy task where they should use a Sync task.Vampire
09/11/2024, 4:47 PM"libraryNameOutputPrefix": true to get the file(s) within the package name directory
and "granularity": "top-level" to get single files and not all-in-one.
But now it wants generate an ajv.kt with most stuff and an Ajv.kt with an external interface for
declare var ajv: {
(options?: ajv.Options): ajv.Ajv;
new(options?: ajv.Options): ajv.Ajv;
ValidationError: typeof AjvErrors.ValidationError;
MissingRefError: typeof AjvErrors.MissingRefError;
$dataMetaSchema: object;
}
Do we even need the latter or is it safe to ignoreOutput it? πVampire
09/11/2024, 4:47 PMVampire
09/11/2024, 5:12 PMajv.Ajv instead of a second ajv.Ajv interface. πVampire
09/11/2024, 5:42 PMturansky
09/11/2024, 6:26 PMAlso, why are plugins not creatable in Kotlin/JS πIt's planned next step π
turansky
09/11/2024, 6:27 PMVampire
09/11/2024, 6:28 PMVampire
09/11/2024, 6:28 PMturansky
09/11/2024, 6:28 PMVampire
09/11/2024, 6:29 PMVampire
09/11/2024, 6:31 PMturansky
09/11/2024, 6:50 PMVampire
09/11/2024, 6:56 PMVampire
09/11/2024, 10:33 PMStringUnionTypePlugin.ts for example produces @seskar.js.JsValue("$id") which then on compilation complains as it is a string template, not literal. πVampire
09/11/2024, 11:52 PMturansky
09/12/2024, 7:14 AMTheIt's Karakum bug (new) πfor example producesStringUnionTypePlugin.tswhich then on compilation complains as it is a string template, not literal. π@seskar.js.JsValue("$id")
Sergei Grishchenko
09/12/2024, 11:58 AMVampire
09/20/2024, 1:32 PMpackage-lock.json and that was converted and looked halfway manageable, while the actual current version looks much more problematic to me and might still be above my TS/JS knowledge. π
For example there is a class Ajv in each, core.d.ts, ajv.d.ts, and jtd.d.ts. The latter two import the first one with a different name and extend it. When sending through Karakum it wants to put ll three into Ajv.kt and fails due to different modules. So how would I for example handle that?Sergei Grishchenko
09/23/2024, 8:00 PMcore.d.ts, ajv.d.ts, and jtd.d.ts are three different packages in terms of Java or Kotlin (see usages in screenshots). To be honest I didn't faced with such layout before. So it seems that we need to change package of output files not by file name, but by location in AST (if we are considering souse file as AST node). As simplest WA we can convert core.d.ts, ajv.d.ts, and jtd.d.ts as three independent packages, using 3 independent karakum.config.json , but I guess it is quite ugly solution π. I need to thin more about it and come out with some proposal.Sergei Grishchenko
09/23/2024, 8:02 PM"output": {
"**/core.d.ts": "<project>/generated/core",
"**/ajv.d.ts": "<project>/generated/ajv",
"**/jtd.d.ts": "<project>/generated/jtd",
}