Using relative paths for dotlin in pubspec.yaml throws error: Missing scheme
Closed this issue · 2 comments
eggnstone commented
Using relative paths in pubspec.yaml like path: ../../../GitHub/dotlin/packages/dotlin
throws error.
(Running under Windows10 with git bash (mingw64) and Java19)
Exception in thread "main" java.lang.IllegalArgumentException: Missing scheme
at java.base/java.nio.file.Path.of(Path.java:199)
at java.base/java.nio.file.Paths.get(Paths.java:98)
at org.dotlin.compiler.backend.DartProject$Companion.from(DartPackage.kt:106)
at org.dotlin.compiler.backend.DartProject$Companion$from$1.invokeSuspend(DartPackage.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
at org.dotlin.compiler.KotlinToDartCompiler.compile(KotlinToDartCompiler.kt:79)
at org.dotlin.compiler.cli.command.Compile.run(Compile.kt:37)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:198)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:18)
at com.github.ajalt.clikt.core.CliktCommand.parse(CliktCommand.kt:400)
at com.github.ajalt.clikt.core.CliktCommand.parse$default(CliktCommand.kt:397)
at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:415)
at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:440)
at org.dotlin.compiler.Dotlin.main(Main.kt:26)
pubspec.yaml:
name: test
version: 1.0.0
environment:
sdk: '>=2.18.0 <3.0.0'
publish_to: none
dependencies:
dotlin:
path: ../../../GitHub/dotlin/packages/dotlin
dev_dependencies:
dotlin_generator:
path: ../../../GitHub/dotlin/packages/dotlin_generator
Originally posted by @eggnstone in #5 (comment)
eggnstone commented
The error with missing scheme is gone, but when I use a relative path I get the error below.
Switching back to relative path and the error is gone.
Exception in thread "main" java.lang.AssertionError: Built-in class kotlin.Any is not found
at org.jetbrains.kotlin.builtins.KotlinBuiltIns$3.invoke(KotlinBuiltIns.java:93)
at org.jetbrains.kotlin.builtins.KotlinBuiltIns$3.invoke(KotlinBuiltIns.java:88)
at org.jetbrains.kotlin.storage.LockBasedStorageManager$MapBasedMemoizedFunction.invoke(LockBasedStorageManager.java:578)
at org.jetbrains.kotlin.storage.LockBasedStorageManager$MapBasedMemoizedFunctionToNotNull.invoke(LockBasedStorageManager.java:651)
at org.jetbrains.kotlin.builtins.KotlinBuiltIns.getBuiltInClassByName(KotlinBuiltIns.java:223)
wilkomanger commented
Do you get the same result when running the test at compiler/src/test/kotlin/project/Project.kt
?