Scope for incremental compilation refers to binaries from previous step
of IC. It is used not only in IC context itself, but also it is
subtracted from original libraries scope. Before previous commit there
was such scheme:
1. create incremental compilation context for files of specific session
2. subtract IC scope from main libraries scope
3. use updated libraries scope to create library session
4. create all needed source session(s)
So here was a side effect of creating new IC context, which
1. is smelling code, because it increases mind complexity
2. hard to implement with new session utilities
So to fix this problem this commit changes the scheme above:
1. create IC scope and modify libraries scope
2. create libraries session
3. create source session(s) and IC context for them
Now the plugin-related compiler arguments are respected then used in
the compiler configuration (only in the static part, not supported
if set in a refinement callback)
Note that the "embeddable" version of the plugin should be used if
embeddable compiler is used.
#KT-54095 fixed
- Move out getAnalyzerServices from FirFrontendFacade to TestSetupUtils
- Simplify DependencyListForCliModule. Now it takes BinaryModuleData as input
- FirOutArtifact contains several FirOutputArtifactPart
- Simplify FirFrontendFacade
The latter is used e.g. for scripts in source roots handling
as implemented in the commit
"Scripting: update scripts in source roots handling"
The former implementation did not covered all the cases.
#KT-54355 fixed
Review: https://jetbrains.team/p/kt/reviews/6753
Meaningful semantic change was splitted into 5 commits to simplify the
change review. Sinle commit would be too big.
Why replace source to binary: to get rid of kotlin-reflect in Kotlin
plugin artifact KTIJ-22276
Note: Kotlin Maven artifacts (./gradlew publish) changed their
dependency on kotlin-reflect
Review: https://jetbrains.team/p/kt/reviews/6753
Why: I'm going to replace source dependency on kotlin-reflect with
binary dependency. Normalize reflect dependency before global
processing.
#KT-53009 fixed
#KT-42810 should be possible now too, but more testing is needed
#KT-42101 can also be addressed now, but first the serialization
of the imported scripts property should be solved
required for restoring compatibility with IDE REPL usages (scratch
files included), since IDE counterpart needs a reliable signal
when the processing of the REPL snippet/command is completed
Original `ComponentRegistrar` exposes Project to its registration method,
so plugins should manually register extensions to it. To prepare for
possible unbound compiler from Project API in future new `K2ComponentRegistrar`
introduced which provides registration method without Project at all
discrepancy after switching to the new REPL internals was
discovered also on IJ plugin tests, so added a test emulating it.
also some test infra refactoring
also correctly pass externaly provided configuration on compilation
and evaluation.
Fixes REPL evaluation with dependencies passed via compilation classpath.
If only regular kotlin .kt (and .java) files are compiled, do not
register file extensions that may come from discovered script
definitions. Since the discovery is lazy by itself, this should
skip jars processing for regular compilation scenarios without scripts.
#KT-47816 fixed
- process command line properly when plugin is autoloaded
- add and fix options to disable definitions autoloading and discovery
- cleanup unused code
(partial test is added to "avoid definitions discovery" commit)
to support value types erased from runtime classes. See example
in added tests for motivation.
#KT-45065 fixed
also refactor launcher repl test and result type rendering
Reasons:
1. Those modules don't use this dependency
2. Unbundled JPS feature in IDE downloads all transitive dependencies of
kotlin-dist-for-jps-meta => downloads org.jline and puts it into dist
which is not needed