They are disabling error for using JS/Legacy backend via System property
by passing it to the Kotlin Daemon. But daemon may already be started
and not contain such property.
Workaround for now is to use 'in-process' compilation for such cases.
The patch removes logic of generating extra IrFiles (fake file) into
IrModuleFragment for the function type interfaces during klib deserialization,
because IC infrastructure can not process files which do not exist in klib.
Instead of adding extra IrFiles during deserialization, the empty files
with required packages are added into Kotlin/JS stdlib physically.
These files are used as containers for function type interface declarations.
Since Kotlin/WASM uses the same klib loading infrastructure as Kotlin/JS,
the the empty files are added into Kotlin/WASM stdlib as well.
The patch also adds a check that IrModuleFagment has files only from klib.
^KT-55720 Fixed
`@JsFun("code")` is now executed inside a JS function which brings its
`arguments` into the scope shadowing D8's CLI `arguments`.
Accessing arguments through `globalThis` fixes the problem.
Merge-request: KT-MR-8630
Merged-by: Svyatoslav Kuzmich <svyatoslav.kuzmich@jetbrains.com>
Before:
- The cinterop task's output files were added as file dependency
to the declaring target's apiElementsConfiguration
- A 'copy' task was created for the cinterop artifact that was added
to the apiElements configuration as artifact (and therefore also
to the apiElements-published). This copy task placed the
same klib into the 'libs' folder
- Before passing libraries to the compiler the, all files
that are likely to be the result of the 'copy' task (in any libs dir) were
filtered
After:
- The cinterop task's output files are *not* added as file dependency
- The cinterop task's output is added as artifact directly to
the 'apiElements' configuration
- There is no more need for a copy task
- There is no more need for manually filtering the 'libs' artifacts
Tested:
project to project dependencies,
project to project dependencies (with KGP based dependency resolution)
project to repository
project to repository (with KGP based dependency resolution)
^KT-37051 Verification Pending
Being disabled by default
and not well-documented, these functions cause confusion among early
adopters as to why their code don't work properly.
Assert APIs need a proper design across Kotlin platforms.
Since APIs are not available in common code and K/JS, it is premature
to have such a general feature in a new experimental platform.
Compiler tests:
* Mute tests that rely on assert.
* Replace JVM-specific assert calls with require calls and unmute passed K/JS tests.
Merge-request: KT-MR-8636
Merged-by: Svyatoslav Kuzmich <svyatoslav.kuzmich@jetbrains.com>
During import, cinterop generation is lenient (as there
might be good reasons why certain hosts can't generate some
cinterop klibs). In this case, the resolution for IDE
should be lenient too. When a cinterop file is resolved, that is
not present on disk, we just send a 'IdeaKotlinUnresolvedBinaryDependency'
instead.
KT-56337
Calling '.addAll()' was replacing convention value leading for inability
to add/modify Kotlin/Native link task freeCompilerArgs via
KotlinCompilation.options.freeCompilerArgs. For now convention
was replaced by normal value.
^KT-56280 Fixed
depends on closure of its default source set.
With HMPP it is no longer needed, since each source compiles
independently and sees its parent declarations via klib dependencies
^KT-55730 Verification Pending
The check itself happens during application time, remove the health
check wrapper for reporting to make the code more clear. One downside is
that the warning could be reported on misconfigured projects, but it's
a minor inconvenience.
KT-55891