Commit Graph

6235 Commits

Author SHA1 Message Date
Ilya Goncharov e59d1a0ef1 Use terser instead of uglify 2019-09-24 14:36:10 +03:00
Ivan Gavrilovic 6e7f046471 Fix gradle integeration tests
Fix test failure on Windows, where backslash was not escaped
in a build file. Also, remove obsolete test for Gradle 4.2,
because 4.3 is the minimum supported version.
2019-09-23 17:32:36 +09:00
Alexander Udalov 25799447a6 Minor, use slightly less internal argument to enable inline classes 2019-09-21 02:03:31 +02:00
Ilya Matveev 5c904250be Gradle, native: Update a K/N version in tests
Earlier, K/N 1.1 was used when testing the kotlin.native.version
property. But this version doesn't support the -no-endorsed-libs
flag add recently. This patch updates K/N version in tests.
2019-09-20 16:54:30 +07:00
Ilya Goncharov 31aa4e4738 Rename kotlin-test-nodejs-runner to kotlin-test-js-runner 2019-09-20 10:56:18 +03:00
Ilya Goncharov 10c36ae5c5 Change naming from commin cli.ts to concrete platform nodejs.ts 2019-09-20 10:56:17 +03:00
Ilya Goncharov c2b5df83f6 Add filtering feature to karma testing
- Now karma use generated adapter.js as input, in which right runner and
also all real input files are required

#KT-32216 fixed
2019-09-20 10:56:15 +03:00
Ilya Goncharov 09a602d8ad Move common logic of js test running on upper level (js) 2019-09-20 10:49:57 +03:00
Ilya Goncharov e750bd302d Add karma input for kotlin-test-nodejs-runner
- To set custom adapter for kotlin-test, it is necessary to inject adapting
code to webpack's input, so then it is executed inside browser and set
custom adapter
This code will be injected to webpack's input
2019-09-20 10:49:56 +03:00
Ilya Goncharov e242856124 Enable cli description to have free args title 2019-09-20 10:49:56 +03:00
Ilya Goncharov 80ea91f574 Extract Adapter getting to common place 2019-09-20 10:49:56 +03:00
Ilya Goncharov b44249255c Extract default cli parser to common place 2019-09-20 10:49:56 +03:00
Ilya Goncharov f0af4756a9 Fix accuracy for regex filtering for nodejs testing 2019-09-20 10:49:56 +03:00
Ilya Goncharov e2aecee925 Fix exact test filtering for nodejs 2019-09-20 10:49:56 +03:00
Ilya Matveev 1b64583855 Gradle, native: Embed bitcode for watchOS and tvOS 2019-09-20 12:52:48 +07:00
Abduqodiri Qurbonzoda 2819ab4ae9 Avoid division in string-to-unsigned conversions (KT-26309) 2019-09-20 01:08:33 +03:00
Abduqodiri Qurbonzoda d66f07a84e CollectionsKt.windowed throws IllegalArgumentException 2019-09-20 00:50:54 +03:00
Ivan Gavrilovic 58efa34a33 KT-31291: KAPT - make sure ASM version is not inlined
Switch to Java reflection when getting the ASM version used
to analyze classes. Using Kotlin reflection resulted in the constant
being inlined.

Fixes KT-31291
Fixes KT-33493
2019-09-20 00:04:27 +09:00
Ivan Gavrilovic 434fb75eb7 Incremental KAPT: when unable to process incremental changes, run non-incrementally
When analyzing incremental changes in the KAPT task, incremental compilation
can handle directory changes, Java source file changes, jar/.class file changes,
and changes to the ABI structure of the classpath. Anything else should cause
a full recompilation.

Test: KaptIncrementalWithIsolatingApt.testNonIncrementalWithUnrecognizedInputs
2019-09-20 00:04:27 +09:00
Ilya Goncharov b59fba6707 Fix mocha run
#KT-33579 fixed
2019-09-19 15:42:49 +03:00
Ilya Chernikov d3b826c71d Improve class name generation for scripts and REPL snippets
- allow to override default name/scheme
- implement host/engine specific names for jsr223 to avoid classloading
  clashes (also fix "eval in eval" test)
2019-09-17 16:05:38 +02:00
Ilya Chernikov dd953e0f66 Deduplicating classloaders and classpath entries on constructing script classloader 2019-09-17 16:05:37 +02:00
Ilya Chernikov 5426071102 Add dependency classloader to the evaluation classloader:
allows to use dependencies from classloader in the scenario with
evaluation in the isolated environment
2019-09-17 12:43:18 +02:00
Ilya Chernikov 61d517fb31 Implement script dependencies resolution directly from classloader
#KT-27956 fixed
2019-09-17 12:43:18 +02:00
Ilya Chernikov f8db150a2b [minor] Drop some usages of kotlin reflection in scripting compiler plugin 2019-09-17 12:43:16 +02:00
Ilya Matveev d3f1cf1cdd Gradle, native: Don't ignore exit codes of K/N tests
Issue #KT-32872 fixed
2019-09-16 18:28:03 +07:00
Ilya Goncharov acc86be043 Extend karma-teamcity-reporter to log browser's output
#KT-32073 fixed
#KT-32281 fixed
2019-09-16 12:33:45 +03:00
Ilya Goncharov 8fbdb15626 Show suppressed output in case of karma launch failed 2019-09-16 12:31:59 +03:00
Ilya Goncharov 425582bb4b Use only custom karma reporter
- Ideally these changes should be on karma-teamcity-reporter
2019-09-16 12:31:59 +03:00
Ilya Goncharov ddbae98841 Remove redundant marker of browser log starting 2019-09-16 12:31:58 +03:00
Ilya Goncharov 355f847ee0 Add parse of karma log to find browser's messages
- Log browser's message respects their log level
2019-09-16 12:31:58 +03:00
Ilya Goncharov 8c46fab6d8 Add own reporter that reports only browser log in specific format 2019-09-16 12:31:57 +03:00
Ilya Goncharov 9bb5022eb4 Move nested classes 2019-09-16 12:31:57 +03:00
Ilya Goncharov 6277267563 Make KarmaConfig as data class 2019-09-16 12:31:57 +03:00
Ilya Goncharov 8f7c5c13f8 Parse karma problem to fail task
#KT-31663 fixed
2019-09-16 12:31:55 +03:00
Ilya Goncharov 3d67b952f8 Parse browser output to log 2019-09-16 12:25:55 +03:00
LepilkinaElena 7cae9214d7 Disable endorsed libraries in plugin (#2536) 2019-09-16 09:43:22 +03:00
Ilya Matveev 45a413c892 Gradle, native: Minor fixes
Fix ReplaceWith for compilation.extraOpts
Simplify languageSettings access in compile tasks
Use checkedReplace in binary integration tests
2019-09-16 12:45:06 +07:00
Ilya Matveev 60ae03f08b Gradle, native: Don't use deprecated DefaultTask.newOutputFile()
This method is planned to be removed in Gradle 6.0, so we avoid
using it.
2019-09-16 12:45:05 +07:00
Ilya Matveev dda25875d4 Gradle, native: Use language settings when link from sources
Take language settings into account when a final binary is
being built from sources.
2019-09-16 12:45:05 +07:00
Ilya Matveev 7122a9d819 Gradle, native: Propagate compilation free args to link tasks
The free args DSL may be changed in 1.3.70 for all platforms. So it
was decided to preserve the old behaviour here to avoid making
similar changes in two releases in a row.
2019-09-16 12:45:04 +07:00
Ilya Matveev 20332ae231 Gradle, native: Pass --progressive to both compile and link tasks 2019-09-16 12:45:04 +07:00
Ilya Matveev 90358dee55 Gradle, native: Allow user to force old behaviour of link tasks
We leave an ability to build final native binaries directly from
sources instead of building them from a klib. Thus we allow
a user to workaround possible bugs related to building a final
binary from a klib (-Xinclude compiler flag).
2019-09-16 12:45:04 +07:00
Ilya Matveev f07e0594e2 Gradle, native: Report passing binary-specific args to compilation
Earlier we propagated all free args specified for a compilation into
a link task. It was required because the link task actually compiled
the same source as the compile task but with another output kind.

But currently a link task produces a final binary from a klib instead
of sources. It means that such a propagation becomes incorrect. Now
options related to the compiler frontend like -Xexperimental must
be specified per compilation while options related to the compiler
backend (e.g. -opt, -g, -Xstatic-framework etc) - per binary.

This path shows a special warning if some of "binary-specific"
arguments are passed to a compilation.
2019-09-16 12:45:03 +07:00
Ilya Matveev 8d495c4b45 Gradle, native: Produce binaries from klibs and bump K/N version
Earlier all native binaries were produced directly from sources of
corresponding compilations. This patch changes this behavior. Now
a klibrary produced by a compilation is used to build a final
binary instead of sources. This allows us to avoid parsing the same
sources several times and reduces build time.

This patch also updates K/N version to 1.3.60-dev-11975, to get the
corresponding support from the compiler side.

Issue #KT-33076 Fixed
2019-09-16 12:45:03 +07:00
Ilya Matveev 3a935402a4 Gradle: Deprecate native extraOpts method in favor of common API 2019-09-16 12:45:02 +07:00
Abduqodiri Qurbonzoda f01420332f Avoid division in string-to-number conversions (KT-26309) 2019-09-15 21:08:23 +03:00
Abduqodiri Qurbonzoda 11f3c4b03f Clarify the error message when File.copyTo fails (KT-27545) 2019-09-13 21:29:13 +03:00
Ilya Chernikov b2d2ba5811 Refactor test utils: don't add main-kts to the classpath...
by default on running scripting tests via the call to K2JVMCompiler
2019-09-13 13:19:26 +02:00
Ilya Chernikov 49003c9839 Do not embed script-runtime into main-kts:
it is unused in it and may interfere with mixed usages when
main-kts is used along with legacy/default scripts
2019-09-13 13:19:26 +02:00