gbaldeck
11/14/2020, 8:42 PMAndrew
11/15/2020, 1:44 AMbbaldino
11/15/2020, 4:56 AMthis
) of the callback function is correct? I tried making it a receiver function on that type, but it says those are not allowed.Yan Pujante
11/15/2020, 5:02 PMbuild.gradle.kts
project.version
variable in the Javascript code? I need this value to drive some of my code and so far I hardcoded it in the kotlin code, but if I change it in the build file and forget to change it in the kotlin code it will create some issues...Zgeorge2
11/16/2020, 12:49 AMredenergy
11/16/2020, 2:30 AMlinus muema
11/16/2020, 12:34 PMDaniele B
11/16/2020, 6:03 PMbbaldino
11/16/2020, 10:40 PMsourceSets
, but it doesn't seem to work in a kotlinjs project. Is there something special I need to do there?bbaldino
11/17/2020, 12:57 AMexperimental.coroutines = Coroutines.ENABLE
to the kotlin
block in build.gradle.kts
, but I'm still getting the warning in filesNicodemus Ojwee
11/17/2020, 1:28 PMHamza GATTAL
11/17/2020, 3:03 PMMarc Knaup
11/18/2020, 1:44 AMMarc Knaup
11/18/2020, 3:25 PMSomeExternalInterface.someFun()
? 🤔
This actually compiles and works. this
will be null
in SomeDslClass.Companion.foo
which is okay because it’s not actually used.
It allows for a nice DSL with zero overhead for unused Kotlin interface types and companion classes.
external interface SomeDslClass {
@Suppress("NESTED_CLASS_IN_EXTERNAL_INTERFACE")
companion object
}
fun SomeDslClass.Companion.foo() {
console.log("it works!")
}
fun main() {
SomeDslClass.foo()
}
Robert Jaros
11/18/2020, 3:27 PMMarc Knaup
11/19/2020, 5:26 AMexternal interface
in “Main” for certain exports of “Full”?
• “Full” also seems to contain all code of “Main” which is not desired.
• I don’t know how to set up resources properly so that require
works in both modules for their local resources and in “Full” for “Main”’s resources.Andrew
11/19/2020, 6:33 AMHamza GATTAL
11/19/2020, 8:57 PMMarc Knaup
11/20/2020, 2:03 AM-Xir-per-module
compiler flag was pretty helpful here. I wonder how stable it is?
Alessandro Toninelli
11/20/2020, 1:09 PMTower Guidev2
11/20/2020, 3:57 PMciteproc-java
['de.undercouch:citeproc-java:2.0.0'
] and 'io.apisense:rhino-android:1.1.1'
I am not familair with JavaScript in any way.
Is theer any present on this channel that could provide me with some guidance please?Max
11/21/2020, 2:03 PMopen enum
. Here is the enum i want to create a wrapper for:
Types: {
webgl: 'WebGLRenderer',
svg: 'SVGRenderer',
canvas: 'CanvasRenderer'
},
Just creating a real enum under the same namespace does not work:
enum class Types{
webgl,
svg,
canvas,
}
Any help is appreciated!altavir
11/21/2020, 4:14 PMClass constructor Vector3 cannot be invoked without 'new'
The problematic code is here: https://github.com/Jiro-Digital/three-csg-ts/blob/79723fb92e3fd57725306f5d273333341df2a40d/src/index.ts#L205-L217 (in particular call of super(x,y,z)
). As far as I can undersand it could be fixed by turning on ES6 features, but Kotlin does not support them. Is there any way to fix that?Hamza GATTAL
11/22/2020, 3:42 PMYan Pujante
11/23/2020, 2:29 PMcommonWebpackConfig
syntax
kotlin {
js(IR) {
browser {
binaries.executable()
commonWebpackConfig {
outputFileName = "re-quickstart-${project.version}.js"
cssSupport.enabled = true
}
}
}
}
I don't know if it is related but I am getting an error:
Execution failed for task ':browserProductionWebpack'.
> Unable to store input properties for task ':browserProductionWebpack'. Property 'webpackConfigAppliers' with value '[org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig.() -> kotlin.Unit]' cannot be serialized.
Frankablu
11/23/2020, 8:40 PMRobert Jaros
11/23/2020, 10:28 PM@JsExport
and @Serializable
annotations. The generated JS code is not valid and fails with DCE processing because something like this is generated: package$example.<init> = Test_init;
. Is this a known issue? I know KT-39740
, but it's for IR and I'm using legacy. The same code compiles fine with IR.andylamax
11/24/2020, 4:13 AMcompileKotlinJs
compiles successfully and compileDevelopmentExecutableKotlinJs
fails to compile. With the error
> Task :webpage:compileDevelopmentExecutableKotlinJs FAILED
e: java.lang.IllegalStateException: org.jetbrains.kotlin.ir.descriptors.WrappedSimpleFunctionDescriptor@1b8f6db5 is not bound
at org.jetbrains.kotlin.ir.descriptors.WrappedDeclarationDescriptor.getOwner(WrappedDescriptors.kt:96)
at org.jetbrains.kotlin.ir.descriptors.WrappedSimpleFunctionDescriptor.getContainingDeclaration(WrappedDescriptors.kt:370)
at org.jetbrains.kotlin.resolve.DescriptorUtils.getContainingModuleOrNull(DescriptorUtils.java:200)
at org.jetbrains.kotlin.resolve.DescriptorUtils.getContainingModule(DescriptorUtils.java:185)
at org.jetbrains.kotlin.resolve.descriptorUtil.DescriptorUtilsKt.getModule(DescriptorUtils.kt:64)
at org.jetbrains.kotlin.backend.common.serialization.KotlinIrLinker.findDeserializedDeclarationForSymbol(KotlinIrLinker.kt:523)
at org.jetbrains.kotlin.backend.common.serialization.KotlinIrLinker.getDeclaration(KotlinIrLinker.kt:566)
at org.jetbrains.kotlin.ir.util.ExternalDependenciesGeneratorKt.getDeclaration(ExternalDependenciesGenerator.kt:60)
at org.jetbrains.kotlin.ir.util.ExternalDependenciesGenerator.generateUnboundSymbolsAsDependencies(ExternalDependenciesGenerator.kt:50)
at org.jetbrains.kotlin.ir.backend.js.CompilerKt.compile(compiler.kt:69)
at org.jetbrains.kotlin.ir.backend.js.CompilerKt.compile$default(compiler.kt:51)
at org.jetbrains.kotlin.cli.js.K2JsIrCompiler.doExecute(K2JsIrCompiler.kt:223)
at org.jetbrains.kotlin.cli.js.K2JSCompiler.doExecute(K2JSCompiler.java:181)
at org.jetbrains.kotlin.cli.js.K2JSCompiler.doExecute(K2JSCompiler.java:74)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:88)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:44)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:98)
at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1560)
at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':webpage:compileDevelopmentExecutableKotlinJs'.
> Internal compiler error. See log for more details
iroyo
11/24/2020, 3:59 PMimplementation(npm("webextension-polyfill", "0.7.0"))
After this I'm a bit lost. Do I need to make something special to in order to get this dependency bundled alongside my kotlin code? Do I have to manually map the polyfill to kotlin code with @JsModule?Robert Jaros
11/24/2020, 6:03 PM