Invocation of Logger.fatal() may cause severe side effects such as
throwing an exception or even terminating the current JVM process
(check various implementations of this function for details).
The code that uses Logger.fatal() sometimes expects a particular kind
of side effect. This is totally a design flaw. And it's definitely not
a responsibility of Logger to influence the execution flow of
the program.
- Make the messages that are reported by KLIB resolver prettier
- For those messages that affect the resolve process add
prefix "KLIB resolver: "
- Don't log warning on duplicated libraries on the classpath. This
does not make any sense.
^KT-63573
This function is only used for probing if a library at the given
path exists. Any errors or warnings logged by this function could
only bring a user to a confusion. So, it's better to avoid any
logging here.
^KT-63573
The reason of this change is to make messages (especially warnings)
that are reported by the KLIB resolver become visible to the end user.
This can be achieved to forwarding such messages to the appropriate
compiler's components such as
`org.jetbrains.kotlin.cli.common.messages.MessageCollector` and
`org.jetbrains.kotlin.ir.util.IrMessageLogger`.
Also: The default `DummyLogger` should be used as minimal as possible.
Because it just forwards messages to the standard output (console)
where they can remain unattended. When the compiler is executed
from the Gradle plugin such messages appear only in DEBUG Gradle's log.
^KT-63573
The commit removes all the KLib resolution logic,
now Analysis API Standalone clients need to provide all the KLib
list directly.
The resolution logic was removed as too error-prone and requiring compiler configurations.
Kotlin Gradle plugin can provide a full set of required KLibs,
so if a client is a Gradle plugin, this should not be an issue.
Probably, some fancy API which will explicitly perform all KLib dependency searches
should be introduced in the future (KT-63395)
^KT-63126 fixed
The `kotlin-test` dependencies are left untouched as changing them affects publications, thus these versions are independent from the used inside our build
#KTI-1349 In Progress
* Code was moved to utils, but sources are included to the shared
until bootstrap advance.
* Fixed dependencies and set API & LV to 1.4 for the modules used with
Gradle.
Merge-request: KT-MR-9122
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
^KT-55808 Fixed
Review: https://jetbrains.team/p/kt/reviews/8401
If I don't bump `versions.kotlin-native` then locally
`kotlinx.coroutines` & `kotlinx.atomicfu` user projects compilation
fails with message:
```
w: skipping /home/bobko/jb/kotlinx-atomicfu/atomicfu/build/classes/kotlin/metadata/commonMain. Incompatible abi version. The current default is '1.7.0', found '1.8.0'. The library produced by 1.8.255 compiler
e: Could not find "/home/bobko/jb/kotlinx-atomicfu/atomicfu/build/classes/kotlin/metadata/commonMain" in [/home/bobko/jb/kotlinx-atomicfu, /home/bobko/.konan/klib, /home/bobko/.konan/kotlin-native-prebuilt-linux-x86_64-1.8.20-dev-5812/klib/common, /home/bobko/.konan/kotlin-native-prebuilt-linux-x86_64-1.8.20-dev-5812/klib/platform/linux_x64]
```
It worth noticing that we hardcoded "1.9.0-dev-693" on CI
(kotlin-teamcity-build/6693cb229c7485e07241fbc28322344774bcc3e0) to
workaround KTI-1107. 1.9.0-dev-693 also bumps KotlinAbiVersion
Review: https://jetbrains.team/p/kt/reviews/8401
In scope of: KT-55082
Because this version isn't used for anything. We have KotlinAbiVersion
to version the IR format.
Review: https://jetbrains.team/p/kt/reviews/8401
- Code style
- Drop unused properties in kotlin-native/build.gradle
- kotlin-native/build.gradle: drop unused import
- use final instead of open when possible
This is just a cleanup commit. It neither fixes any issue/bug, nor
introduces new behaviour.
Feel free to revert this commit if you find out that it breaks something
* Replace it with KotlinCompilerVersion
* K/N version should be set now with `deployVersion`.
* Cleanup deprecated functions in older versions
of the Gradle plugin
* Cleanup tests for older versions of compiler downloader
Merge-request: KT-MR-8436
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
This allows the compiler to limit imports from "magic" packages like
cnames.structs to forward declarations actually present in dependent
cinterop klibs.
The manifest already had `exportForwardDeclarations` field, but
- it didn't include Objective-C forward declarations (@class, @protocol)
- it has a slightly different meaning (the export list enables importing
the listed declarations through the interop package of the library,
while the include list shouldn't do that), so we better avoid mixing
them.
Review: https://jetbrains.team/p/kt/reviews/8360
MetadataComparisonTest was the only one in build-tools module who
depended on util-klib, that's why we can drop build-tools -> util-klib
dependency
MetadataComparisonTest is no longer needed, that's why we can drop it.
The dependency drop is a one step forward in dropping
`kotlin.srcDir("../compiler/util-klib/src")` line in
`buildSrc/build.gradle.kts`. Adding source roots in `buildSrc` is hacky
and can lead to frustrations (e.g. KT-55874). That's why it's desirable
to drop buildSrc -> util-klib hacky dependency.
Unfortunatelly, I couldn't drop buildSrc -> util-klib dependency,
because:
1. buildSrc depends on kotlin-native/shared/src/library/kotlin +
buildSrc depends on kotlin-native/tools/kotlin-native-gradle-plugin +
maybe smth else
2. kotlin-native/shared/src/library/kotlin depends on util-klib +
kotlin-native/tools/kotlin-native-gradle-plugin depends on util-klib +
maybe smth else
When loading default libraries, the code assumed that all subdirectories
of <kotlin native home>/klib/*/ corresponded to valid libraries. The bug
report only considers the case of .DS_STORE, which is generated by
Finder on MacOS, but this case has already been accounted for in the
code.
The fix filters out all subdirectories that are not stdlib and don’t have the
“org.jetbrains.kotlin” prefix.
Co-authored-by: Troels Lund <troels@google.com>
KLIB forward compatibility was broken during work related to
definitely not-null types, but version was not changed. This led to
exceptions in compiler instead of meaningful error.
^KT-52518