Commit Graph

228 Commits

Author SHA1 Message Date
Mikhail Glukhikh b05a1bb1a2 [IR] Extract IrExternalPackageFragmentImpl.createEmptyExternalPackageFragment 2020-05-25 15:40:37 +03:00
Roman Artemev 19e352a1b5 [ANDROID] Simplify parcelize ir plugin code
- avoid direct usages of CommonBackendContext & Backend Symbols
2020-05-12 14:29:55 +03:00
Roman Artemev c20aa297f1 [ANDROID] Fix Parcelize reslove extension plugin
- make it provide its synthetic members names
2020-05-12 14:29:55 +03:00
Alexander Udalov 7a369b3a6a Mark PureIrGenerationExtension as deprecated to prevent more usages
The IR plugin extension mechanism is being reworked and in the new
scheme, this new extension point won't be necessary.
2020-05-06 22:51:32 +02:00
Steven Schäfer 9fc210224d Parcelize: Fix IBinderIInterface test 2020-05-06 22:51:12 +02:00
Steven Schäfer 518c7a32b8 Parcelize: Add a test for efficient Parcelable serialization within the same module 2020-05-06 22:51:12 +02:00
Steven Schäfer a4e6dbb0d7 Parcelize: Add test for TypeParceler scoping behavior 2020-05-06 22:51:12 +02:00
Steven Schäfer b35e8e208a Parcelize: Add a test for Parcelize with persistable bundles 2020-05-06 22:51:12 +02:00
Steven Schäfer 43bccff135 Parcelize: Add a test for parcelize of IBinder and IInterface 2020-05-06 22:51:12 +02:00
Steven Schäfer 6cf3e0e38e Parcelize: Add a test for exceptions in parcels (KT-31830) 2020-05-06 22:51:12 +02:00
Steven Schäfer 21637c828e Parcelize: Add a test for Java interop (KT-25807) 2020-05-06 22:51:12 +02:00
Steven Schäfer aa0eeba327 Parcelize: Add a test for KT-36658 2020-05-06 22:51:12 +02:00
Steven Schäfer 01ea2a641f Parcelize: Add test for KT-26221 2020-05-06 22:51:12 +02:00
Steven Schäfer 1552e55474 Parcelize: Add an exhaustive test for primitive types 2020-05-06 22:51:12 +02:00
Steven Schäfer 1f97486fdd Parcelize: Improve testing infrarstructure
- Support newer android versions
- Allow testing against Java files using android APIs
- Update test expectations
- Auto-generate ParcelBoxTests
- Create tests for the JVM IR backend
2020-05-06 22:51:12 +02:00
Steven Schäfer d62b353ab5 Parcelize: Fix metadata and remap synthetic descriptor stubs 2020-05-06 22:51:12 +02:00
Steven Schäfer 779133e71e Parcelize: Implement support for the JVM IR backend. 2020-05-06 22:51:12 +02:00
pyos 9b68e4fe56 Android/IR: handle nulls from getView/getContainerView
Turns out it's possible to create an IR builder without a backend
context
2020-03-03 14:19:47 +09:00
Stanislav Erokhin 453008e488 Deprecated reportFromPlugin way to report diagnostics from plugin
Originally reportFromPlugin method was introduced to address the problem
with loading of DefaultErrorMessages.Extension vis ServiceLoader.
For some cases this extension was not loaded by ServiceLoader because
classes was loaded via different class loader, common scenario here is
compiler plugins. Ideally we should load such extension point via
getService approach, but unfortunately to do that we need project and
DefaultErrorMessages.render is static method for now.
Also with reportFromPlugin approach is a problem -- all diagnostics
reported via this method has the same id: PLUGIN_[WARNING|ERROR|INFO]
and it isn't possible to suppress only one particular diagnostic.
To bypass this problem the new method
initializeFactoryNamesAndDefaultErrorMessages was introduced.
It basically store DiagnosticRenderer inside DiagnosticFactory.
It is not ideal, because one DiagnosticFactory could have different
renderers for different scenarios -- for compiler and for IDE, but
I think that it is better than reportByPlugin approach.
2020-02-26 12:12:31 +03:00
pyos ca3c1d04c5 Add an IR version of Android Extensions blackbox tests 2020-01-24 18:12:21 +09:00
pyos 4094841dc6 Add a basic IR extension to the Android plugin
Only supports uncached findViewById/findFragmentById for now; other
features are experimental and the cache only affects performance, so
this should probably be fine for testing Android apps with -Xuse-ir.
2020-01-24 18:12:21 +09:00
Alexander Udalov 8a4510c21b Regenerate tests 2020-01-02 10:31:00 +01:00
Dmitriy Novozhilov e7f8c8e155 [TEST] Regenerate tests after previous commit 2019-12-12 16:11:45 +03:00
Vyacheslav Gerasimov 3b088818a5 Build: Add sources and javadocs to Kotlin Plugin publication 2019-11-01 16:22:42 +03:00
Vyacheslav Gerasimov 38ea5a85a3 Build: Add maven publication for Kotlin plugin artifacts 2019-10-24 17:06:19 +03:00
Nikolay Krasko 4ed64b0283 Regenerate tests with TargetBackend.ANY remove and using runTest with this 2019-10-23 12:49:48 +03:00
Nikolay Krasko 2c0ce40f75 Refactoring: extract test dummy traces 2019-10-23 12:49:47 +03:00
Igor Yakovlev 3f9bffcc5f Move UL compiler plugin support to separate extension point 2019-10-18 23:22:47 +03:00
Igor Yakovlev 558a700f51 Add UL support for ParcelableCodegenExtension compiler plugin 2019-10-18 23:22:47 +03:00
Pavel Kirpichenkov b7e5d9faae Update annotation rendering in diagnostics
Disable annotation rendering in default type and descriptor renderers.
Preserve annotations in Android and Serialization plugins.
Update error texts in ide tests.
Nullability annotations in Java descriptors are rendered with context-dependent renderer.

#KT-20258 Fixed
2019-10-04 11:18:45 +03:00
Igor Yakovlev 2b7dee6f8d Add CodegenApplicabilityCheckerExtension and use it to fallback to Heavy LigthClasses
+ Fixed #KT-33584
2019-09-11 15:29:12 +03:00
Georgy Bronnikov b9db4148cc Check whether test is ignored before reporting failure 2019-08-13 19:37:11 +03:00
Yan Zhulanow 1f13c4b87b Parcelize: Remove remaining experimental status checks (KT-32096) 2019-08-07 01:15:33 +09:00
Alexander Udalov 8103f0ba60 Fix compilation in AbstractAndroidBytecodeShapeTest.kt 2019-07-16 15:51:30 +02:00
Vyacheslav Gerasimov db3b01d2d4 Build: Centralize compiler dist build logic in :kotlin-compiler project 2019-06-27 17:56:48 +03:00
Dmitry Savvinov d5fbe59a3e [Platform API] Introduce fundamental abstraction of Platform
This is a large commit, which introduces general API for working with
abstraction of Platform.

- Add new abstraction to 'core' - SimplePlatform - which represents
exactly one platform
  - Clients are strongly prohibited to create instances of SimplePlatform
  by hand, instead, corresponding *Platforms abstraction should be used
  (e.g. JvmPlatforms, JsPlatforms, KonanPlatforms)

- Move TargetPlatform to 'core', it represents now a collection of
SimplePlatforms
  - Clients are strongly encouraged to use TargetPlatform
    (not SimplePlatform) in API, to enforce checks for multiplatform

- Provide a helper-extensions to work with TargetPlatform
(in particular, for getting a specific component platform)

- Remove MultiTargetPlatform in favour of TargetPlatform
  - Notably, this commit leaves another widely used duplicated abstraction,
    namely, IdePlatform. For the sake sanity, removal of IdePlatform is
    extracted in the separate commit.
2019-05-28 13:08:07 +03:00
Alexander Udalov b602c08773 Remove javaFilesDir parameter of CodegenTestCase.doMultiFileTest
Create TestFile instances for .java sources similarly to .kt sources,
and write them to a temporary directory via writeJavaFiles in each test
where this is needed
2019-05-15 13:25:14 +02:00
Alexander Udalov 7fdb9c990e Reformat and cleanup most JVM codegen test classes 2019-05-15 13:25:14 +02:00
Vyacheslav Gerasimov 0ec1df89fa Build: use configuration for dependency on android-extensions-runtime
`evaluationDependsOn` may lead to obscure gradle errors on project configuration
2019-04-29 16:23:16 +03:00
Dmitry Gridin 37c856290f Fix minor compile warnings 2019-04-25 19:47:39 +07:00
Alexander Udalov 1c1ff3e2b2 Minor, move android-extensions-compiler tests to package org.jetbrains.kotlin
To fix the package name mismatch inspection
2019-04-25 14:43:47 +02:00
nikita.movshin 65244b4bea Update copyright.
Change the copyright from "JetBrains s.r.o." to
"JetBrains s.r.o. and Kotlin Project contributors"
Update only 2 lines copyright.
2019-04-23 20:09:22 +03:00
Vyacheslav Gerasimov adb896d74c Build: Introduce embedded configuration used for fatJars 2019-04-10 17:54:06 +03:00
Vyacheslav Gerasimov d554b5aafa Build: Embed projects not published to maven into kotlin-plugin.jar 2019-04-10 17:54:05 +03:00
Vyacheslav Gerasimov fc8be48fa8 Build: Improve intellij-sdk repo up-to-date check time & layout
Up-to-date check is very heavy for intellij repo due to artifact size.
If module directory in repo is written only by one task we can assume
that task if up-to-date if target directory exists.
2019-03-20 21:29:13 +03:00
Jake Wharton 8e23555660 Make parcelize a non-experimental feature
It was already being added to the feature list by default, but was only enabled when isExperimental was true.
2019-03-20 20:52:23 +03:00
Mikhael Bogdanov 20da778046 Add default values to KotlinTypeMapper constructor, remove them from call sites
~
2019-03-05 20:34:25 +01:00
Mikhael Bogdanov cc0c3b1592 Specify default value for irBackend 2019-03-05 20:33:35 +01:00
Mikhael Bogdanov e963c52c80 Update copyright in generated non-compiler tests 2019-01-02 13:34:03 +01:00
Mikhael Bogdanov c19c979b7d Use last asm api for visitor construction 2018-12-20 12:55:09 +01:00