Commit Graph

1301 Commits

Author SHA1 Message Date
Yaroslav Russkih 9ac52fad17 Use https everywhere - documentation and samples 2019-02-19 21:35:36 +01:00
Anton Bannykh 0fa87e3baa JS: advance IC version 2019-02-14 15:14:28 +03:00
Anton Bannykh 21cbc7b018 JS: add incremental test for local declarations change 2019-02-14 15:14:28 +03:00
Alexey Tsvetkov dbdc7a5b07 Add verbose mode to build reports
#KT-12700

Verbose mode can be enabled by adding `kotlin.build.report.verbose=true`
to `gradle.properties` file.
2019-02-12 22:10:11 +03:00
Alexey Tsvetkov 01c23510c7 Print recompilation reasons in build report 2019-02-12 22:10:11 +03:00
Alexey Tsvetkov 47bb938b94 Adjust build report verbosity 2019-02-12 22:10:11 +03:00
Sergey Rostov f35185b261 Build: remove explicit dependencies to org.jetbrains.annotations 2019-01-28 13:43:08 +03:00
Vyacheslav Gerasimov 13d87e8eae Remove as31 bunch files 2019-01-14 21:29:02 +03:00
Vyacheslav Gerasimov 818910267e Remove 173 bunch files 2019-01-14 21:29:02 +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 5cda676c9f JPS: Print components of CacheVersion, add tests 2019-01-10 08:50:39 +03:00
Sergey Rostov b3985d2735 JPS: remove cache version from test data 2019-01-10 08:50:38 +03:00
Mikhael Bogdanov e963c52c80 Update copyright in generated non-compiler tests 2019-01-02 13:34:03 +01:00
Sergey Rostov 74271cfecd JPS: Use module name from compiler arguments (JVM) 2018-12-26 08:43:00 +03:00
Mikhael Bogdanov c19c979b7d Use last asm api for visitor construction 2018-12-20 12:55:09 +01:00
Alexey Tsvetkov 2196d81322 Enable JS IC by default
#KT-28842 Fixed
2018-12-17 15:46:11 +03:00
Andrey Uskov c85f56a0a8 Remove some bunches for build scripts. 2018-12-06 19:44:09 +03:00
Sergey Rostov df2e4524d7 Move resources from /src to separate /resources directory.
Previously this files was stored in /src directory and was included in
resources mainly by SourceSet.projectDefault from sourceSets.kt:

val processResources = tasks.getByName(processResourcesTaskName) as ProcessResources
processResources.from("resources") { include("**") }
processResources.from("src") { include("META-INF/**", "**/*.properties") }

Also there are some custom rules like this:

resources.srcDir("../idea-analysis/src").apply { include("**/*.properties") }
resources.srcDirs("idea-repl/src").apply { include("META-INF/**") }

All this rules are synthesized in script
https://github.com/snrostov/kotlin-migrate-resources/blob/master/src/main/kotlin/main.kt

This commit created using that script. See README.md for more details on
 script.
2018-11-30 15:01:01 +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 ab2b4311fd JPS: fix SimpleKotlinJpsBuildTest.testDaemon
Make it the same as testJpsDaemonIC
2018-11-28 10:46:57 +03:00
Sergey Rostov 0c39358b5f JPS: fix testJpsDaemonIC
1. Checking for COMPILE_DAEMON_CUSTOM_RUN_FILES_PATH_FOR_TESTS was moved to COMPILE_DAEMON_DEFAULT_RUN_DIR_PATH.

Looks like COMPILE_DAEMON_CUSTOM_RUN_FILES_PATH_FOR_TESTS was introduced incorrectly in 220fab0d3f.
Checking of this property was added in DaemonOptions.runFilesPathOrDefault, while DaemonOptions.runFilesPath was internally used in runFilesPathOrDefault and in many other places.
For example DaemonOptions.runFilesPath used to pass this option to daemon server.
So daemon was started with runFilesPath that ignores COMPILE_DAEMON_CUSTOM_RUN_FILES_PATH_FOR_TESTS.

2. JpsKotlinCompilerRunner._jpsCompileServiceSession was leaked between tests.

Fixed by extracting @TestOnly releaseCompileServiceSession() and calling it in tests tearDown()

3. The result of compileWithDaemon was ignored in compileWithDaemonOrFallback.

So, the fallback was never called, and the FAIL_ON_FALLBACK_PROPERTY was actually was never worked.
This was fixed. Also the message was improved to make it easier to find the original fail cause.
2018-11-28 10:46: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 3c8b15ca54 JPS: Report "Cyclically dependent modules should have same compiler" as build error rather than exception
#KT-27285 Fixed
2018-11-28 10:46:57 +03:00
Sergey Rostov ce4422e2ef JPS, tests: Support multimodule mpp tests without steps 2018-11-28 10:46:58 +03: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 1301333e37 JPS, tests, minor: rename test files in modules for better readability 2018-11-26 09:29:38 +03:00
Sergey Rostov 63c6e3e1b4 JPS, minor: formatting 2018-11-26 09:29:38 +03:00
Sergey Rostov 32bd4d5936 JPS, tests: update removeAndRestoreCompanion[WithImplicitUsages] test data
src/A.kt is affected by removed classes
2018-11-26 09:29:38 +03:00
Sergey Rostov 7cdd5257c8 JPS: clear target local cache version file when caches are not required anymore
Makes changeIncrementalOption/incrementalOff test green
2018-11-26 09:29:38 +03:00
Sergey Rostov 1f162cfacf JPS, tests, minor: reformat test data for changeIncrementalOption/incrementalOff 2018-11-26 09:29:38 +03:00
Sergey Rostov 4cd4e230bf JPS, tests: update test data for cacheVersionChanged/withError
In this test only lookups caches are invalidated and only in first step.
module4 shouldn't be rebuilt since is compiled in step 1 and it is independent of all dirty modules.

Previously this module was rebuilt because of #KT-27044 which is fixed
by 5232f08
2018-11-26 09:29:38 +03:00
Sergey Rostov a508f53f9d JPS, tests, minor: reformat test data for cacheVersionChanged/withError 2018-11-26 09:29:38 +03:00
Sergey Rostov 06b908d48f JPS, tests: Add docs for incremental/cacheVersionChanged tests 2018-11-26 09:29:38 +03:00
Sergey Rostov dfe662364d JPS, minor: remove unused parameter 2018-11-22 08:40:32 +03:00
Sergey Rostov f70d01f657 Fix updating complementary files map in case of compilation errors
#KT-27868 Fixed

Previously given dirtyFiles was removed from complementaryFilesMap
exactly on call of clearComplementaryFilesMapping. This causes fail
of next build in case of compilation error of previous build on JPS
(since complementary files not known on second build). The right way
to do it is removing (replacing) them only after successful
build.

This was working on Gradle since Gradle rebuilds whole module (project)
in case of build error.
2018-11-22 08:40:32 +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 84d6c1df5a Add assertion for overwriting common sources flag
Wrong flag state causes compilation errors for optional expectation
(this flag is used to pass -Xcommon-sources)
2018-11-22 08:40:32 +03:00
Sergey Rostov 5a25d3ef58 Workaround for KT-28099 Duplicated dependency to common module
Duplicated dependencies causes duplicated source roots which in turns
causes duplicated files dirty state tracking.
2018-11-22 08:40:31 +03:00
Alexey Tsvetkov a41c2d759a Avoid catching exceptions from workers in GradleKotlinCompilerRunner
Exceptions were catched in `KotlinCompilerRunner.runCompiler`.
When the method from superclass is not used in
`GradleKotlinCompilerRunner`, the superclass does not make much sense
anymore, so I turned it into util object.
2018-11-14 11:41:43 +03:00
Alexey Tsvetkov 37dfe2b608 Use Workers API for NMPP tasks
This change enables parallel execution of compile tasks in NMPP projects
within a subproject.

    #KT-28155 In Progress
2018-11-14 11:41:43 +03:00
Anton Bannykh 59009430e5 JS: report inline suspend functions to IC
* Also inline suspend lambda'a
* Also use correct JsName's in exported suspend inline fun's
* Also use less unused imports
2018-11-07 12:11:01 +03:00
Sergey Rostov cce125b982 JPS: Don't catch BuildDataCorruptedException as internal error.
BuildDataCorruptedException should be thrown up to `IncProjectBuilder`
to be handled by TeamCity.

#KT-27037 Fixed
2018-10-27 16:08:38 +03:00
Sergey Rostov 0b8d94a6b1 JPS: Fix initialization order for case when all kotlin rebuild.
#KT-27792 Fixed
2018-10-27 16:08:16 +03:00
Vyacheslav Gerasimov 4076923a26 as34: Apply changes from AS 3.3 2018-10-26 18:25:20 +03:00
Nikolay Krasko 17421ed14d 191: asm-all has 7.0-beta version in Intellij 191
Pass project to fetch extra parameters for asm-all work
2018-10-19 19:16:21 +03:00
Sergey Rostov bde6d841c1 IC: move CacheVersionManager from build_common to jps plugin, tests 2018-10-16 13:33:24 +03:00
Sergey Rostov 0d1f7965d4 JPS, CacheAttributesManager: remove unused methods 2018-10-16 12:29:58 +03:00
Sergey Rostov d91f6f8c43 IC: move CacheVersionManager from build_common to jps plugin 2018-10-16 12:29:58 +03:00
Sergey Rostov 5232f080d6 JPS: Fix updating cache format version for rebuilt targets by removing i/o optimization
Problem: previously, format-version.txt file was deleted while cleaning
target output on rebuild. Since directory was deleted, cache
attributesDiff stored in memory was not updated. This causes that on
saveExpectedStateIfNeeded does nothing.

The right way to fix it is move cache version format diff into
AbstractIncrementalCache, and override `clean()` method. But this is
hard to do for lookup storage, since used compilers set (jvm/js) will
known only after context init. This can be done by moving `expected`
attributes out of manager, but this is huge change for small benefit.

So, the optimal way for now is to write version for each build, even if
it is not changed.

#KT-27044 Fixed
2018-10-16 12:29:58 +03:00
Nikolay Krasko 07e305e5f4 Update dictionary: +infos, -kompiler 2018-09-25 15:52:21 +03:00