Zimin Byun
08/01/2021, 11:06 PM@JsModule
annotation needs additional dependency? (used in this link)
(I’m trying to make javascriptModule from kotlin.)Nikolai Sviridov
08/02/2021, 10:11 AMPitel
08/02/2021, 10:13 AM> Task :compileKotlinJs FAILED
e: java.lang.IllegalArgumentException: Failed requirement.
at org.jetbrains.kotlin.backend.common.serialization.IrDeclarationDeserializer.deserializeIrTypeAlias(IrDeclarationDeserializer.kt:368)
at org.jetbrains.kotlin.backend.common.serialization.IrDeclarationDeserializer.deserializeDeclaration(IrDeclarationDeserializer.kt:752)
at org.jetbrains.kotlin.backend.common.serialization.IrFileDeserializer.deserializeDeclaration(IrFileDeserializer.kt:39)
at org.jetbrains.kotlin.backend.common.serialization.FileDeserializationState.deserializeAllFileReachableTopLevel(IrFileDeserializer.kt:139)
at org.jetbrains.kotlin.backend.common.serialization.ModuleDeserializationState.deserializeReachableDeclarations(BasicIrModuleDeserializer.kt:172)
at org.jetbrains.kotlin.backend.common.serialization.BasicIrModuleDeserializer.deserializeReachableDeclarations(BasicIrModuleDeserializer.kt:148)
at org.jetbrains.kotlin.backend.common.serialization.KotlinIrLinker.deserializeAllReachableTopLevels(KotlinIrLinker.kt:102)
at org.jetbrains.kotlin.backend.common.serialization.KotlinIrLinker.findDeserializedDeclarationForSymbol(KotlinIrLinker.kt:121)
at org.jetbrains.kotlin.backend.common.serialization.KotlinIrLinker.getDeclaration(KotlinIrLinker.kt:159)
How can I figure out which requirement? I can't find the IrDeclarationDeserializer.kt
source using :google:.
Btw, it started happnening when I changed my custom Material UI wrapper for Muirwik. It seems totaly unrelated, but I can reliably reproduce it by just changing git branches. Oh, and I just have 2 simple data classes marked as @Serializable
.Rescribet
08/02/2021, 3:24 PMbasis
defaults to FlexBasis.auto
rather than FlexBasis.none
// CSS
flex: 1;
// Kotlin
flex(1.0) // Different
flex(1.0, basis = FlexBasis.none) // same
Noticed this since I didn’t understand why my colleague used put("flex", "1")
over flex(1.0)
Robert Jaros
08/03/2021, 7:47 AMAttila Király
08/03/2021, 4:10 PMGUIGAL Allan
08/03/2021, 7:16 PMmike.holler
08/03/2021, 7:48 PMError_0: Fail to fetch
Error_0: Fail to fetch
at _no_name_provided__246.invoke_1ti8hr(kotlin/multiplatform-sdk-end-to-end-tests-test.js:69724)
at <global>.<unknown>(/home/mjholler/Git/multiplatform-sdk/build/js/packages/multiplatform-sdk-end-to-end-tests-test/kotlin/multiplatform-sdk-end-to-end-tests-test.js:69752)
at <global>.processTicksAndRejections(internal/process/task_queues.js:93)
Pitel
08/05/2021, 6:54 AMPitel
08/05/2021, 9:06 AMrEnhancer()
with Redux DevTools?
I have
compose(
rEnhancer()
) {
if (window.asDynamic().__REDUX_DEVTOOLS_EXTENSION__) {
console.log("__REDUX_DEVTOOLS_EXTENSION__")
window.asDynamic().__REDUX_DEVTOOLS_EXTENSION__()
} else {
it
}
}
But it gives me errors in my app.Ayfri
08/05/2021, 6:32 PMseskar.js.JsUnion
?Ayfri
08/06/2021, 4:44 PMUse inline extension function with body using dynamic
but I don't understand what it isChilli
08/08/2021, 4:25 PMbuild.gradle.kts
:
plugins {
kotlin("multiplatform") version "1.5.10"
}
group = "me.chilli"
version = "1.0"
repositories {
mavenCentral()
}
kotlin {
// ... [JVM config here]
js(IR) {
browser {
webpackTask {
sourceMaps = true
}
commonWebpackConfig {
cssSupport.enabled = true
}
}
}
// ...
sourceSets {
// ...
val jsMain by getting
// ...
}
}
And then trying to run it using gradlew browserDevelopmentRun
but it gives me:
FAILURE: Build failed with an exception.
* What went wrong:
Task 'browserDevelopmentRun' not found in root project '...'.
GUIGAL Allan
08/08/2021, 4:47 PMAyfri
08/08/2021, 4:58 PMclass Test {
readonly a: string
b: number
c(): typeof Test
}
I mean, what typeof Test
should be in Kotlin ? I thought of Class<Test>
but I guess it's not rightshama
08/10/2021, 4:04 AMimplementation(npm("ember-source", "3.12.0"))
will use the package main node_modules/ember-source/lib/index.js
which is an installer script for Ember CLI but the actual front end libraries are located in node_modules/ember-source/dist/
. Is there a way to have it consider a sub-folder of the module as the module? Or other suggestions? Thanks!atsushieno
08/10/2021, 4:50 PMnpm ERR! missing: @js-joda/core@3.2.0, required by Kotlin-DateTime-library-kotlinx-datetime-js-legacy@0.2.0
... any help/hints appreciated.Tuna
08/11/2021, 12:00 AMBuildConfig.DEBUG
on AndroidWukongRework.exe
08/11/2021, 4:32 AMPaul SOUTEYRAT
08/11/2021, 9:14 PMinline
functions in Kotlin JS, and I saw that they are not really compiled as-is and that defineInlineFunction
is used instead. Therefore, I am wondering, what's the purpose of defineInlineFunction
? And is there any way to have a real inline
in Kotlin JS (with an annotation for instance) ?
PS: I am using the legacy JS compiler, is this behavior different in IR ?Tristan
08/12/2021, 1:38 AMfkrauthan
08/12/2021, 4:28 AMPitel
08/12/2021, 9:11 AMzhCN
object in Kotlin? I have this, but it's undefined
.
@JsModule("@material-ui/core/locale")
@JsNonModule
@JsName("zhCN")
external val locale: dynamic
hfhbd
08/12/2021, 3:05 PMkotlinx.datetime.Instant
. How do you export kotlinx.datetime.Instant
to create an Instant in typescript?andylamax
08/13/2021, 2:11 AMprintln(message: Any?)
is not working as expected in testing
Take the bellow code for example
println("Start")
println("End")
Expected printed output should be
Start
End
Actual printed output
StartEnd
However, the code below
println("Start\n")
println("End\n")
Prints
Start
End
Instead of
Start
End
Tested on
OS: Linux
Browser: ChromeBrowser and ChromeHeadless,
Kotlin: 1.5.0, 1.5.10, 1.5.20, 1.5.21, 1.5.30-RC
Target: JS/IRChristian Hausknecht
08/13/2021, 3:49 PMinput
element with a datalist
attached as kind of "type ahead" component. In order to add some logic within an UI framework (I work on the fritz2 framework FYI), one need to register a listener on specific events of course. For this use case I consider the input
event as the best fitting one. According to MDN the event has the interface InputEvent
.
But this seems to be false for some circumstances and browsers: If one selects a proposal from the datalist at least in Chrome and Safari Browsers (mobile too) instead a simple Event
event is fired!
Here is a small HTML file to make this visible:
<html>
<body>
<input id="myinput" type="text" list="mydata">
<datalist id="mydata">
<option value="Kotlin"></option>
<option value="Scala"></option>
<option value="Java"></option>
<option value="Python"></option>
<option value="Commodore Basic V2"></option>
</datalist>
<script>
document.getElementById("myinput").oninput = function(e) {
console.log(Object.getPrototypeOf(e))
}
</script>
</body>
</html>
In Firefox one always get the InputEvent
no matter if just typing a letter or selecting a proposal from the list. In Chrome or Safari this differs; when selecting from the list, only Event
is fired.
This leads to problems in Kotlin of course if one tries to cast this depending on the event name, as input
does not always return the same type as shown above.
How to deal with this situation? Is there some kind of specification that reveals the different events for the different browsers? What's the reason for browsers to offer different event types for the same event key?
(If someone has interest in the framework specific impacts, have a look at the appropriate PR on github, which will lead to the relevant code sections.)Erik
08/13/2021, 5:42 PMReferenceError: Buffer is not defined
I can reproduce it here: https://pl.kotl.in/AklbZ91yN
How do I proceed to...
• ... solve this issue locally?
• ... report this reproducible bug?Tristan
08/15/2021, 9:15 PMd.ts
file:
kotlinx.coroutines.flow.SharedFlow<kotlin.collections.List<string>>
I currently use
sourceSets {
all {
languageSettings.useExperimentalAnnotation("kotlinx.serialization.ExperimentalSerializationApi")
}
val commonMain by getting {
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-serialization-protobuf:1.2.2")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1")
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
}
}
val jsMain by getting
val jsTest by getting
}
How can I include the definitions from kotlin stdlib and coroutines?Tristan
08/15/2021, 9:26 PMandylamax
08/15/2021, 11:12 PMjsBrowserDevelopmentRun FAILED
[webpack-cli] Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration has an unknown property '_assetEmittingWrittenFiles'. These properties are valid:
object { bonjour?, client?, compress?, dev?, firewall?, headers?, historyApiFallback?, host?, hot?, http2?, https?, liveReload?, onAfterSetupMiddleware?, onBeforeSetupMiddleware?, onListening?, open?, port?, proxy?, public?, setupExitSignals?, static?, transportMode?, watchFiles? }
Help?
Kotlin 1.5.10andylamax
08/15/2021, 11:12 PMjsBrowserDevelopmentRun FAILED
[webpack-cli] Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration has an unknown property '_assetEmittingWrittenFiles'. These properties are valid:
object { bonjour?, client?, compress?, dev?, firewall?, headers?, historyApiFallback?, host?, hot?, http2?, https?, liveReload?, onAfterSetupMiddleware?, onBeforeSetupMiddleware?, onListening?, open?, port?, proxy?, public?, setupExitSignals?, static?, transportMode?, watchFiles? }
Help?
Kotlin 1.5.10turansky
08/16/2021, 12:52 AMGUIGAL Allan
08/16/2021, 1:13 AMturansky
08/16/2021, 1:27 AMwebpack.version = "5.50.0"
webpackCli.version = "4.7.2" webpackDevServer.version = "4.0.0-rc.0"
Jeff Davidson
08/16/2021, 3:35 AMJan Weidenhaupt
08/16/2021, 8:35 AMjsRun
task downloads the webpack version 5.38.1
and webpack-cli version 4.7.1
in my project when using Kotlin 1.5.30-RC
which i can see in the node_modules folder. Is there are way to update this versions?Ilya Kalibrov [JB]
08/16/2021, 8:55 AMOleksandr Karpovich [JB]
08/16/2021, 9:03 AMIlya Kalibrov [JB]
08/16/2021, 9:16 AMPitel
08/16/2021, 9:27 AMandylamax
08/16/2021, 12:21 PMkotlin.js.webpack.major.version=4
in gradle.properties
And now I am getting
Execution failed for task jsBrowserDevelopmentRun
> ✖ 「wds」: webpack Dev Server Invalid Options
options should NOT have additional properties
rootProject.plugins.withType(org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin::class.java) {
rootProject.the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension>().versions.webpackDevServer.version =
"4.0.0-rc.0"
}
worked for meRobert Jaros
08/16/2021, 2:51 PMCLOVIS
08/16/2021, 6:43 PMGUIGAL Allan
08/16/2021, 9:37 PM