Commit Graph

79 Commits

Author SHA1 Message Date
Dmitry Gridin e5bfb8295e [jps][tests] migrate from 1.6 to 1.8 jdk
^KTIJ-20456
2022-04-26 21:41:36 +07:00
Aleksei.Cherepanov bdf229bc5c [JPS] Ignore classpath from facets to exclude jars from gradle build
Reimport after `./gradlew build` adds jars from gradle's `build/libs` to facet's classpath. That causes problems with JPS build, because it doesn't see changes in out folder, but see unchanged jar, so changes don't apply.

#KT-51873 Fixed

Merge-request: KT-MR-6018
Merged-by: Aleksei Cherepanov <aleksei.cherepanov@jetbrains.com>
2022-04-18 11:20:40 +00:00
Aleksei.Cherepanov 0e0b3e6d75 Add test of Kotlin Lombok project compilation
This test checks that the project with Lombok plugin will be compiled successfully after successful import (KTIJ-20506)

#KTIJ-20641 Fixed
2022-01-28 13:30:42 +00:00
Aleksei.Cherepanov 9971ae4ffd Revert "Fix org.jetbrains.kotlin.jps.build.KotlinJpsBuildTest#testSourcePackageLongPrefix"
This reverts commit e3634c16
2022-01-26 10:03:06 +00:00
Nikita Bobko fddb205e16 KotlinJpsBuildTest#testJre9: migrate to JDK 11
Possibility to use JDK 9 was dropped in the Kotlin repo in
this commit de7fb9606a so I had to migrate this test.

Consulted with @udalov. He said that it's fine to migrate this test to JDK 11
2022-01-12 15:25:18 +01:00
Nikita Bobko e3634c1635 Fix org.jetbrains.kotlin.jps.build.KotlinJpsBuildTest#testSourcePackageLongPrefix
The test started failing after cherry-picking it from intellij repo
(in intellij repo it was passing without this commit)
2022-01-12 15:25:12 +01:00
Dmitry Gridin bb0b785c59 [CHERRY PICKED FROM IJ] KotlinJpsBuildTest: fix tests
GitOrigin-RevId: 51f9595dfb5f0ba280bab935e5945384dfe7e487
Original commit: https://github.com/JetBrains/intellij-community/commit/18bf77b87f8b89f6a6827176ce61215f2a69f0c4
2022-01-12 15:10:47 +01:00
Nikita Bobko 3033cf0a03 [CHERRY PICKED FROM IJ] kotlin-ide migration: Normalization commit
This commit is consequence of not accurate migration to kotlin-ide repo.
These changes appeared as a result of split of big chunk of first
commits in kotlin-ide repo. I don't know where from changes in this
commit come from.

It could be changes of "bunch switch" commit. Or changes of other
accidentally squashed commits

GitOrigin-RevId: 6d1e18c36e02a4ad228fe7ddc5bd056e98e1be36
Original commit: https://github.com/JetBrains/intellij-community/commit/c490f5864de6ef36964aa4ee34cdf7b3f35db384
2022-01-12 15:10:43 +01:00
Sergey Rostov 59993b1441 JPS: ignore removed java files
#KT-27458 Fixed

Original commit: 800fcc511a
2020-05-12 16:22:48 +03:00
Mikhail Zarechenskiy 76674906e5 Revert "Add option to enable new inference only for IDE analysis"
This reverts commit 36580d46da.

 #KT-37378 Fixed

Original commit: c01a171d4c
2020-05-04 15:14:43 +03:00
Vyacheslav Gerasimov c06a236e36 Always checkout/checkin text files with lf endings
Different line endings on linux/windows prevents gradle from reusing
build cache since endings make task inputs completely different between
systems

Original commit: bcefa68df0
2020-03-18 22:33:15 +03:00
Alexey Tsvetkov b5741d3120 Do not expose paths with placeholders in JS IC caches
#KT-31310 Fixed

Original commit: 209a5d8464
2019-05-16 04:01:26 +03:00
Mikhail Zarechenskiy 36580d46da Add option to enable new inference only for IDE analysis
#KT-30453 Fixed

Original commit: a3247b1b92
2019-05-06 14:36:05 +03:00
Alexey Tsvetkov 78ec448ca3 Test JPS Kotlin caches don't change when project root is different
Original commit: f66d95545d
2019-04-22 15:27:57 +03:00
Yaroslav Russkih 1a65bb03f7 Use https everywhere - documentation and samples
Original commit: 9ac52fad17
2019-02-19 21:35:36 +01:00
Sergey Rostov 37185c22d0 JPS: support KotlinResourceSourceRootType
Implementation is similar to KotlinSourceRootProvider.
This workaround is required since ResourcesTarget.computeRootDescriptors
supports only JavaResourceRoots.

#KT-27622 Fixed

Original commit: dcc47fd8ef
2018-11-26 09:29:49 +03:00
Sergey Rostov 79bf8f7c98 jps: support dev kit module types (and all other ModuleBasedBuildTargetType)
#KT-24500 fixed

Original commit: ec5110e1f4
2018-05-24 11:12:01 +03:00
Alexey Sedunov 78ee6ba693 JS: Use the same output paths for JPS and Maven-based builds
#KT-22586 Fixed

Original commit: ae37cc30a1
2018-04-02 15:28:35 +03:00
Anton Bannykh a4fd51a823 Merge kotlin-experimental into kotlin standard library (KT-23055 fixed)
* kotlin-experimental.js has been already merged into kotlin.js
* change library name to kotlin in kotlin-experimental.meta.js in order to produce correct require calls
* concatenate kotlin-experimental.meta.js with kotlin.meta.js
* suppress multiple module declaration warning for such use case

Original commit: 7b860eab36
2018-03-26 23:13:28 +03:00
Alexey Tsvetkov 2454ee30bb Compare JS output files against file instead of hardcoded set
A difference is not obvious when two sets are compared:
there might be just one different element, but
sets would be printed in one line in iteration order
(which is non-fixed for hashsets).

Also the properties:
  EXPECTED_JS_FILES_IN_OUTPUT_FOR_STDLIB_ONLY,
  EXPECTED_JS_FILES_IN_OUTPUT_FOR_MODULE_STDLIB_ONLY,
  EXPECTED_JS_FILES_IN_OUTPUT_NO_COPY,
  EXPECTED_JS_FILES_IN_OUTPUT_WITH_ADDITIONAL_LIB_AND_DEFAULT_DIR,
  EXPECTED_JS_FILES_IN_OUTPUT_WITH_ADDITIONAL_LIB_AND_CUSTOM_DIR
are hard to distinguish in code and are not convenient to edit.

Original commit: 7881a305d9
2018-02-22 01:13:09 +03:00
Alexey Tsvetkov 28a2d4727a Test JPS with Daemon and IC
Original commit: 220fab0d3f
2018-01-16 21:09:57 +03:00
Alexey Tsvetkov f3e8e3e591 Replace testCancelLongKotlinCompilation with less flaky test
Original commit: a4d122478b
2017-12-22 16:12:20 +03:00
Alexey Tsvetkov 453d38b0f7 Do not set api version to language version when language version is null
#KT-21852 fixed
    #KT-21574 fixed

Original commit: 3f082346ae
2017-12-18 16:22:07 +03:00
Nikolay Krasko 7769227cf6 Restore iml files for jps tests
Original commit: f46a8e0b16
2017-11-30 13:24:08 +03:00
Alexey Tsvetkov e06f002f45 Rebuild when language/api version is changed (JPS)
#KT-20757 fixed

Original commit: 913a997f24
2017-11-23 14:46:23 +03:00
Alexey Andreev 1079d74422 Support generation of relative path in JS source maps in JPS builder
See KT-20820

Original commit: 2fbecfdd9c
2017-10-23 17:19:50 +03:00
Anton Bannykh 19aa785e60 JPS JS: fix friend path detection in projects imported from Gradle (KT-18963 fixed)
Original commit: b2e53644a5
2017-10-20 19:16:14 +03:00
Alexey Tsvetkov 060686e22e Change test data so IC and non IC warnings count match
When IC is on and new Kotlin class is referencing
new Java class, new Kotlin file is compiled twice,
because JPS thinks new Kotlin class is affected by
new Java class (see https://youtrack.jetbrains.com/issue/KT-20318).

This does not happen when IC is off, and KotlinBuilder
requests chunk rebuild (see previous commit).

I decided to remove the reference, because the issue
is now known, and the reference is non critical for the test.

Original commit: 1c7b8ec938
2017-09-26 16:35:24 +03:00
Alexey Andreev 524001e97e Add support for relative JS source map paths in JPS
Original commit: 1d6f01ee6c
2017-06-20 17:40:33 +03:00
Alexander Udalov c27636cf3a CLI: fix non-XML rendering of argument parse error, simplify code
If the compiler is invoked through JPS, an instance of
XmlMessageRenderer is used and the output should be a valid XML.
Previously, we reported the argument parse error (and the note to try
"-help") before calling messageRenderer.renderPreamble, which resulted
in invalid XML. The same was happening for the usage printed on "-help".
Both of these problems are fixed

 #KT-14848 Fixed

Original commit: a802e7fb71
2017-06-06 19:52:04 +03:00
Alexey Tsvetkov c70d749476 Set destination to null when module is set in JPS
This fixes the warning "The '-d' option with a directory destination
is ignored because '-module' is specified", when a project imported
from Gradle is built with JPS.

    #KT-17665 fixed

Original commit: b06b18de07
2017-05-31 16:59:03 +03:00
Alexander Udalov 7231c777c1 Fix compilation against JRE 9 on JPS
Write the modular JDK (9+) path to the module.xml file passed to the
compiler from the JPS plugin. This path is then recorded in the compiler
configuration in KotlinToJVMBytecodeCompiler.configureSourceRoots. This
is needed because in JPS plugin, we pass "-no-jdk" and thus no JDK home
path was recorded in the compiler configuration in
K2JVMCompiler.setupJdkClasspathRoots. Presence of JDK home path in the
configuration is crucial for JDK 9 support (see
KotlinCoreEnvironment.Companion.createApplicationEnvironment), because
classes there can only be loaded with the special "jrt" file system, not
as .class files in .jar files

 #KT-17801 Fixed

Original commit: 965b4199f4
2017-05-24 15:46:57 +03:00
Anton Bannykh 48328f7989 JS: support internal visibility from friend modules
Friend modules should be provided using the -Xfriend-modules flag
in the same format as -libraries. No manual configuration required for
JPS, Gradle and Maven plugins.

Friend modules could be switched off using the -Xfriend-modules-disabled
flag. Doing that will
  * prevent internal declarations from being exported,
  * values provided by -Xfriend-modules ignored,
  * raise a compilation error on attemps to use internal declarations from other modules

Fixes #KT-15135 and #KT-16568.

Original commit: 2e9a59819a
2017-05-04 21:44:17 +03:00
Zalim Bashorov 6bedbfb67f Add tests for KT-12199 to prevent regression
#KT-12199 Obsolete

Original commit: 712b2c8117
2017-04-11 15:46:13 +03:00
Alexander Udalov 2208b46941 Support nested classes in KotlinCliJavaFileManagerImpl.findClass
findClass(String, GlobalSearchScope) is invoked for example when we're
resolving supertypes of classes in Java libraries. Previously, it never
found nested classes and falled back to CoreJavaFileManager's
implementation, which lacks a fix for the original issue (KT-12664,
which was fixed in JvmDependenciesIndex in ff783f1f and 2c344635)

 #KT-16931 Fixed

Original commit: c67eb84369
2017-03-27 17:19:24 +03:00
Anton Bannykh 07691e369a JPS JS: simplified the code and added tests for the missing meta.js case (e.g. empty sourceroot; fixed by yole in 00ed0248d9a23701dbef52da02259d174a9999e7)
Original commit: 6608e97d35
2017-02-28 16:05:16 +03:00
Alexey Andreev b4086fe033 JS: drop support of old library format
Original commit: 7192529733
2017-02-10 21:04:50 +03:00
Anton Bannykh 81ab76ade8 JPS: fixed duplicate meta.js in case of multiple source roots in the same module.
Original commit: f0e3c87b84
2017-02-03 13:03:12 +03:00
Anton Bannykh 36035c789a JS: fixed support for test source roots (KT-6627)
Original commit: 289a7a9cc3
2017-02-03 13:03:12 +03:00
Alexey Tsvetkov 9f8ba45853 Rebuild all kotlin files when EAP flag is changed
Original commit: b9dbe69232
2017-01-26 13:38:52 +03:00
Alexander Udalov c22ccf58c0 Remove quotes around visibility in invisible member diagnostic
Original commit: 83000c50ff
2016-07-22 18:13:41 +03:00
Alexander Udalov b3a54cff83 Improve error message for inaccessible invisible_fake members
#KT-8989 Fixed

Original commit: b6b2303aa7
2016-07-22 18:13:40 +03:00
Zalim Bashorov 7e1baf1a69 JPS: don't consider that production target of module "B" is depends on test target of module "A" when "B" depends on "A"
#KT-12595 Fixed

Original commit: 0e428ca10c
2016-06-15 15:01:32 +03:00
Zalim Bashorov 26ed20a54b Minor: add test for KT-11993 "NoSuchMethodError when testing internal symbols"
Original commit: c11d504a26
2016-05-05 20:45:29 +03:00
Pavel V. Talanov 8f456556f6 Update existing test data depending on diagnostic parameter rendering
Original commit: a4c005fefd
2016-02-26 14:45:11 +03:00
Mikhail Glukhikh cb985c0d13 Effective visibility: concise diagnostic messages #KT-10761 Fixed
Also #KT-9760 Fixed

Original commit: 1bbc46729c
2016-02-16 15:58:50 +03:00
Dmitry Jemerov 4e8365084f tests fixed
Original commit: b60621c428
2016-01-19 10:53:53 +01:00
Dmitry Jemerov 7998e7884c add test to check that "Only the Kotlin standard library is allowed to use the 'kotlin' package" is reported in JPS builds
Original commit: 39c6e3712b
2016-01-19 10:53:49 +01:00
Zalim Bashorov da42c05672 Don't fail when create IncrementalCacheImpl for target without output directory, and fail when try to use this info instead.
#KT-10505 Fixed

Original commit: c1dbfee2a9
2016-01-13 21:37:36 +03:00
Zalim Bashorov b7971cf9ae Don't fail when output directory not specified for "friend" build target
#KT-10505 Fixed

Original commit: d9af9472f0
2016-01-13 21:09:06 +03:00