Commit Graph

1061 Commits

Author SHA1 Message Date
Alexey Sedunov cf4b0a8933 Fix reflection-based operations on compiler arguments after conversion
Original commit: 2984a5a19f
2017-08-01 19:40:22 +03:00
Alexey Sedunov 616c32483c J2K: CommonToolArguments and inheritors
Original commit: 50599c933f
2017-08-01 19:36:49 +03:00
Alexey Tsvetkov 316cdc13dc Ensure IC.isEnabled is not modified by tests
Original commit: 69b4d213b7
2017-07-31 19:34:59 +03:00
Alexey Tsvetkov 654be46791 IC should be enabled explicitly by build systems
The change only affects JPS on TeamCity (in Intellij IC system property
is always set explicitly; the same holds for Gradle, Maven).
Previous changes have effectively enabled the new IC (which is now default)
for TC JPS builds, which is undesirable as more RAM is used.

Original commit: 514635e965
2017-07-31 19:34:59 +03:00
Alexey Tsvetkov e93497e995 Avoid marking dirty dependencies from already compiled chunks
#KT-17397 fixed

Original commit: 5ce3a436c7
2017-07-31 19:34:59 +03:00
Alexey Tsvetkov a7db839ba0 Minor: add dummy.kt to some IC tests
This makes it impossible to pass the tests
by rebuilding everything.

Original commit: 3f471d1ac6
2017-07-31 19:34:58 +03:00
Alexey Tsvetkov d1fd235dfd Remove old IC: remove experimental tests
Original commit: e602903567
2017-07-31 19:34:58 +03:00
Alexey Tsvetkov 380d3563eb Remove old IC: remove experimental cache version
Original commit: 534db2d45b
2017-07-31 19:34:58 +03:00
Alexey Tsvetkov 33c6d52643 Remove old IC: update KotlinJpsBuildTest
Original commit: a4a0335b20
2017-07-31 19:34:58 +03:00
Alexey Tsvetkov 4f8908c329 Remove old IC: remove unnecessary caches
Original commit: 62fdd91947
2017-07-31 19:34:58 +03:00
Alexey Tsvetkov 66fbde0df0 Remove old IC: fix constant search test
The tests were not run with the new IC before

Original commit: aea5293288
2017-07-31 19:34:58 +03:00
Alexey Tsvetkov 5a3ef0bfc1 Remove old IC: update on-off tests
Original commit: 8143ca158b
2017-07-31 19:34:58 +03:00
Alexey Tsvetkov 8a030b302a Remove old IC: remove experimental-expected-kotlin-caches.txt
Original commit: e7afb073d9
2017-07-31 19:34:58 +03:00
Alexey Tsvetkov 1b94afaedc Remove old IC: remove experimental-ic-build.log
This commit moves each experimental-ic-build.log
into a corresponding build.log file.

Original commit: 5af9d29cbe
2017-07-31 19:34:58 +03:00
Alexey Tsvetkov 7e9be9ef8e Remove old IC: remove IncrementalCompilation.isExperimental
Original commit: 2bd7d12312
2017-07-31 19:34:58 +03:00
Alexey Tsvetkov ea674ecd97 Remove old IC: remove flags from CompilationResult
Original commit: 50091bfac8
2017-07-31 19:34:58 +03:00
Alexander Udalov 8bccb53e20 Drop deprecated KotlinPaths.getRuntimePath, use getStdlibPath instead
Original commit: 8b149db0ec
2017-07-28 14:16:48 +03:00
Alexander Udalov ddb863f4a6 Refactor utilities in AbstractKotlinJpsBuildTestCase
Original commit: b988582531
2017-07-28 14:16:47 +03:00
Alexander Udalov 9332bd3b97 Move JPS-related kotlin-home detection code to jps-plugin
Original commit: 4b42f9e071
2017-07-28 14:11:35 +03:00
Alexander Udalov 3c4c7734e2 J2K PathUtil: convert and prettify
Original commit: 46a01ec131
2017-07-28 14:11:35 +03:00
Mikhael Bogdanov 45628a15fb Properly generate inner classes when compiling source for inline
KT-19175: Compiler generates different bytecode when classes are compiled separately or together

 #KT-19175 Fixed

Original commit: ff676c050f
2017-07-26 20:31:14 +02:00
Alexander Udalov 5747e1505a Refactor AnalysisFlags and their support in IDE
* Support flags with any value (not just Boolean)
* Support all flags by parsing arguments in KotlinFacetSettings, instead
  of manually listing known flags

 #KT-19210 Fixed

Original commit: 2f99f6ad34
2017-07-26 11:45:24 +03:00
Mikhail Zarechenskiy f6eb56c4cc Simplify diagnostic when there are wrong number of type arguments
#KT-12767 Fixed

Original commit: ee173077c0
2017-07-12 14:37:27 +03:00
Ilya Chernikov ba786ee7e2 Rolling back commits related to Unit -> Void? confersion in RMI interface
since it breaks the compatibility and doesn't actually help - the problem
with NoClassDef Unit is apparently elsewhere.

Original commit: fc12f37105
2017-07-11 15:06:38 +02:00
Mikhail Glukhikh 3f0e3902f0 More cleanup: lift return / assignment out
Original commit: dfe2c16bc7
2017-07-10 12:59:58 +03:00
Alexey Andreev 41e4f7eaba Copy stdlib-js source map during JPS build
Original commit: 7edb352aeb
2017-07-10 12:42:33 +03:00
Ilya Chernikov 6ce3d5adc1 Get rid of kotlin.Unit usage in RMI interfaces
attempt to fight mysterous "Cannot instantiate kotlin.Unit" exception.

Original commit: 21eed9ee78
2017-07-08 18:16:29 +02:00
Ilya Chernikov a30506e404 Fix failing tests on TC on Windows by falling back to standard launcher
...in one more case
Plus some minor test tweaks, diagnostics improvement and important comments

Original commit: 06d27a9efa
2017-07-08 18:16:28 +02:00
Alexander Udalov eb54e42adf Rename -module argument to -Xbuild-file
To prevent confusion with Java 9 module-related arguments

 #KT-18754 Fixed

Original commit: 55468735df
2017-07-06 17:03:25 +03:00
Mikhail Glukhikh 3f1c413ee9 Code cleanup: several inspections applied
Original commit: 840847e47c
2017-06-29 16:25:57 +03:00
Alexander Udalov 186b002a01 Implement Java 9 module visibility checks
In this commit, only IDE tests are added, because we look for module
declarations in the IDE across the whole project, whereas in the
compiler we should do this on the module path only and that requires
separate work (KT-18599) which is done in the following commits.

(The change in Cache.kt is needed so that
JvmModuleAccessibilityChecker.ClassifierUsage, which is an inner class,
would be injected properly.)

 #KT-18598 In Progress
 #KT-18599 In Progress

Original commit: e32880d9a3
2017-06-29 15:59:56 +03:00
Alexander Udalov d4f67643d8 Refactor MockLibraryUtil and related tests
- separate compileLibraryToJar into two public functions, for JVM and JS
- allow to pass any extra options instead of just -Xallow-kotlin-package
- add a bunch of default arguments for the most common cases

Original commit: 8af923c5ff
2017-06-26 16:22:04 +03:00
Mikhail Zarechenskiy 157729b31d Do not propose to specify constructor invocation in diagnostics
#KT-17188 Fixed

Original commit: 0579604653
2017-06-22 15:02:10 +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 5445b75309 Fix KotlinJpsBuildTest.testHelp on Windows
Original commit: a614419b43
2017-06-07 14:17:35 +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
Alexander Udalov 2b630b38ab Export 'intellij-core' in module 'frontend'
Remove intellij-core from dependencies of modules which already depend
on frontend or any module that exports frontend (such as frontend.java)

Original commit: 7febd846e8
2017-06-06 14:29:26 +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
Alexey Andreev ad224cb6ac Command-line tool for JS DCE
Original commit: 8a8fdf1968
2017-05-26 18:20:17 +03:00
Dmitry Petrov 8077289242 Update testData after changes in diagnostics
Original commit: c83b764c73
2017-05-26 13:58:46 +03:00
Dmitry Petrov cb8ab93160 Update testData for changed diagnostic messages
Original commit: 7979663e6c
2017-05-26 13:58:46 +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
Alexey Sedunov f679043929 Kotlin Facet: Do not rewrite v2 configuration to latest version
This causes unwanted changes in configuration files
after plugin update

Original commit: 151b512a6c
2017-05-22 13:51:07 +03:00
Valentin Kipyatkov 0fbb7719c5 Fixed error message to quote parameter name
Original commit: 1fe6886a33
2017-05-20 23:44:20 +03:00
Dmitry Petrov 8f05bad893 Fix incremental compilation problems related to type alias constructors
1. Determine source element for descriptors with NO_SOURCE recursively.

2. Always provide type abbreviation for type alias constructor
return type.

 #KT-15495 Fixed

Original commit: a2db4dc0d5
2017-05-18 10:55:16 +03:00
baratynskiy f2eb937c11 Add tools.jar for JPS plugin
Original commit: 91412b0ee9
2017-05-17 17:48:59 +03:00
Zalim Bashorov e476fb3bfd Don't print unnecessary empty line separators when generate tests
Original commit: fb9d88315a
2017-05-16 19:42:47 +03:00
Dmitry Petrov ab26de17eb Update test for incremental compilation after new DCE
Previous test had an inline setter that didn't produce any effect,
thus, corresponding code was removed by new DCE.
Make sure that changes made in the inline property are caught up by IC.

Original commit: 8903504334
2017-05-16 17:28:43 +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
Alexander Udalov 8c25a1982e Change how kotlinc and tools display their version
- Display the Kotlin version in kotlin-gradle-plugin. This is needed
  because if "-version" is specified in compiler arguments, the "info"
  level of the message printed by the compiler in CLICompiler prevents
  it from being displayed by default (unless "--debug" is passed to
  Gradle).
- Display the version of JRE the compiler is running on. This will be
  helpful to diagnose Java 9 related issues in the future.
- In CLI, also display the executable name (kotlinc-jvm or kotlinc-js)

Original commit: fcf44af294
2017-04-28 20:49:54 +03:00