Base method `RawFirBuilder.Visitor.convertElement` has a parameter with
default value, its overridden one in `VisitorWithReplacement` is not
allowed to declare default. So far so good.
During its work the compiler throws an exception:
`java.lang.IllegalArgumentException: No argument for parameter`.
Prior to this commit code completion for .kts files was supported only
partially. Script has an implicit receiver - base class representing a
script itself, the point where its basic API resides. The knowledge of
this receiver was missing.
There are at least two context where this knowledge is crucial:
1. Code highlighting (worked fine)
2. Code completion (failed)
`FirScriptConfiguratorExtension` is responsible for filling
`FirScriptBuilder` with base script class (in addition to other
properties). See usages of [1] in its implementation.
The thing is that resolution during the completion works a bit
different. Instead of converting the entire `KtFile` it's interested
in `KtScript` only. See usages of [2].
`RawFirBuilder.Visitor.visitScript` is where implicit receivers were
missing.
Code completion and inspections applied to `.kts` files already have
`FirScript` and don't require its full reconstruction with expensive
`FirScriptConfiguratorExtension`. `RawFirBuilder.Visitor` was modified
to support sometimes already existing `FirElement`.
----------------------------------------------------------------
[1]: ScriptCompilationConfiguration.baseClass
[2]: RawFirBuilder.Visitor.convertScript
To be reported with [1] imports require source. It was missing for
implicit script imports.
`FirScriptConfiguratorExtensionImpl` was extended and now adds fake
source elements (users don't see imports in the source code).
Since diagnostics for implicit import statements are meaningless for
IDE, they are suppressed in `LLFirDiagnosticReporter`.
----------------------------------------------------------------------
[1]: DiagnosticReporter.reportOn()
The following two registrars were missing:
- FirScriptingCompilerExtensionIdeRegistrar
- FirScriptingSamWithReceiverExtensionRegistrar
`FirScriptingCompilerExtensionIdeRegistrar` was introduced as a copy of
`FirScriptingCompilerExtensionRegistrar` adapted for usage from IDE.
`FirRegisteredPluginAnnotations` and `FirJvmTypeMapper` are mandatory at
`FirExtensionService.registerExtensions` and reported as missing at
runtime.
Default imports coming from script configuration can be of "star" type.
Prior to this commit they were effectively ignored due to a bug at FQN
assembly.
Before: org.gradle.dsl.* => org.gradle.dsl.
After: org.gradle.dsl.* => org.gradle.dsl
On linux, some memory access patterns cause a cascade of page faults. By
asking mmap for MAP_POPULATE on linux, the page faults happen up front
in a much more efficient manner.
Co-authored-by: Troels Lund <troels@google.com>
Merge-request: KOTLIN-MR-697
Merged-by: Alexander Shabalin <alexander.shabalin@jetbrains.com>
Do not export extensions of classes that are
hidden from the generated Objective-C API.
Merge-request: KT-MR-10330
Merged-by: Sergey Bogolepov <sergey.bogolepov@jetbrains.com>
> Condition 'isSuspendFunctionType' is always false when reached
The change in the native tests is needed, because K2
doesn't support disabling old language features
^KT-58623 Fixed
Update the component function visibility
based on the already resolved visibility
of the property before transforming
the status of the component function itself.
^KT-58184 Fixed
Attach source information to each argument of the type before expanding
to preserve information during validation. This allows errors to be
reported on the original argument during nested type alias expansion.
^KT-50798 Fixed
^KT-50703 Fixed
The `withDependsOnClosure` is live object, it is ok to request it early
as long as other properties will read data from it at the end of the
configuration.
^KT-58471 Verification Pending
It is unknown why we would need to include commonMain source set
explicitly from kotlinExtension.sourceSets.
Few assumptions:
* common main source set loaded somehow from different classloader
* compatibility with legacy multipaltform plugins
^KT-58471 Verification Pending
If MetadataDependencyTransformation is triggered it will resolve related
metadata dependency configuration. Which is not recommended from gradle
performance point of view.
Update CInterop[MDT]Task to work as regular [MDT]Task i.e. it will
process project dependencies during task execution but keep the original
functionality for IDE. Since during IDE import it is expected to resolve
configurations during gradle configuration phase.
^KT-58471 Verification Pending
These tasks are essentially operating on the same inputs but produces
different ouputs. Therefore, it makes sense to extract their Task Inputs
into a separate container and let these tasks share it.
KT-58471 Verification Pending