Bahaa Kallas
03/04/2020, 11:04 AMexception: java.lang.OutOfMemoryError: Java heap space
at java.base/java.util.Arrays.copyOfRange(Arrays.java:4030)
at java.base/java.lang.StringLatin1.newString(StringLatin1.java:715)
at java.base/java.lang.StringBuffer.toString(StringBuffer.java:715)
at java.base/java.io.StringWriter.toString(StringWriter.java:218)
at org.jetbrains.kotlin.js.parser.sourcemaps.JsonNode.toString(JSON.kt:24)
at org.jetbrains.kotlin.js.parser.sourcemaps.JsonObject.toString(JSON.kt:66)
at org.jetbrains.kotlin.js.sourceMap.SourceMap3Builder.build(SourceMap3Builder.java:81)
at org.jetbrains.kotlin.js.facade.TranslationResult$Success.getOutputFiles(TranslationResult.kt:133)
at org.jetbrains.kotlin.cli.js.K2JSCompiler.doExecute(K2JSCompiler.java:324)
at org.jetbrains.kotlin.cli.js.K2JSCompiler.doExecute(K2JSCompiler.java:85)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:84)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:42)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:104)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:82)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:50)
at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMainNoExit(CLITool.kt:215)
at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMain(CLITool.kt:207)
at org.jetbrains.kotlin.cli.common.CLITool.doMain(CLITool.kt)
at org.jetbrains.kotlin.cli.js.K2JSCompiler.main(K2JSCompiler.java:110)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.jetbrains.kotlin.preloading.Preloader.run(Preloader.java:81)
at org.jetbrains.kotlin.preloading.Preloader.main(Preloader.java:43)
by restarting the development server multiple times we were able to compile the project and continue working but after making some changes (so the project will recompiles) the same exception will be thrown and then we had to restart the development server again
actually its very hard to know what is the source of this problem due to the fact that is happening during the compilation and also that the compilation succeed sometimes
any directions to help us address the problem will be appreciateddazza5000
03/04/2020, 1:53 PMdazza5000
03/04/2020, 8:33 PMdazza5000
03/04/2020, 8:59 PMPHondogo
03/05/2020, 6:21 AMIlya
03/05/2020, 8:39 AMconfig.resolve.modules.push("processedResources/Js/main");
config.module.rules.push(
{
test: /\.svg$/,
use: ['@svgr/webpack']
}
);
2) included in build.gradle.kts
dependencies {
..
implementation(npm("@svgr/webpack", "5.2.0"))
}
3) placed all svg's into resources/svg/...
4) import it in kotlin like @JsModule("svg/file.svg")
5) then when i run gradle browserDevelopmentWebpack
I get for every svg:
ERROR in .../build/processedResources/Js/main/img/svg/file.svg
Module not found: Error: Can't resolve 'react' in ...
Can somebody please point at what is wrong?Robert Jaros
03/05/2020, 12:28 PMdazza5000
03/05/2020, 1:50 PMGrantas33
03/05/2020, 10:58 PMdazza5000
03/07/2020, 4:37 AMsteamstreet
03/07/2020, 6:21 PMbrowserDevelopmentWebpack
works fine, producing a large file. When I run browserProductionWeback
, the processDceKotlinJs
task reports “NO-SOURCE”, and then browserProductionWebpack
reports SKIPPED
. My configuration is fairly vanilla… here’s the target definition:
kotlin {
target {
browser {
useCommonJs()
dceTask {
keep("ktor-ktor-io.\$\$importsForInline\$\$.<http://ktor-ktor-io.io.ktor.utils.io|ktor-ktor-io.io.ktor.utils.io>")
}
webpackTask {
output.libraryTarget = COMMONJS
}
}
}
}
Any ideas what could be causing this?patrickdelconte
03/09/2020, 2:37 PMKarmaConfig
which has all the options, unfortunately the Karma’s config
property is private. Id like to do use chrome headless in a test (which is run in a container) as explained here https://docs.travis-ci.com/user/chrome#sandboxing
It seems like the translation into gradle.kts would be the following (but does not work because config
is private)
karma {
config.customLaunchers["ChromeHeadlessNoSandbox"] = CustomLauncher("ChromeHeadless").apply { flags.add("--no-sandbox") }
}
niqo01
03/10/2020, 3:07 PM> Task :main-presenter:processDceJsKotlinJs FAILED
error: duplicate target file will be created for '/home/niqo/workspace/source/social-cats/auth/client/build/libs/auth-client-js-0.1.0-SNAPSHOT.jar!social-cats-playground-client.js' and '/home/niqo/workspace/source/social-cats/session/client/build/libs/session-js-0.1.0-SNAPSHOT.jar!social-cats-playground-client.js'
Any tips on how to understand this issue and fix it ?Robert Jaros
03/10/2020, 5:20 PMtask testJar(type: Jar, dependsOn: testClasses) {
baseName = "${project.archivesBaseName}"
classifier = "tests"
from sourceSets.test.output
}
When I try to just do the same thing I've got an error > SourceSet with name 'test' not found.
.araqnid
03/11/2020, 7:40 PMdone
parameter, but the JS produced by the Kotlin/JS compiler from inspecting the test sources seems to preclude that:
test('resolve_gradle', false, function () {
var tmp$;
tmp$ = new VersionResolversTest();
tmp$.beforeTest();
try {
return tmp$.resolve_gradle();
}finally {
tmp$.afterTest();
}
});
(beforeTest
and afterTest
here were methods annotated with @BeforeTest
and @AfterTest
)
Is this output configurable in any way?Joffrey
03/11/2020, 11:45 PMonclose
and onerror
are typed with (Event) -> dynamic
instead of using CloseEvent
and ErrorEvent
respectively?
https://kotlinlang.org/api/latest/jvm/stdlib/org.w3c.dom/-web-socket/
I have to unsafeCast
them to be able to extract the values and it feels wrong. Am I missing something? Is there an actual possibility for having some other kind of events there?Hanno
03/12/2020, 7:31 AMRobert Jaros
03/14/2020, 10:57 PMbuild.gradle.kts
full path to the binary of NodeJs installed by the gradle plugin (it's ~/.gradle/nodejs/node-v12.14.0-linux-x64/bin/node
for me)?Sourabh Rawat
03/15/2020, 3:21 PMone.kt, two.kt, three.kt
. Can I generate 3 js files one.kt, two.kt and three.kt
which can be used independently?Sourabh Rawat
03/15/2020, 6:54 PMexternal
with javascript enums in kt code. ?Gunslingor
03/15/2020, 7:38 PMcall.respondHtml {
head {
title { +"Async World" }
script {
attributes["type"]=ScriptType.textJavaScript
attributes["src"]="resource/three.min.js"
}
}
body {
h1 {
attributes["id"]="title"
classes = setOf("test")
+"Title"
}
div{
+"Testing Mode: $testing"
}
}
}
nino
03/16/2020, 12:24 PMcorneil
03/16/2020, 12:28 PMgregorbg
03/16/2020, 11:11 PMsrc/main/kotlin
you can simply add src/main/java
and the Kotlin code will understand the Java class FooBar
defined in src/main/java/FooBar.java
. I understand that JS is different because of the type system (or lack thereof), but there is support for NPM packages (which are written in pure JS for the most part) as well as the external
modifier which leads me to believe some feature like this must exist in the Kotlin/JS world. It would be awesome if I can gradually migrate my project that way, similar to Kotlin/JVM. Thanks 😄Kabbura
03/19/2020, 6:14 PMkotlin {
target {
browser {
testTask {
useKarma {
useChromeHeadless()
}
}
}
}
}
This generates project-test.js
file for the test directory. I created another integrationTest
directory but I cannot figure out how to configure the test tasks to look for the integration tests directory.Rodrigo Silva
03/20/2020, 11:36 PMError: ENOENT: no such file or directory, open,
using Kotlinjstylerwilson
03/21/2020, 4:57 PM./gradlew browserProductionWebpack
tried that and it helpfully tells me this:
jsBrowserProductionWebpack
so i did that and cool, it works.
though this option does not show in the gradle tool window in IntelliJ. Is that a bug?tylerwilson
03/22/2020, 6:01 PMexternal
declaration’) or @JsName all common-level APIs. I would expect the compiler could determine whether to mangle based on whether there are overloads or not…
Any other solutions possible?Janelle Fullen
03/22/2020, 9:28 PMbashor
03/23/2020, 1:46 PMbashor
03/23/2020, 1:46 PMSvyatoslav Kuzmich [JB]
03/23/2020, 3:55 PMsdeleuze
03/23/2020, 3:56 PM