Commit Graph

237 Commits

Author SHA1 Message Date
Alexander Udalov 6e67e1e78d Replace appendln with appendLine in project 2020-06-11 13:01:30 +02:00
Ilya Chernikov 5e33612238 Extract interface from CompilerMessageLocation to ease extension
The CompilerMessageLocation is an implicit part of the binary daemon
protocol so changing it breaks compatibility with older daemons.
This change allows to extend location for non-daemon uses without
breaking the binary protocol.
2020-06-05 21:58:27 +02:00
Alexey Tsvetkov 4ccec5218f Remove dirty output files when expanding IC scope early
Previously IC could go to the next iteration without removing
outputs for the files compiled during the last iteration.
For example, it could happen, when a multifile part is changed
(we add sources for other parts and recompile everything together).

In case of MPP it could lead to compile error, because
the compiler would see the same actual declarations from dirty sources
and dirty outputs from previous iteration (which should have been removed).
That behaviour did not raise an error before dc8240c24e
because actual declarations from binaries (e.g. compile classpath) were ignored.

    #KT-35957 Fixed
2020-04-18 06:05:44 +03:00
Alexey Tsvetkov 2442abadc3 Add test for KT-35957 2020-04-18 06:05:44 +03:00
Alexey Tsvetkov 876d6d209f Minor: move non-JPS MPP IC tests under incremental/mpp dir 2020-04-18 06:05:44 +03:00
pyos 9ed73439f8 JVM_IR: delay writes to the source map until generateMethod
`generateMethodNode` should not have any side effects for the output to
be stable under incremental compilation.
2020-04-08 07:04:16 +02:00
Nikolay Krasko 2340a86d8d Update to 201.5259.13-EAP-SNAPSHOT
- No UIUtil.removeLeakingAppleListeners anymore
- getParameterHints nullability
- versions of lz4-java and guava were changed
2020-02-18 14:13:55 +03:00
Alexey Tsvetkov ee2e40ce6b Regenerate test 2020-02-17 13:14:04 +03:00
Alexey Tsvetkov d3a93b2015 Remove unneeded IncrementalCompilerRunner#postCompilationHook
The method is no longer needed, since the only implementation is empty.
2020-01-21 16:36:37 +03:00
Alexey Tsvetkov ba0ce92159 Report messages only after IC scope expansion converged
Incremental compilation scope (set of files to be compiled)
could be expanded, even if the frontend reported some errors
to a message collector.
The next iteration of IC could produce a different set of
compiler messages, so we want to report them only after
scope expansion converged.
2020-01-21 16:36:36 +03:00
Alexey Tsvetkov c912f76d6f Add IC scope expansion tests
#KT-13677
  #KT-28233
2020-01-21 16:36:36 +03:00
Alexey Tsvetkov ef83431618 Recompile all dirty files in case of error 2020-01-21 16:36:36 +03:00
Alexey Tsvetkov 2d598d50d7 Expand compilation scope for IC before backend is run
Sometimes IC raises compilation errors when rebuild succeeds.
This happens because IC uses serialized decriptors
for non-dirty files. Serialized descriptors can be different
from source file descriptors. For example, a source file
may contain an implicit return type or an implicit visibility
for overridden methods, but serialized descriptors always
contain explicit return types & methods' visibilities.

These problems can be solved by expanding a scope of incremental compilation
just after the analysis, but before error reporting & code generation.
In other words, we need to compare descriptors before error reporting and code generation.
If there are new dirty files, current round of IC must be aborted,
next round must be performed with new dirty files.

This commit implements IC scope expansion for JS Klib compiler

    #KT-13677
    #KT-28233
2020-01-21 16:36:36 +03:00
Alexey Tsvetkov a950226602 Format and cleanup incremental-compilation-impl 2020-01-21 16:36:36 +03:00
Alexey Tsvetkov 5816722a64 Minor: remove unused property 2020-01-21 16:36:36 +03:00
Alexander Udalov 8a4510c21b Regenerate tests 2020-01-02 10:31:00 +01:00
Svyatoslav Kuzmich 31c84e9ac4 [JS IR] Build stdlib using compiler from repo
Previously JS IR versions of stdlib and kotlin-test were build
by default using compiler previously built on a buildserver.

It had some issues:
 - This required us to advance bootstrap every time we made any
   incompatible IR changes. This happens often since IR ABI is
   not quite stable yet.

 - We never tested the exact combination of compiler and stdlib we publish

   We tested:
    - new compiler with new stdlib build by new compiler (in box tests)
    - old compiler with new stdlib build by old compiler (in stdlib tests)

   We published:
    - new compiler with new stdlib build by old compiler

After this change JS IR compiler tests, builds and publishes
single configuration:

    new compiler with new stdlib build by new compiler

JS IR stdlib and kotlin-test are now built using JavaExec of CLI instead
of Gradle plugin to avoid troubles of loading a freshly built plugin.

This also allows to have a granular dependencies: we don't rebuild klib
if we changed a lowering in a compiler backend, but we do rebuild it if
we changed IR serialization algorithm.
2019-12-25 13:44:57 +03:00
Dmitriy Novozhilov e7f8c8e155 [TEST] Regenerate tests after previous commit 2019-12-12 16:11:45 +03:00
Roman Artemev ea543eac13 [IC KLIB] Fix after rebase 2019-11-08 14:14:59 +03:00
Roman Artemev a91ed694bf [IC KLIB] Use new klib argument 2019-11-08 14:14:59 +03:00
Alexey Tsvetkov d776e92111 Use Klib JS serializer protocol for IC 2019-11-08 14:14:58 +03:00
Alexey Tsvetkov 83f060ad3e Minor: add functions to distinguish initial and incremental builds when debugging IC tests 2019-11-08 14:14:57 +03:00
Alexey Tsvetkov 537199e0fa Minor: replace UsefulTestCase with KtUsefulTestCase
UsefulTestCase does not resolve in IDE for some reason
2019-11-08 14:14:57 +03:00
Nikolay Krasko 155a760ee9 Revert "Revert [JS IR] commits that failed build"
This reverts commit 740f851a
2019-11-07 16:24:13 +03:00
Nikolay Krasko 740f851a10 Revert [JS IR] commits that failed build
Revert "[JS IR] Build hybrid versions of stdlib and kotlin.test"
This reverts commit b9f88350dd.

Revert "[JS IR] Add gradle plugin integration tests"
This reverts commit d872b27663.

Revert "Update bootstrap"
This reverts commit bc47594c7a.

Revert "[JS IR] Support generating both IR and pre-IR libraries"
This reverts commit 1b8df45bfe.
2019-11-05 13:58:39 +03:00
Svyatoslav Kuzmich 1b8df45bfe [JS IR] Support generating both IR and pre-IR libraries
Remove all previous -Xir options

Add:
 -Xir-produce-klib-dir
 -Xir-produce-klib-file
 -Xir-produce-js
 -Xir-only
2019-11-01 19:42:05 +03:00
Nikolay Krasko ebf5e4b590 Mute IncrementalJsKlibCompilerRunnerTestGenerated tests (KT-34538)
#KT-34538 Fixed
2019-10-23 12:49:49 +03:00
Nikolay Krasko 4ed64b0283 Regenerate tests with TargetBackend.ANY remove and using runTest with this 2019-10-23 12:49:48 +03:00
Anton Bannykh ead8379c50 JS: add -Xmetadata-only flag for JS common code modules (KT-33142 fixed) 2019-09-27 19:12:03 +03:00
Nikolay Krasko 655e77b0dd Update lz4 for 192 in :compiler:incremental-compilation 2019-09-05 19:39:03 +03:00
Roman Artemev d6facf2976 [JS KLIB IC] Fix test runner 2019-09-03 14:21:32 +03:00
Roman Artemev 7840cf70f0 [IC] Add missed runtime dependency 2019-09-03 14:21:32 +03:00
Alexey Tsvetkov 8e6a80bed7 Add test logs specific for IC with JS IR
Incremental inline will be handled during lowerings,
after all klibs are generated
2019-08-15 15:11:52 +03:00
Alexey Tsvetkov 12c209d360 Do not compare output for IC with JS IR BE
Temporary measure until output could be updated incrementally
2019-08-15 15:11:52 +03:00
Alexey Tsvetkov fc49510049 Add tests for IC with JS IR BE 2019-08-15 15:11:52 +03:00
Alexander Udalov 73a671af7c JVM IR: generate tests on incremental compilation 2019-08-05 21:27:21 +02:00
Vyacheslav Gerasimov 54222bd429 Build: compiler tests-common test runtime 2019-06-17 16:30:14 +03:00
Vyacheslav Gerasimov 33a5a3ff81 Build: Fix test runtime for incremental compilation tests 2019-06-14 17:09:36 +03:00
Vyacheslav Gerasimov dc2a7fdc13 Build: Fix compiler tests, add missing test runtime dependencies 2019-06-14 00:35:01 +03:00
Alexey Tsvetkov 56d5846ef1 Add test for KT-31131 2019-05-29 10:23:18 +02:00
Vadim Brilyantov 01a05a5495 Move daemon jar from compiler 2019-05-17 15:51:52 +03:00
Svyatoslav Kuzmich 91d16ee947 [CLI] Extract :compiler:cli-js from :compiler:cli 2019-05-14 15:49:50 +03:00
Dmitry Gridin 37c856290f Fix minor compile warnings 2019-04-25 19:47:39 +07:00
nikita.movshin deb416484c Update copyright. Fix 2 lines comments after rebase
Change the copyright from "JetBrains s.r.o." to
"JetBrains s.r.o. and Kotlin Project contributors"
2019-04-23 20:15:03 +03:00
nikita.movshin 65244b4bea Update copyright.
Change the copyright from "JetBrains s.r.o." to
"JetBrains s.r.o. and Kotlin Project contributors"
Update only 2 lines copyright.
2019-04-23 20:09:22 +03:00
Alexey Tsvetkov 77d74a261d Rename SourceFileToPathConverter->FileToPathConverter 2019-04-22 15:27:58 +03:00
Alexey Tsvetkov 00de7b6c44 Allow customizing source file path conversion in lookup storage 2019-04-22 15:26:34 +03:00
Alexey Tsvetkov 79337a6b96 Allow customizing source file path conversion in local IC caches 2019-04-22 15:26:34 +03:00
Mikhael Bogdanov dde28ddc52 Parallelize compiler tests 2019-04-18 13:24:58 +02:00
Ivan Gavrilovic c85e21d43b Incremental KAPT - pass changed classpath entries
Pass computed list of changed classpath names to KAPT instead
of relying on the history files to be computed by stub generation.
Also, stop generating classpath history changes during the stub generation.

This commit does not compute the actual changed classpath entries,
and that will be done in the following commits.

 #KT-23880
2019-04-12 15:01:47 +03:00