Commit Graph

49 Commits

Author SHA1 Message Date
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
Alexey Tsvetkov fe390a04c5 Create Kotlin incremental caches only on write 2015-09-25 20:11:56 +03:00
Michael Nedzelsky 0b49195a03 add tests in KotlinJpsTest for check access to internal elements from another module 2015-09-25 14:02:26 +03:00
Michael Nedzelsky db602df146 Revert "add test for check access to internal elements from another module"
This reverts commit 4d9eaf19c3.
2015-09-23 17:45:38 +03:00
Michael Nedzelsky 4d9eaf19c3 add test for check access to internal elements from another module
#KT-9178 Fixed
2015-09-23 07:49:33 +03:00
Dmitry Jemerov 4ca434da54 remove support for 'trait' keyword 2015-09-22 15:00:24 +02:00
Nikolay Krasko 5b3c05d039 Don't filter class files and jars from build script. Get a warning about their absence. 2015-08-20 18:48:38 +03:00
Michael Nedzelsky 8cd978bfd8 add tests for KT-8158 make Kotlin compiler invoked from IDEA cancellable 2015-07-03 16:14:08 +03:00
Evgeny Gerashchenko fe3437e8a1 Fixed iml files in test data. Order entry for own sources is obligatory. 2015-06-01 19:02:12 +03:00
Evgeny Gerashchenko 37d6c9bf25 Minor. Fixed typo in test data. 2015-06-01 19:02:11 +03:00
Nikolay Krasko 3c7e7ffda6 Place light classes finder before standard PsiElementFinderImpl
Source elements should have priority over libraries.
2015-05-13 21:32:09 +03:00
Nikolay Krasko 2d8dcaddd0 Compile modules with circular dependency as one module 2015-05-06 14:19:20 +03:00
Michael Nedzelsky 563ab47502 JS: add jps build test for Kotlin/Javascript two-module project 2015-04-03 05:36:13 +03:00
Michael Nedzelsky d909a66d4d do not copy js files from libraries in case of compile errors 2014-12-16 21:37:46 +03:00
Evgeny Gerashchenko 8de11e4664 Added test checking that we don't create Kotlin incremental caches for targets without Kotlin. 2014-12-15 16:46:27 +03:00
Michael Nedzelsky bd090d0e5f add tests for jps-plugin (Kotlin Javascript projects) 2014-12-12 03:04:19 +03:00
Nikolay Krasko 465dd45eae Merge remote-tracking branch 'origin/master' into idea14 2014-07-02 09:21:40 +04:00
Alexander Udalov 59777e7df6 Generate "$kotlinClass"/"$kotlinPackage" reflection fields to every class
Some seemingly irrelevant tests were changed because now there's <clinit> in
almost every class and class initialization begins with executing it
2014-07-02 01:26:18 +04:00
Nikolay Krasko 2f776affb3 Test package facade recompile after removing several files 2014-06-20 17:19:46 +04:00
Evgeny Gerashchenko 601a691e18 Corrected and simplified compilation of module chunk. 2014-06-04 15:34:17 +04:00
Evgeny Gerashchenko ad8affe07c Renamed and refactored test. 2014-06-04 11:36:42 +04:00
Evgeny Gerashchenko 9e22c29825 Moved general JPS test data to common directory. 2014-03-25 14:26:47 +04:00