This is a refactoring to simplify the API of
ExternalDependenciesGenerator and to constrain future additions of
platform-specific stub generator extensions.
since we're not always use jna (means that we can get warnings about missing jna libs)
and according to the IDEA team, NIO2 works well enough to rely on it
Introduce file attributes cache, which is only applicable when no dependencies are cached in memory cache
Refactor ScriptDependenciesCache to memory cache that is able to get configuration from cache and checks if it is up to date
Move all public methods to ScriptDependenciesManager
Introduce ScriptClassRootsManager that checks if root change event should be called after script configuration update
There were several places where we converted virtualFile to PsiFile. This operation need a read access and may throw ProcessCanceledException,
so we want to minimize its usages in IDE
move compilation cache setting to the scripting host configuration
The cache implementation can now take into account all external
dependencies that may appear during refinement.
Also change initial refinement location accordingly and rearrange
caching interfaces to make it available in scripting plugin.
The KtUsefulTestCase functionality is not used here but seems causes
the side effects resulting in failing test, probably exactly because
the infrastructure loaded by the KtUsefulTestCase is never called
The kotlin-scripting-compiler-impl jar is used in the idea plugin and
therefore should not depend on the cli parts of the compiler to avoid
dependency from the plugin to the kotlin-compiler.jar.
Therefore the cli-dependent parts were moved to the scripting plugin
jar, which is used only in cli compiler based environments.
Also implement required abstractions to allow this movement and
drop some redundant dependencies to the cli parts in other projects.
- implement error result
- refactor other result classes
- implement handling in the script evaluation extension - also restores
previous script error reporting functionality
- add possibility to customize result fileds in script and REPL
- refactor result calculation in the backend: cleanup, rename (since
it is not only about REPL now)
- reorder initialization logic, so that script definitions are
requested only after plugins loading
- clear definitions cache after adding explicit definitions or sources
#KT-32206 fixed
#KT-32169 fixed
Note: any of these modification fix the problem alone, but the second
may prevent other similar problems, while the first fixes actual logic
of the script validity checks as well.
- implement wrappers to wrap old and new API providers and resolvers
- make old API deprecated (with error where possible)
- drop old internal classes related to the old API
- refactor usages accordingly
- fix and add missing features to the scripting API where necessary