Commit Graph

2824 Commits

Author SHA1 Message Date
Jinseong Jeon 911963bafd CLI: utilize JRT path split (w/o magic number) 2022-06-21 11:34:09 +02:00
Mikhael Bogdanov 41d6f0dca4 Remove ir.tree.impl from build 2022-06-20 11:42:52 +00:00
Simon Ogorodnik b7a215334e KT-52409 Report error when using K2 with multi-platform 2022-06-20 10:39:25 +00:00
Alexander Udalov 2a9fd47755 Minor, update JVM target versions in -Xjdk-release help 2022-06-17 10:40:35 +00:00
Ilya Chernikov c2316ca305 Scripting: avoid definitions discovery when compiling regular kotlin
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
2022-06-16 21:28:07 +00:00
Ilya Chernikov 5caf2a2aca Scripting: refactor plugin command line processing
- 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)
2022-06-16 21:28:07 +00:00
Ilya Chernikov a8c4ea04c8 Scripting: add check for 'kotlin' package similar to the regular sources
#KT-52598 fixed
2022-06-16 21:28:06 +00:00
Ilya Chernikov 855059b93c Scripting: update scripts in source roots handling
#KT-52525 fixed
related to #KT-52735
2022-06-16 21:28:06 +00:00
Ilya Chernikov bffe94e48a minor: simplify dependencies of setIdeaIoUseFallback
since kotlin needs now jvm 8 or above, we can drop the checks
2022-06-16 21:28:05 +00:00
Ilya Chernikov 597677dae3 Scripting: refactor history handling in legacy REPL using new infra
#KT-47187 fixed
2022-06-16 21:28:03 +00:00
Ilya Chernikov 92bf260057 Scripting: Implement conditional conversion for REPL result values
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
2022-06-16 21:28:03 +00:00
Ilya Chernikov b36d1be5f8 Scripting: switch legacy CLI REPL to the new infrastructure 2022-06-16 21:28:02 +00:00
Sergej Jaskiewicz 53233c487e [JS] Factor out source map path rewriting 2022-06-16 10:02:05 +00:00
Sergej Jaskiewicz 0320d49ddc [JS IR] Generate sourcemaps for JS IR tests 2022-06-16 10:02:04 +00:00
Alexander Korepanov 9e780afdca [JS IR] Rework incremental cache invalidation
Replace loading the whole world IR with loading only exported (reachable) IR.

 For that purpose the direct and inverse dependency graph is used.
 It is stored in a cache directory and the cache updater keeps it up to date.
 If after loading it is found that other files must be also implicitly rebuilt
 (see rebuilt reasons below), IR for that files also will be loaded.
 This algorithm repeats until the number of implicitly rebuilt files is not 0.

 More rebuilt reasons (dirty state) have been added:
  - added file: this is a new file;
  - modified ir: ir of the file has been updated;
  - updated exports: exports from the file have been added or removed
    (e.g. a function has been used from another file);
  - updated inline imports: imported inline function has been modified
    (transitively);
  - removed inverse depends: a dependent file has been removed;
  - removed direct depends: a dependency file has been removed;
  - removed file: this file has been removed.

 Incremental cache tests has been refactored:
  - The supporting of all rebuilt reasons (dirty states) has been added;
  - New file name format "*.$suffix.kt" for the test steps has been allowed,
    so the syntax highlight works now;
  - Explicit stdlib dependency usage has been removed.
2022-06-13 20:04:05 +00:00
Jinseong Jeon 2eab61d75f FIR CLI: remove redundant cast and run 2022-06-13 18:41:17 +02:00
Jinseong Jeon d2663cfb94 FIR CLI: fix typos in contentRootToVirtualFile util 2022-06-13 18:41:17 +02:00
Alexander Udalov ec9d929532 Remove dependency of fir2ir:jvm-backend on backend.jvm.entrypoint
Extract JvmIrDeserializer(Impl), similarly to the existing
JvmIrSerializer(Impl). Remove `allowErrorNodes` which is always false
anyway.
2022-06-13 12:35:51 +00:00
pyos 3840d09314 FIR: fix check for plugins that support K2 2022-06-10 09:47:35 +03:00
nataliya.valtman b19837aa02 Change log level for compiler performance metrics 2022-06-09 08:55:47 +00:00
Igor Yakovlev f996278171 [WASM] Support for mjs universal launcher 2022-06-07 20:59:03 +00:00
Dmitriy Novozhilov 4003ca0691 [FE] Add ability to set compatibility of plugin with K2 in ComponentRegistrar 2022-06-07 14:12:14 +00:00
Mikhail Glukhikh 8baff4404d Partial rename of 'Experimentality' around K1 checkers 2022-06-02 15:36:56 +00:00
Nikolay Lunyak ac1fb07102 [FIR JS] Add checkers.js 2022-06-02 13:47:28 +00:00
Sergej Jaskiewicz e03747ea7d [JS IR] Introduce the GENERATE_INLINE_ANONYMOUS_FUNCTIONS feature flag 2022-06-01 09:02:31 +00:00
Nikita Bobko 69cf454747 Drop org.jline and org.fusesource.jansi redundant dependencies
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
2022-05-30 17:09:28 +02:00
Alexander Udalov a7f4981fe5 Normalize virtual file paths to prevent duplicate sources
#KT-52465 Fixed
2022-05-27 23:40:57 +02:00
Alexander Udalov 70121f0c78 Report error on non-existent classpath in -Xplugin
#KT-52380 Fixed
2022-05-27 13:13:33 +02:00
Victor Petukhov fbb2e18bea [FE 1.0] Use 1.7.20 as default language version for java type enhancement
^KT-50478
2022-05-23 12:36:31 +02:00
Igor Yakovlev 3d3526e3d0 [WASM] Workaround for compiled wasm runs under node 2022-05-20 16:33:58 +02:00
Svyatoslav Kuzmich 84ed3ff5b0 [Wasm] Don't generate wat format by default in box tests
Gives ~15% tests speedup
Use kotlin.wasm.debugMode=1 to enable old behaviour
2022-05-20 13:34:28 +00:00
Georgy Bronnikov e0c175bb50 Fir2Ir: remove symbolTable as separate component from FirResult
It's already in components.
2022-05-19 12:02:41 +02:00
Georgy Bronnikov 3f66b31a47 Fir2Ir: add irProviders to Fir2IrComponents
Removes the last use of DeclarationStubGenerator in the FIR pipeline.
2022-05-19 12:02:41 +02:00
Georgy Bronnikov 13d4d60afa Fir2Ir: pass Fir2IrExtensions to backend 2022-05-19 12:02:41 +02:00
Georgy Bronnikov 3c3c1be543 Fir2Ir: introduce Fir2IrExtensions
This allows us to remove DeclarationStubGenerator from Fir2IrConverter,
thus reducing dependency on descriptor-based code.
2022-05-19 12:02:41 +02:00
Vladimir Dolzhenko efd5beb49b IJ file type optimizations based on extension
#KTIJ-21668

Merge-request: KT-MR-6288
Merged-by: Vladimir Dolzhenko <Vladimir.Dolzhenko@jetbrains.com>
2022-05-17 14:46:00 +00:00
Ilya Chernikov 6b09ace099 FIR LT: fix bootstrap compilation error
if the existing list in the FRIENDS_PATH config property created with
Arrays.asList, it contains non-extendable list, and attempt to use
addAll on it leads to an exception.
2022-05-12 08:45:40 +02:00
Mads Ager c6d7c23940 Always take java source before class files.
Also when searching for inner classes.

^Fixes KT-51025
2022-05-05 13:21:06 +02:00
Ilya Chernikov cdb5845693 [minor] fix double warning about FastJarFS 2022-04-29 11:03:13 +00:00
Simon Ogorodnik 58885a1b07 KT-52217 Rename 'use-fir' to 'use-k2', update message 2022-04-28 15:42:42 +00:00
Mikhail Glukhikh 08ba89b4ec CLI K2: report an error for JS/Native/Metadata #KT-52035 Fixed 2022-04-28 13:25:48 +00:00
Igor Laevsky 3de1235fda [WASM] Add command line option to enable/disable assertions 2022-04-26 20:41:52 +00:00
Dmitriy Novozhilov 19f4c3edda [CLI] Report compilation error if compiler plugins are enabled alongside with K2 compiler
^KT-52037 Fixed
2022-04-26 21:03:04 +04:00
Alexander Udalov 2e515f3945 Prohibit JVM target 1.6
But still compile stdlib, reflect, kotlin.test and scripting runtimes
with JVM target 1.6 to simplify migration from Kotlin 1.6 to 1.7.

 #KT-45165 Fixed
2022-04-19 22:54:40 +02:00
Aleksei.Cherepanov 3d8f140d6b [JPS] Fix incremental build after changing Java enum used in Kotlin when
EnumWhenTracker implemented for tracking changed java enum class items, that used in kotlin when expression.

#KT-47824 Fixed
2022-04-19 18:39:41 +00:00
Ilya Kirillov 69a53bc742 [low level fir] use correct FirModuleData for declarations provided by FirJavaFacade 2022-04-13 12:53:23 +02:00
Artem Kobzar 7ef14fc11b chore: use CompositeBlock instead of GlobalBlock. 2022-04-11 10:37:14 +00:00
Alexander Udalov 6402c3908c Validate -Xbackend-threads CLI argument value
#KT-51846 Fixed
2022-04-08 14:01:21 +02:00
Igor Laevsky 81eae94821 [Wasm] Disable range checks for arrays. Add cli argument to enable them back. 2022-04-05 18:00:32 +00:00
Alexander Korepanov 9952d43252 [JS IR] IC improvements
- Reuse a built fragment
  - Use cache for saving built JS code
2022-04-04 17:42:04 +00:00