Commit Graph

71 Commits

Author SHA1 Message Date
Sergey Rostov 800fcc511a JPS: ignore removed java files
#KT-27458 Fixed
2020-05-12 16:22:48 +03:00
Mikhail Zarechenskiy c01a171d4c Revert "Add option to enable new inference only for IDE analysis"
This reverts commit a3247b1b92.

 #KT-37378 Fixed
2020-05-04 15:14:43 +03:00
Vyacheslav Gerasimov bcefa68df0 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
2020-03-18 22:33:15 +03:00
Alexey Tsvetkov 209a5d8464 Do not expose paths with placeholders in JS IC caches
#KT-31310 Fixed
2019-05-16 04:01:26 +03:00
Mikhail Zarechenskiy a3247b1b92 Add option to enable new inference only for IDE analysis
#KT-30453 Fixed
2019-05-06 14:36:05 +03:00
Alexey Tsvetkov f66d95545d Test JPS Kotlin caches don't change when project root is different 2019-04-22 15:27:57 +03:00
Yaroslav Russkih 9ac52fad17 Use https everywhere - documentation and samples 2019-02-19 21:35:36 +01:00
Sergey Rostov dcc47fd8ef JPS: support KotlinResourceSourceRootType
Implementation is similar to KotlinSourceRootProvider.
This workaround is required since ResourcesTarget.computeRootDescriptors
supports only JavaResourceRoots.

#KT-27622 Fixed
2018-11-26 09:29:49 +03:00
Sergey Rostov ec5110e1f4 jps: support dev kit module types (and all other ModuleBasedBuildTargetType)
#KT-24500 fixed
2018-05-24 11:12:01 +03:00
Alexey Sedunov ae37cc30a1 JS: Use the same output paths for JPS and Maven-based builds
#KT-22586 Fixed
2018-04-02 15:28:35 +03:00
Anton Bannykh 7b860eab36 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
2018-03-26 23:13:28 +03:00
Alexey Tsvetkov 7881a305d9 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.
2018-02-22 01:13:09 +03:00
Alexey Tsvetkov 220fab0d3f Test JPS with Daemon and IC 2018-01-16 21:09:57 +03:00
Alexey Tsvetkov a4d122478b Replace testCancelLongKotlinCompilation with less flaky test 2017-12-22 16:12:20 +03:00
Alexey Tsvetkov 3f082346ae Do not set api version to language version when language version is null
#KT-21852 fixed
    #KT-21574 fixed
2017-12-18 16:22:07 +03:00
Nikolay Krasko f46a8e0b16 Restore iml files for jps tests 2017-11-30 13:24:08 +03:00
Alexey Tsvetkov 913a997f24 Rebuild when language/api version is changed (JPS)
#KT-20757 fixed
2017-11-23 14:46:23 +03:00
Alexey Andreev 2fbecfdd9c Support generation of relative path in JS source maps in JPS builder
See KT-20820
2017-10-23 17:19:50 +03:00
Anton Bannykh b2e53644a5 JPS JS: fix friend path detection in projects imported from Gradle (KT-18963 fixed) 2017-10-20 19:16:14 +03:00
Alexey Tsvetkov 1c7b8ec938 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.
2017-09-26 16:35:24 +03:00
Alexey Andreev 1d6f01ee6c Add support for relative JS source map paths in JPS 2017-06-20 17:40:33 +03:00
Alexander Udalov a802e7fb71 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
2017-06-06 19:52:04 +03:00
Alexey Tsvetkov b06b18de07 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
2017-05-31 16:59:03 +03:00
Alexander Udalov 965b4199f4 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
2017-05-24 15:46:57 +03:00
Anton Bannykh 2e9a59819a 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.
2017-05-04 21:44:17 +03:00
Zalim Bashorov 712b2c8117 Add tests for KT-12199 to prevent regression
#KT-12199 Obsolete
2017-04-11 15:46:13 +03:00
Alexander Udalov c67eb84369 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 5a533a52 and 164c72e8)

 #KT-16931 Fixed
2017-03-27 17:19:24 +03:00
Anton Bannykh 6608e97d35 JPS JS: simplified the code and added tests for the missing meta.js case (e.g. empty sourceroot; fixed by yole in 00ed0248d9a23701dbef52da02259d174a9999e7) 2017-02-28 16:05:16 +03:00
Alexey Andreev 7192529733 JS: drop support of old library format 2017-02-10 21:04:50 +03:00
Anton Bannykh f0e3c87b84 JPS: fixed duplicate meta.js in case of multiple source roots in the same module. 2017-02-03 13:03:12 +03:00
Anton Bannykh 289a7a9cc3 JS: fixed support for test source roots (KT-6627) 2017-02-03 13:03:12 +03:00
Alexey Tsvetkov b9dbe69232 Rebuild all kotlin files when EAP flag is changed 2017-01-26 13:38:52 +03:00
Alexander Udalov 83000c50ff Remove quotes around visibility in invisible member diagnostic 2016-07-22 18:13:41 +03:00
Alexander Udalov b6b2303aa7 Improve error message for inaccessible invisible_fake members
#KT-8989 Fixed
2016-07-22 18:13:40 +03:00
Zalim Bashorov 0e428ca10c 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
2016-06-15 15:01:32 +03:00
Zalim Bashorov c11d504a26 Minor: add test for KT-11993 "NoSuchMethodError when testing internal symbols" 2016-05-05 20:45:29 +03:00
Pavel V. Talanov a4c005fefd Update existing test data depending on diagnostic parameter rendering 2016-02-26 14:45:11 +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
Dmitry Jemerov b60621c428 tests fixed 2016-01-19 10:53:53 +01:00
Dmitry Jemerov 39c6e3712b add test to check that "Only the Kotlin standard library is allowed to use the 'kotlin' package" is reported in JPS builds 2016-01-19 10:53:49 +01:00
Zalim Bashorov c1dbfee2a9 Don't fail when create IncrementalCacheImpl for target without output directory, and fail when try to use this info instead.
#KT-10505 Fixed
2016-01-13 21:37:36 +03:00
Zalim Bashorov d9af9472f0 Don't fail when output directory not specified for "friend" build target
#KT-10505 Fixed
2016-01-13 21:09:06 +03:00
Zalim Bashorov 3df091e7cf Report error when output directory not specified for build target
#KT-10505 Fixed
2016-01-13 21:09:05 +03:00
Mikhail Glukhikh 4e44466cf9 Exposed visibility deprecation warnings made errors + relevant test fixes 2015-11-20 15:21:01 +03:00
Nikolay Krasko 33fd247bde Test that fails with package prefixes but works good without them 2015-11-12 19:19:42 +03:00
Michael Nedzelsky 5b59fc74bc fix access from tests to internal elements in production code in case of circular dependency 2015-11-11 19:16:21 +03:00
Nikolay Krasko 23e35ab112 Teach index working with source roots with package prefix
#KT-9167 Fixed
2015-11-10 01:50:09 +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 1a58636ea9 KT-6165, KT-9547: fix testData for JPS plugin.
Test contains effectively single module (with circular dependencies),
and should not have conflicting declarations.
Rename the package in a library used in this test.

 #KT-9547 Fixed
2015-10-22 11:37:01 +03:00
Michael Nedzelsky 0035bbba7c fix check for internal from another module in imports and file level annotations 2015-09-27 20:37:41 +03:00