63 Commits

Author SHA1 Message Date
Aleksei.Cherepanov
5f4be07225 [JPS] Fix JS incremental compilation
Disable Idea JPS build mechanism for marking all sources of common output if one of them is dirty
Add source-to-outputs map for correctly removing Kotlin/JS outputs

#KT-45763 Fixed
#KT-44351 Fixed
2021-05-27 13:00:56 +03:00
Mikhail Glukhikh
4bd44fa61b FE 1.0: introduce PrivateInFile effective visibility #KT-20094 Fixed 2021-04-08 09:41:25 +03:00
Roman Artemev
b4ed7110dd [IC TEST] Fix IC multi module tests for gradle 2021-01-26 19:23:24 +03:00
Roman Artemev
daf1da1c70 [KLIB IC] Fix klib IC test data
Since neither inline function nor super classes affect klib there is no
need for extra passes so compiler doesn't report any dirty files.
Do not check that.
2021-01-26 19:23:23 +03:00
Alexander Udalov
012ffa2993 Support new scheme of compilation of OptionalExpectation annotations
Instead of generating these annotation classes as package-private on
JVM, serialize their metadata to the .kotlin_module file, and load it
when compiling dependent multiplatform modules.

The problem with generating them as package-private was that
kotlin-stdlib for JVM would end up declaring symbols from other
platforms, which would include some annotations from package
kotlin.native. But using that package is discouraged by some tools
because it has a Java keyword in its name. In particular, jlink refused
to work with such artifact altogether (KT-21266).

 #KT-38652 Fixed
2020-05-12 19:28:57 +02:00
Alexey Tsvetkov
06275a201c JPS: remove outputs for additional dirty files for current iteration
JPS does not remove output files for files marked as dirty
for current iteration. This is a problem for adding complementary files
during JPS MPP IC.
If output files are not removed, the compiler might raise an error
for duplicated actual declarations.
2020-04-18 06:05:44 +03:00
Pavel Kirpichenkov
8c52bb4212 Add frontend checks for missing dependency supertypes
Call checker and declaration checker are used in order to preserve backward compatibility.
Attempt to use classifier usage checker was not good enouth,
since not all errors found with it would actually be reported before.
For example types and constructor calls don't cause supertypes to resolve,
so missing supertypes would not lead to errors in case they are the only use of class name.

Updated tests failing due to missing Java dependencies in superclasses.
2019-11-18 12:06:41 +03:00
Sergey Rostov
75e59fdc46 JPS: exclude source roots from other targets
Previously `findJavaRootDescriptor` was return source root for random
module. This cause build errors for mpp (same file may appear in
multiple source roots of common and platform modules)

#KT-28988 Fixed
2019-01-11 12:53:11 +03:00
Sergey Rostov
62b0b3e4e9 JPS: report about unsupported targets once
Report about unsupported targets once per target type, show presentable
chunks list and don't show more then 5 chunks.

Example: "Native is not yet supported in IDEA internal build system.
Please use Gradle to build a, b, c, d, e and 10 other  (enable 'Delegate
IDE build/run actions to Gradle' in Settings)."

#KT-26980 Fixed
#KT-28316 Fixed
2018-11-28 11:08:57 +03:00
Sergey Rostov
c06b000e8d JPS: Test for "Cyclically dependent modules should have same compiler"
KT-27285
2018-11-28 10:46:57 +03:00
Sergey Rostov
1301333e37 JPS, tests, minor: rename test files in modules for better readability 2018-11-26 09:29:38 +03:00
Sergey Rostov
cc9892a27d JPS: Add tests for mpp complementary files tracking after build error (KT-27868) 2018-11-22 08:40:32 +03:00
Sergey Rostov
9e6d6ad9da JPS, native: skip and report native modules as not supported
#KT-26648 Fixed
2018-09-13 20:30:35 +03:00
Sergey Rostov
c8351c3da0 JPS, -Xcommon-sources: write tests 2018-09-13 20:30:34 +03:00
Sergey Rostov
1b93f07a76 JPS tests: support custom mpp multi module tests, rearrange test data files for more consistency, configure js modules with facet (not with stdlib dependency which should be deprecated), temporary mute some complex mpp tests 2018-09-13 20:30:33 +03:00
Sergey Rostov
808e83a01e JPS tests: switch to new dependencies.txt parser
Order of modules changed because new parser preserve order, while previously modules are accidentally sorted by hashCode().
2018-09-13 20:30:32 +03:00
Alexey Tsvetkov
ff35d509e6 Add test for KT-25540 2018-07-23 15:43:17 +03:00
Alexey Tsvetkov
11977cc1c1 Add multi-module JS IC tests with JPS 2018-07-23 15:43:17 +03:00
Alexey Tsvetkov
5760b8cf8b Register kotlin_module as output of all files
Previously kotlin_module was registered as output
only for files containing top-level declarations
2018-07-09 15:48:11 +03:00
Sergey Rostov
b2f58ad9c3 jps, mpp: temporary disable mpp tests 2018-06-08 09:46:38 +03:00
Sergey Rostov
0eee2729cd jps: support multiplatform incremental compilation for jvm and js
- support common modules metadata compilation under flag (it is not required since all common source roots are included transitively for now)
- introduce expect actual tracker in jps: move implementation from gradle to build-common
- support js incremental compilation: move implementation from gradle to build-common
2018-06-08 09:46:37 +03:00
Alexey Tsvetkov
3eb968807e Invalidate usages of removed classes before round
#KT-23165 fixed
2018-04-03 21:11:12 +03:00
Alexey Tsvetkov
605bcc66a1 IC: add destination dir to start of classpath instead of end
Otherwise IC fails when a project declares a class with the same name
as in one of its dependencies.
The issue is relevant only for non-JPS IC (Gradle, Maven, etc.),
but I added the test for JPS too.

  #KT-20516 fixed
2018-03-21 18:44:42 +03:00
Alexey Tsvetkov
a31f503fa5 Recompile all subclasses of removed classes 2017-12-22 16:12:19 +03:00
Alexey Tsvetkov
b73d5cbe1f Mock constant search in JPS tests 2017-08-29 04:28:06 +03:00
Alexey Tsvetkov
23bc907d3f Move multi-module IC tests to separate dir
At the moment they are used only with JPS
2017-08-29 02:24:37 +03:00
Alexey Tsvetkov
5ce3a436c7 Avoid marking dirty dependencies from already compiled chunks
#KT-17397 fixed
2017-07-31 19:34:59 +03:00
Alexey Tsvetkov
5af9d29cbe Remove old IC: remove experimental-ic-build.log
This commit moves each experimental-ic-build.log
into a corresponding build.log file.
2017-07-31 19:34:58 +03:00
Nikolay Krasko
1d29c81346 ! (TODO) Update build test data in 171 2017-03-20 18:45:40 +01:00
Alexander Udalov
83000c50ff Remove quotes around visibility in invisible member diagnostic 2016-07-22 18:13:41 +03:00
Zalim Bashorov
51c6abdbed IC: take into account added and removed classes when calculate affected names 2016-04-11 19:26:18 +03:00
Zalim Bashorov
441a442f34 Minor: update testdata 2016-04-08 13:45:37 +03:00
Nikolay Krasko
46a1028494 Temporary ad-hock jps-tests enable with testdata modification 2016-04-06 21:46:00 +03:00
Zalim Bashorov
4b8c9c8b39 Minor: fix testdata 2016-03-24 22:28:40 +03:00
Zalim Bashorov
9a9b863c9d IC: add tests with moving files
Additionally added the ability to use directories in IC tests.

 #KT-8002 Obsolete
2016-03-24 22:28:40 +03:00
Zalim Bashorov
d832a3d290 KotlinBuilder: use proper API to update Java mappings 2016-02-19 19:11:10 +03:00
Mikhail Glukhikh
1bbc46729c Effective visibility: concise diagnostic messages #KT-10761 Fixed
Also #KT-9760 Fixed
2016-02-16 15:58:50 +03:00
Zalim Bashorov
ced23c02bd New IC: add processing changes for constants 2016-02-10 22:56:09 +03:00
Zalim Bashorov
e33e31ad16 KotlinBuilder: don't request additional round when it's unnecessary & fix warnings 2016-02-10 21:37:12 +03:00
Zalim Bashorov
f6e7f8c3c0 Introduce TestingContext to pass data between tests and KotlinBuilder; introduce BuildLogger to log build events (build finished, files marked as dirty) in KotlinBuilder 2016-02-09 23:27:25 +03:00
Alexey Tsvetkov
a474165a8f Recompile subtypes when class member is changed 2016-01-27 12:28:44 +03:00
Zalim Bashorov
d9b67ae0ef Minor: use ".touch" extension instead of ".new" in incremental compilation tests when it possible 2015-12-17 19:41:24 +03:00
Mikhail Glukhikh
4e44466cf9 Exposed visibility deprecation warnings made errors + relevant test fixes 2015-11-20 15:21:01 +03:00
Michael Nedzelsky
e5e4f9e775 Hack for checking access to internal declarations during incremental compilation 2015-11-17 00:26:43 +03:00
Zalim Bashorov
e1ad942804 Add separate build logs for tests which result is different in the new incremental compilation 2015-11-12 13:43:24 +03:00
Michael Nedzelsky
981d471ebe fix KT-9843 Bug in incremental compilation: module is not recompiled when optional parameter added
and KT-8434 Removing parameter with default value from function in different module breaks incremental compilation

#KT-9843 Fixed

#KT-8434 Fixed
2015-11-06 07:45:46 +03:00
Michael Nedzelsky
6ebe0c30ec fix KT-9299 In a project with circular dependencies between modules, IDE reports error on use of internal class from another module, but the corresponding code still compiles and runs.
#KT-9299 Fixed
2015-10-30 14:40:46 +03:00
Dmitry Petrov
dda508234f Drop package facades:
- update tests
- cleanup JetTyMapper after rebase
2015-10-19 16:03:22 +03:00
Dmitry Petrov
621d26aeeb Drop package facades: fix incremental compilation tests & proto comparison tests
(package facades are no longer generated)
2015-10-19 16:03:21 +03:00
Zalim Bashorov
de5dc61820 Make NON_CONST_VAL_USED_IN_CONSTANT_EXPRESSION error 2015-10-18 22:49:08 +03:00