Commit Graph

71 Commits

Author SHA1 Message Date
Vyacheslav Gerasimov ab146bd6d4 Build: Fix deprecated Gradle configurations usages
for migration to Gradle 7+ #KTI-559
2021-09-26 18:28:44 +03:00
Mikhail Glukhikh ffbd574a08 Use -opt-in instead of -Xopt-in in comments and scripts 2021-09-08 23:43:55 +03:00
Alexander Udalov 91c39ed01c Build: remove obsolete compiler arguments
These compiler arguments enable features which are enabled by default in
the current Kotlin anyway.

The only exception is in :compiler:cli which uses an old language
version.
2021-07-27 13:35:38 +02:00
Ilya Gorbunov b59f668a50 Change the way kotlin.js source map paths are postprocessed
The idea is that we do no longer use `sourceMapBaseDirs` parameter
of `compileKotlin2Js` task to remove prefix from source paths,
but instead preserve the full paths relative to the output directory.
This allows us to avoid duplicate file names and to identify
source files more reliably.
Then, after sources have been embedded in the source map, we remove
several relative prefixes from source paths.
2021-04-26 13:13:21 +03:00
Ilya Gorbunov 8b85bae020 Stabilize Char-to-Int conversions KT-45874 2021-04-03 10:30:50 +03:00
Ilya Gorbunov 94240f7b21 Stabilize unsigned types KT-45653
Deprecate specialized unsigned iterators for removal.

Fix compiler tests:
- drop unsignedLiteralsOn1_2 because apiVersion 1.2 is no longer supported
- drop experimental unsigned literals diagnostic test
2021-03-31 19:05:04 +03:00
Alexander Likhachev 74ab5c21a8 [Build] Fix configuration cache issues (part 4)
Make :kotlin-stdlib-js:prepareComparableSource, :kotlin-stdlib-js:prepareBuiltinsSources, :kotlin-stdlib-js:compileJs, :kotlin-stdlib-js:compileJs, :prepare:build.version:writeBuildNumber, :kotlin-compiler:distKotlinc compatible with configuration cache

Relates to #KT-44611
2021-03-11 14:12:34 +03:00
Alexander Likhachev 0e4e90dc13 [Build] Bump gradle-node-plugin version to 3.0.1 to support conf cache
:kotlin-test:kotlin-test-js:kotlin-test-js-it will still have old version as integration test run logic cannot be fully refactored to the new version (approximately till 3.1)
Relates to #KT-44611
2021-03-11 14:12:34 +03:00
Abduqodiri Qurbonzoda 662787b12b Straighten Char-to-code and Char-to-digit conversions out #KT-23451 2020-12-31 12:07:41 +03:00
Vyacheslav Gerasimov 235813736e Build: Set file access rights explicitly in kotlin-stdlib-js jar
Workaround for #KTI-401. Since gradle 6.6 ant.replaceregexp call sets
incorrect access rights `-rw-------` instead of `-rw-r--r--`
2020-12-04 01:47:18 +03:00
Ilya Gorbunov 76c5d036a8 Do not pack source of invisible runtime helpers to stdlib-js
Use reference sources of built-in Enum and Comparable instead.

KT-42318
2020-10-05 16:07:05 +03:00
Alexander Udalov da6d904c6e Suppress code warnings in kotlin-stdlib 2020-08-20 20:30:34 +02:00
Ilya Gorbunov bace1b8055 Increase stdlib-js mocha test timeouts to 10s
Some tests often do not fit into the default timeout when running tests
in parallel on CI.
2020-07-21 05:43:38 +03:00
Svyatoslav Kuzmich bbfc1a10ad [JS] Fix stack trace capturing from secondary constructors KT-37563 2020-06-22 12:03:59 +03:00
Ilya Gorbunov 05f9154bdd Use fixed versions of node.js and npm packages in tests 2020-06-15 17:18:10 +03:00
Vyacheslav Gerasimov da6c2ddb2f Build: Migrate stdlib & kotlin-test to maven-publish publication 2020-06-14 20:31:27 +03:00
Vyacheslav Gerasimov 8737168d41 Build: Use maven-publish in configurePublishing helper 2020-06-14 20:31:26 +03:00
Vyacheslav Gerasimov c2589c7d6d Build: Rename javadocJar for groovy to configureJavadocJar
So it doesn't interfere with javadocJar task accessor
2020-06-14 20:31:25 +03:00
Anton Bannykh a18bfad53a Add stdlib API test + remove some extra IR stdlib API's 2020-06-03 17:14:29 +03:00
Svyatoslav Kuzmich af13ae1ef2 [JS] Add klib to kostlin-stdlib-js.jar distribution
Fixes KTI-177 and KT-35857
2020-06-03 14:16:46 +03:00
Ilya Goncharov a476d1dbc4 String prototypes polyfills on Object.defineProperty 2020-06-02 14:56:29 +03:00
Ilya Goncharov 9431fc4693 Polyfill for Arrays should be declared with Object.defineProperty
To not be enumerable
2020-06-02 14:56:29 +03:00
Roman Elizarov 46b426ef77 KT-31741: stdlib: DeepRecursiveFunction (#3398)
Introduces experimental coroutines-based framework to execute deeply recursive functions that utilities the heap and thus avoid StackOverflowError.
2020-05-27 10:06:00 +03:00
Svyatoslav Kuzmich 3d5003d476 [JS_IR] Use new plugin to build Kotlin/JS stdlib with IR compiler
- Switch to building stdlib with bootstrap compiler since IR is stable
  enough
- Build stdlib with coreLibs by default
- Include JS IR stdlib to kotlin distribution
2020-05-08 10:37:48 +03:00
Anton Bannykh 442331acc9 IR JS: support findAssociatedObject feature (KT-37418 fixed) 2020-04-27 17:23:19 +03:00
Ilya Gorbunov d88d2cb058 Test new Double/Float constants
Split test expectations based on actual support of enforced Float range

KT-29182, KT-13887
2020-04-02 04:04:04 +03:00
Ilya Gorbunov 2bb36899da Introduce 'fail' method to throw AssertionError with cause
#KT-37804
2020-03-31 13:37:03 +03:00
Abduqodiri Qurbonzoda e632d58936 Nullable Array.contentEquals/contentHashCode/contentToString #KT-34161 2020-03-12 18:01:23 +03:00
Zalim Bashorov 43171f67a8 [stdlib-js-ir] Cleanup exceptions 2020-03-11 12:54:41 +03:00
Alexander Udalov 787e4503e5 Migrate -Xuse-experimental -> -Xopt-in in project sources 2020-03-10 12:07:15 +01:00
Vyacheslav Gerasimov 52b88bf753 Build: Fix various libraryJarWithIr task inputs 2020-03-04 01:14:56 +03:00
Vyacheslav Gerasimov 75a3808230 Build: Use sourceMapBaseDirs in :kotlin-stdlib-js:compileKotlin2Js
instead of freeCompiler args to avoid snapshotting absolute paths
and fix caching
2020-03-03 14:33:57 +03:00
Mikhail Zarechenskiy 155b716e7e Revert "Disable NewInference for stdlib tests"
This reverts commit cdf5323f8c.
2020-02-17 10:29:46 +03:00
Mikhail Zarechenskiy cdf5323f8c Disable NewInference for stdlib tests
There is one failing test namely `ValByMapExtensionsTest.doTest`, which
 is quite questionable because its checks the use of out projection and
 Exact annotation (see KT-18789)
2020-02-13 11:15:56 +03:00
Ilya Gorbunov 7792613f88 Finishing touch: drop experimental coroutines sourcesets from stdlib
#KT-36083
2020-01-29 09:12:42 +03:00
Ilya Gorbunov b5a0daabc3 Extract kotlin.coroutines.experimental API into compat artifact
Add public API dump for kotlin-coroutines-experimental-compat

#KT-36083
2020-01-29 09:12:39 +03:00
Vyacheslav Gerasimov 1f3755248c Build: Make task inputs relative to improve caching 2020-01-24 19:40:00 +03:00
Vyacheslav Gerasimov 3f10329347 Build: Fix publication of stdlib-js to avoid publishing all artifacts
Because of https://github.com/gradle/gradle/issues/4612 install and
uploadArchives tasks published artifacts which were not meant
to be published
2020-01-24 19:39:59 +03:00
Vyacheslav Gerasimov 7dcdc506d8 Build: Fix outputs for :kotlin-stdlib-js:compileJs
jsOutputMetaFile was missing
2020-01-24 19:39:59 +03:00
Vyacheslav Gerasimov 770344770d Build: Make :kotlin-stdlib-js:compileJs task cacheable 2020-01-24 19:39:58 +03:00
Ilya Gorbunov 51c5fcc8b8 Drop experimental stdlib sourceset
Haven't used it after pre 1.3
2020-01-20 18:35:21 +03:00
Ilya Gorbunov e9cea3358d Do not use libraryJarWithoutIr as runtime output artifact
This avoids having both libraryJarWithoutIr and default jar artifact,
which points to the same path as libraryJarWithIr, in the dependent
projects' classpath.
Use libraryJarWithIr instead.
For local builds where libraryJarWithIr doesn't contain any IR, this
should have the same effect.
2020-01-16 16:01:56 +03:00
Ilya Gorbunov 3fabf9b6ad Add dependency in disabled jar task on custom libraryJarWithIr
jar task is disabled, but its artifact is still used through
the runtime configuration in the other projects.
In fact, dependent projects get both
libs/kotlin-stdlib-js-1.3-SNAPSHOT.jar
lib/dist/kotlin-stdlib-js-1.3-SNAPSHOT.jar
in their classpath.

However the former artifact is built with libraryJarWithIr task after
jar task is skipped. This leads to a situation during the parallel build
that a dependent project tries to read that artifact
when libraryJarWithIr task writes it.

This commit adds a dependency edge between the disabled jar and custom
libraryJarWithIr tasks, so that the artifact is ready by
the moment jar task has finished.
2020-01-16 16:01:55 +03:00
Ilya Gorbunov 562bac3f6f Copy JVM reflect declarations to JS 2020-01-16 15:33:16 +03:00
Vyacheslav Gerasimov fa1c6c9697 Build: Add missing com.github.node-gradle.node plugin versions 2020-01-13 19:40:08 +03:00
Ilya Gorbunov 9e4d7df86e Revert "[JS IR] stdlib: switch between artifacts rather than artifact content"
The default Jar task is disabled, but its archive file is still
configured as an artifact to be published in the 'archives' configuration.
Thus, neither 'install', nor 'publish' tasks could not find this file
when `libraryJarWithIr` isn't triggered and does not build it.
Removing that artifact from the 'archives' configuration artifacts makes
'install' task publish nothing.

Therefore it's better to revert the change so that 'libraryJarWithIr' task
always runs and produces an artifact with the default name.

This reverts commit a9fec211
2020-01-11 02:27:05 +03:00
Ilya Gorbunov a9fec21178 [JS IR] stdlib: switch between artifacts rather than artifact content
The switch `includeStdlibJsIr` now affects which artifact is published:
the one with IR or the one without. Previously it affected
whether or not IR was bundled into the artifact "with IR".
2020-01-09 22:57:45 +03:00
Svyatoslav Kuzmich 31c84e9ac4 [JS IR] Build stdlib using compiler from repo
Previously JS IR versions of stdlib and kotlin-test were build
by default using compiler previously built on a buildserver.

It had some issues:
 - This required us to advance bootstrap every time we made any
   incompatible IR changes. This happens often since IR ABI is
   not quite stable yet.

 - We never tested the exact combination of compiler and stdlib we publish

   We tested:
    - new compiler with new stdlib build by new compiler (in box tests)
    - old compiler with new stdlib build by old compiler (in stdlib tests)

   We published:
    - new compiler with new stdlib build by old compiler

After this change JS IR compiler tests, builds and publishes
single configuration:

    new compiler with new stdlib build by new compiler

JS IR stdlib and kotlin-test are now built using JavaExec of CLI instead
of Gradle plugin to avoid troubles of loading a freshly built plugin.

This also allows to have a granular dependencies: we don't rebuild klib
if we changed a lowering in a compiler backend, but we do rebuild it if
we changed IR serialization algorithm.
2019-12-25 13:44:57 +03:00
Vyacheslav Gerasimov 8d31d4a60f Replace com.moowork.node plugin with com.github.node-gradle.node 2019-11-27 21:26:34 +03:00
Vyacheslav Gerasimov 81e24fbdb4 Build: Extract version of com.moowork.node to the settings.gradle 2019-11-27 21:26:34 +03:00