Commit Graph

1767 Commits

Author SHA1 Message Date
Ilya Gorbunov e0a4f9ba76 Rewrite precondition samples and refactor precondition tests
Precondition tests are shared for JS target.
Samples do not use assertFailsWith as expression, as it's going to be converted as a special template.
2017-04-21 21:13:25 +03:00
Ilya Gorbunov ec8ead754f Run kotlin-test-js tests with kotlin-stdlib-js
Rework kotlin-test common tests to make them runnable with qunit.
Change the way how asserter is overridden in js box tests.
Minor: remove unneeded test configs
2017-04-21 20:51:07 +03:00
Zalim Bashorov c112542935 KJS: remove unnecessary test runners (mostly for stdlib)
Stdlib tests run separately via gradle.
2017-04-20 16:19:05 +03:00
Ilya Gorbunov 2db8714fc5 Fix null values being treated as missing in 'put' method of a specialized string-keyed map 2017-04-19 18:32:47 +03:00
Ilya Gorbunov 59dc0f57fc Clarify copyRecursively behavior in case of a single file. 2017-04-18 21:26:55 +03:00
Shaun Reich 7ebd86725f Fix FileTreeWalk doc typo/grammar 2017-04-18 21:26:53 +03:00
Ilya Gorbunov ea18282f4c Minor: reformat docs to distinguish summary 2017-04-18 21:26:52 +03:00
Ilya Gorbunov 6ae19e03d5 Clean warnings and refactor stdlib tests.
Merge RangeJVMTest into RangeTest.
2017-04-18 18:51:20 +03:00
Ilya Gorbunov cb186aabf9 Another workaround for IDEA shared source root limitation 2017-04-18 18:51:20 +03:00
Ilya Gorbunov 4a5d8534c1 Fix array iterators to adhere to Iterator contract
#KT-17453 Fixed

Change expected exceptions in tests.
2017-04-18 18:51:20 +03:00
Ilya Gorbunov f22375601b Remove unneeded suppressions 2017-04-18 12:47:11 +03:00
Ilya Gorbunov 8f452ed046 Cleanup warnings in stdlib and generated code 2017-04-18 12:47:04 +03:00
Ilya Gorbunov 6af986cfdd Refactor serialization tests and move them to test/io package
Add tests for singleton deserializing.
2017-04-18 12:46:52 +03:00
Alexander Udalov 10f2e9d33a Revert usages of -X arguments to old form in some places
We use the old compiler in Gradle build and in GradleFacetImportTest, so
some changes in f4b6db4 should not have been made yet
2017-04-17 11:33:58 +03:00
Alexander Udalov f4b6db4dc0 Change format of -X arguments to require value after '='
Report a warning when an argument is passed in the old form (with the
whitespace)

 #KT-17264 Fixed
2017-04-14 20:07:54 +03:00
Alexander Udalov 7fe9b99087 Support different target platforms for modules in AnalyzerFacade
Instead of reusing the same AnalyzerFacade that is used for resolution
of a module to resolve its dependencies, analyze each dependency
module/library with a facade depending on its target platform. Introduce
and use CommonLibraryDetectionUtil in addition to
KotlinJavaScriptLibraryDetectionUtil, to detect common libraries (with
.kotlin_metadata files).

Note that before multi-platform projects, this was not needed because
there were only two platforms (JVM and JS), and JVM module had only JVM
modules/libraries as dependencies, JS module had only JS
modules/libraries as dependencies. Now, for example, a JVM module can
have a common module/library as a dependency, and it would be incorrect
to analyze that dependency with JvmAnalyzerFacade because that facade
does not know anything about .kotlin_metadata files.

The changes in Dsl.kt and KotlinCacheServiceImpl.kt are needed because
PsiElement.getJavaDescriptorResolver, called from some IDE code, started
to fail on a common module, because the container for a common module
does not have the JavaDescriptorResolver
2017-04-14 00:44:00 +03:00
Ilya Gorbunov 37e046f6cd Provide shortcuts for producing quick compiler for maven and rebuilding stdlib-js from ant. 2017-04-10 19:46:06 +03:00
Ilya Gorbunov 5aabcb6ea3 Update build instructions in ReadMe to include gradle build step.
Also update links and overall readme structure.
2017-04-08 08:37:12 +03:00
Ilya Gorbunov 337fd4e180 Drop poms that are no longer required. Drop separate unit test modules for stdlib js. 2017-04-08 08:28:50 +03:00
Ilya Gorbunov 88e6f2160a Build and verify runnable samples with gradle. 2017-04-06 20:32:37 +03:00
Ilya Gorbunov 3db1613167 Setup dist task to assemble libs for compiler distribution.
Produce special stdlib artifact with annotations for dist.
Put js outputs to dist, they're required for JS backend tests.

Use kotlin-compiler for maven, which has all required dependencies bundled.
Clean local directory repository on clean.

Change paths in tests to compiled artifacts.
2017-04-06 20:32:37 +03:00
Ilya Gorbunov 0b2cadc638 Provide a method for common publishing configuration. 2017-04-06 20:32:37 +03:00
Ilya Gorbunov 92ef26606b Refactor build to make manifest specification less error-prone.
Use legacy implementation title in manifest of JS stdlib for now.

Change the way common jvm project configurations is applied.
Add missing artifacts to common libraries.
2017-04-06 20:32:37 +03:00
Ilya Gorbunov 325ebfbd5f Use karma plugin to run kotlin-stdlib-js tests.
Also create html page to run tests interactively in browser.

Use karma-teamcity-reporter 0.1.2 to workaround https://github.com/karma-runner/karma-teamcity-reporter/issues/38
2017-04-06 20:32:37 +03:00
Ilya Gorbunov dedf9fe898 kotlin-stdlib-js: copy sources in order to prevent duplicate source root in IDEA 2017-04-06 20:32:37 +03:00
Ilya Gorbunov 65a800840c Use single task for empty javadocs. 2017-04-06 20:32:37 +03:00
Ilya Gorbunov 4645fc4b7b Build reflection classes with gradle 2017-04-06 20:32:37 +03:00
Ilya Gorbunov e090a44b71 Migrate binary-compatibility-validator tests to gradle. 2017-04-06 20:32:37 +03:00
Ilya Gorbunov 609355a311 Provide kotlin.AssertionError in kotlin-stdlib-common
Remove related workarounds from kotlin-test-common
2017-04-06 20:32:37 +03:00
Ilya Gorbunov 5c0110850d Preprocess and build JS library tests 2017-04-06 20:32:37 +03:00
Ilya Gorbunov 0e1fc0cff2 Rewrite preprocessor task in gradle without ant 2017-04-06 20:32:37 +03:00
Ilya Gorbunov 49ce11f363 Build and package kotlin-stdlib-js with gradle 2017-04-06 20:32:37 +03:00
Ilya Gorbunov 122e63d072 Build kotlin-stdlib-js with gradle 2017-04-06 20:32:37 +03:00
Ilya Gorbunov 846b74885c Remove some configuration duplication by using 'tasks.withType()'
Setup common options of java and kotlin compiler tasks.
2017-04-06 20:32:37 +03:00
Ilya Gorbunov d25b07fe23 Exclude additional test source sets when importing project in IDEA, enable coroutines in stdlib 2017-04-06 20:32:37 +03:00
Ilya Gorbunov 08fa304b6f Build common standard library headers and kotlin-test (common and jvm) as multiplatform projects. 2017-04-06 20:32:37 +03:00
Ilya Gorbunov 780e12f04a Build stdlib without dependency to kotlin-runtime and kotlin-test. 2017-04-06 20:32:37 +03:00
Ilya Gorbunov d3afc1ba2e Extract manifest attribute specification to helper function.
Specify default jdkHome for all projects.
2017-04-06 20:32:37 +03:00
Ilya Gorbunov 5755210498 Tune build options for kotlin-test, kotlin-runtime, kotlin-stdlib, kotlin-stdlib-jre7/8 2017-04-06 20:32:37 +03:00
Ilya Chernikov 35a135cbf6 Add builds for main stdlib, stdlib jre7/8, kotlin.test 2017-04-06 20:32:37 +03:00
Ilya Chernikov c2c051cfe8 Prepare gradle config for building libs - bootstrap and runtime
Use external gradle plugin (1.1-M04) with compiler.jar from dist
Add empty build scripts for other projects that needs to be built with gradle
2017-04-06 20:32:37 +03:00
Alexander Udalov b5ea6d3e25 Upgrade maven-shade-plugin to 3.0.0
A critical bug related to Java 8 bytecode (default/static methods in
interfaces) was fixed in maven-shade-plugin in 3.0.0, which reproduces
for kotlin-compiler-embeddable on Java 9 because the verifier in Java 9
started to check consistency of constant pool references to methods in
interfaces

 #KT-17112 Fixed
2017-04-03 18:37:22 +03:00
Anton Bannykh 7d4c26c0c1 JS: fix maven SeleniumTest 2017-03-28 21:23:21 +03:00
Anton Bannykh 9b34e21619 JS: fixed <Type>Array.iterator methods; added -Xtypedarray compiler key
The <Type>Array.iterator used to lack next<Type>() method (KT-16626).

The -Xtypedarray compiler key enables translation of primitive arrays
to TypedArrays, and primitive array`is`-checks (KT-15358, KT-14007,
KT-14614, KT-16056).
2017-03-27 23:09:34 +03:00
Alexander Udalov d615aba4cf Update KotlinVersion.CURRENT to 1.1.3 2017-03-27 10:48:18 +03:00
Ilya Gorbunov c98c2d9931 Remove 'nearly_stateless' category, do not mention statefulness for terminal operations.
#KT-16994
2017-03-24 19:06:06 +03:00
Ilya Gorbunov 4018db680e Sequence operation classification regarding their statefulness and laziness.
#KT-16994 Fixed
2017-03-24 19:06:06 +03:00
Ilya Gorbunov 3088586ac3 Add runnable samples for trimIndent and trimMargin.
#KT-9786 Fixed
2017-03-22 21:54:46 +03:00
Alexander Udalov 7dfa3bea18 Update tools & libraries projects to use JDK 8 when needed 2017-03-21 17:45:53 +03:00
Ilya Gorbunov 87c055cc61 Fix progression iterators to respect the Iterator contract.
#KT-16923 Fixed
2017-03-20 20:13:54 +03:00