Ilya Chernikov
65d1c8ce7e
K2 Scripting: do not report import resolution errors on implicit imports
...
since implicit imports are used in the gradle scripts, where it seems
difficult to precisely control list of import to avoid
unresolved names. And we can relatively safely ignore
unresolved imports there
#KT-62404 fixed
2023-11-03 21:54:23 +00:00
Ilya Chernikov
02dc3c4ddb
K2 Scripting: add annotation resolving for scripts
...
#KT-62400 fixed
2023-11-03 21:54:23 +00:00
Ilya Chernikov
31f9e9e7a8
K2 Scripting: implement basic metadata serialization support
...
#KT-62305 fixed
NB: kotlin reflection do not see script class constructor after
this change, and it's ok, since the fact that the script is compiled
into a class is an implementation detail.
If needed, java reflection could be used to access the constructor.
2023-11-03 21:54:23 +00:00
Ilya Chernikov
122f16fc18
K2 ignore return type on special java funs overrides
...
#KT-62197 fixed
2023-11-03 18:32:05 +01:00
Ilya Chernikov
b3d33aee19
HMPP, IC: Implement shared provider for IC class files
...
#KT-61942 fixed
temporary solution, see comments for details
2023-11-02 11:03:37 +00:00
Ilya Chernikov
76eda0095e
HMPP: Fix isCommon calculation for the K2 HMPP case
2023-11-02 11:03:37 +00:00
Ilya Chernikov
1d461684ae
LT: make where clause with errors parsing same as with PSI
...
- do not fail on the missing terms
- propagate invalid name to avoid reporting dangling constraints
#KT-58455 fixed
2023-10-27 18:22:28 +00:00
Ilya Chernikov
268d058bbb
Implement missing invoke resolution branch with context receivers
...
#KT-61937 fixed
Note: the current implementation only resolves for a single receiver
in each group. See KT-62712 and KT-62709 for the followup.
2023-10-19 19:39:31 +00:00
Ilya Chernikov
141333bdcd
K2: Update extension receiver after checking in CheckExtensionReceiver
...
fixes receiver selection when the candidate has more that one possible
extension receiver
#KT-62129 fixed
2023-09-22 11:33:46 +00:00
Ilya Chernikov
e5ee364419
IC: Implement expect/actual tracking
...
fixes NewMultiplatformIT.testIncrementalCompilation
also #KT-61590 fixed
2023-09-19 15:46:30 +00:00
Ilya Chernikov
9ed23a7f07
Scripting: fix supplementary test jar compilation
...
make its version consistent with compilation of the script
that uses it
2023-09-19 15:46:30 +00:00
Ilya Chernikov
0aff76141b
Fix comment on testScriptWithoutParams
2023-09-19 15:46:30 +00:00
Ilya Chernikov
129c1b4f92
IC: temporarily mute lookup tracker test on K2
...
Test most likely fails due to the missing precise java tracker
See #KT-57147 and #KT-60736 for details
2023-09-19 15:46:28 +00:00
Ilya Chernikov
a182c907bc
Fix scripting testdata for changed diagnostics in K2
2023-09-19 15:46:28 +00:00
Ilya Chernikov
8a10070772
LV20 update scripting test mute logic for K2
...
after switching to LV20 by default
2023-09-19 15:46:28 +00:00
Ilya Chernikov
5b64741609
LV20: unmute scripting test
...
the test doesn't fail anymore, but should
see #KT-60452
2023-09-19 15:46:28 +00:00
Ilya Chernikov
beeae2772e
LV20: fix / mute failing main-kts test
2023-09-19 15:46:28 +00:00
Ilya Chernikov
c639febf36
LV20: remove redundant scripting plugin registration
...
related to #KT-61452
2023-09-19 15:46:28 +00:00
Ilya Chernikov
3dc1b26d83
Fix cli testdata for changed diagnostics in K2
2023-09-19 15:46:28 +00:00
Ilya Chernikov
7b49acb490
Fix ant testdata for changed diagnostics in K2
2023-09-19 15:46:28 +00:00
Ilya Chernikov
21b7945216
Fix ant testdata due to the newly added suppression warning
2023-09-19 15:46:28 +00:00
Ilya Chernikov
effb2f801d
Fix cli testdata for the newly added warning suppression tests
2023-09-19 15:46:28 +00:00
Ilya Chernikov
562ede4c7d
LV20: Fix maven plugins test metadata
2023-09-19 15:46:28 +00:00
Ilya Chernikov
7cbe728e35
LV20: mute scripting test testLazyScriptDefinitionDiscovery
2023-09-19 15:46:28 +00:00
Ilya Chernikov
856e801cbc
LV20: fix CompilerSmokeTest testdata for changed K2 error reporting
2023-09-19 15:46:28 +00:00
Ilya Chernikov
9fed50c03b
LV20: fix CliTestGenerated testdata for changed K2 error reporting
2023-09-19 15:46:28 +00:00
Ilya Chernikov
e29cd3d0b3
LV20: fix testdata for OldCompileKotlinAgainstCustomBinariesTest
...
fake future version changed
2023-09-19 15:46:27 +00:00
Ilya Chernikov
e7ff1d4cd9
LV20: mute noStdLib test for K2 until the issue is resolved
...
K2 do not track builtins properly to provide appropriate
diagnostics yet
related to #KT-61033
2023-09-19 15:46:27 +00:00
Ilya Chernikov
e3dae559d0
LV20: refactor K2 scripting tests - rename tasks
2023-09-19 15:46:27 +00:00
Ilya Chernikov
2c4cca5785
LV20: fix K2 scripting tests - plugin registration
2023-09-19 15:46:27 +00:00
Ilya Chernikov
60603de042
LV20: fix JPS testdata where the error reporting slightly changed
2023-09-19 15:46:27 +00:00
Ilya Chernikov
0883b4468b
LV20 mute test related to main function detection
...
related to #KT-44557
2023-09-19 15:46:27 +00:00
Ilya Chernikov
137dfbaca4
LV20: fix LauncherScriptTest testdata
...
note: the follow-up ussue for one of the changes - KT-60865
2023-09-19 15:46:27 +00:00
Ilya Chernikov
063f81ed36
MPP, Maven: remove mpp test from maven plugin
...
The MPP should be removed from the maven plugin soon, and since
this test fails on K2 anyway, it was decided to remove it.
related to #KT-61285
2023-08-25 08:57:53 +00:00
Ilya Chernikov
afd7186680
Fix scripting test with cycle detection
2023-08-25 08:57:53 +00:00
Ilya Chernikov
cb3af906cd
K2: Do not check import conflicts for implicit imports
...
fixes scripting resolve tests in LV20 branch
2023-08-25 08:57:53 +00:00
Ilya Chernikov
b821009617
K2: add missing checks for integral parameter type on implicit coercion
...
#KT-61418 fixed
#KT-61442 fixed
#KT-61441 fixed
2023-08-25 08:55:58 +00:00
Ilya Chernikov
85ca5294ef
K2: add test for already fixed missing diagnostic issue
...
#KT-55956
2023-08-23 09:40:45 +00:00
Ilya Chernikov
4b7234d27e
K2: add test for already fixed qualifier resolve issue
...
#KT-57845
2023-08-23 09:40:44 +00:00
Ilya Chernikov
f8b789164c
Remove long unused DI annotation PostConstruct
...
we broke its contract a long time ago, so it is obviously unused
but breaks some Java EE verifications
#KT-32275 fixed
2023-08-18 19:58:07 +00:00
Ilya Chernikov
a53933d8ce
Scripting: do not pack generic dependencies jar into maven-all
...
The -all jar is compacted with proguard, and the proguard removes
synthetic methods methods with $default suffix from classes regardless
of the -keep flag.
Therefore the calls to the $default metods lead to the NoSuchMethodError
exception on runtime.
Removing the main interface module from the proguarded jar solves the
problem for now (but not generally, the use of "proguarded" jars as
libraries should be discouraged.)
#KT-60862 fixed
2023-08-18 12:35:25 +00:00
Ilya Chernikov
0c35e97a8d
Tests: fix testLightTreeReadLineEndings
...
- it is now depends on the propery configured environment
2023-08-09 23:58:51 +00:00
Ilya Chernikov
3ee07eb015
Scripting: add test for implicit receivers with the same short name
2023-07-26 08:49:27 +00:00
Ilya Chernikov
3dc94f3d31
Scripting: fix descriptor extraction, restore main-kts testing
...
Temporary solution for K1 - see comments in the code
it seems that a scenario reproduced in the MainKtsTest.testKt48812
wasn't covered with analogous changes before.
And it wasn't detected while main-kts tests weren't a part of the
K1 scripting tests.
The test is fixed now, and testing of main-kts is restored.
2023-07-26 08:49:27 +00:00
Ilya Chernikov
776cdbcd3f
minor: small cleanup in K2 scripting support code
2023-07-26 08:49:27 +00:00
Ilya Chernikov
895a811b47
K2 Scripting: fix capturing from the imported scripts
2023-07-26 08:49:27 +00:00
Ilya Chernikov
1d88c307ea
K2 Scripting: fix locality of script declarations
...
the script declarations are considered public, at least because they
can be reused from another script then used with the `importedScripts`
configuration property. It also improves the compatibility with K1
scripting.
2023-07-26 08:49:27 +00:00
Ilya Chernikov
020a590df7
K2 Scripting: fix order of arguments processing
...
and base class handling:
Since in K2 we do not distinguish between script arguments taken from
the base class and provided properties, we need this extra functionality
to preserve the argument order of K1 scripts.
This is a temporary measure, since we're going to deprecate base class
usage at some point (KT-60449), so the relevant constructor arguments
should disappear too.
2023-07-26 08:49:27 +00:00
Ilya Chernikov
96bde033e1
K2 Scripting: add support for imported scripts
2023-07-26 08:49:26 +00:00
Ilya Chernikov
d24fc3b581
K2 Scripting: add support for result field
2023-07-26 08:49:26 +00:00
Ilya Chernikov
6c7751b0af
K2 Scripting: add support for script implicit receivers
2023-07-26 08:49:26 +00:00
Ilya Chernikov
480ea80fc4
Enable K2 scripting tests
2023-07-26 08:49:26 +00:00
Ilya Chernikov
266a223460
Update scripting plugin autoload logic for K2
2023-07-26 08:49:26 +00:00
Ilya Chernikov
0d7a5c6b1b
Scripting: fix string script source location
...
fixes proper script definition discovery for expressions and other
scripts created from a string.
2023-07-26 08:49:26 +00:00
Ilya Chernikov
b1b1eab35b
K2 Scripting: fix testdata for scripts diagnostics tests
2023-07-05 19:46:04 +00:00
Ilya Chernikov
5e3f7184d1
IR Scripting: fix capturing of the script parameter in a fun
2023-07-05 19:46:04 +00:00
Ilya Chernikov
bf3a6f7678
K2 Scripting: support script top-level destructuring declarations
2023-07-05 19:46:04 +00:00
Ilya Chernikov
02e2438d37
K2 Scripting: fix script this receiver handling in IR
...
also fix accessor lowering
2023-07-05 19:46:04 +00:00
Ilya Chernikov
07df03dbec
K2 Scripting: fix capturing in scripts created from Fir
2023-07-05 19:46:04 +00:00
Ilya Chernikov
00211a5fc9
K2 Scripting: turn on implicit body resolve for scripts
2023-07-05 19:46:04 +00:00
Ilya Chernikov
1a735b0842
K2 scripting: support script-level typealiases
2023-07-05 19:46:04 +00:00
Ilya Chernikov
70d2fcd9c4
K2 Scripting: deprecate top level script inner classes
...
no LT support yet
2023-07-05 19:46:03 +00:00
Ilya Chernikov
7484ccb9ee
K2 Scripting: allow script top level inline functions
2023-07-05 19:46:03 +00:00
Ilya Chernikov
86b3e65d19
K2 Scripting: enable script processing in diagnostics collector
...
and add scripts to containing decls in checker context te be able to
check for containing script in checkers
2023-07-05 19:46:03 +00:00
Ilya Chernikov
f79f715590
Fir2Ir: remove error reporting on no receiver
...
this error is not valid for scripts, where some receivers are set
later in the lowering, and it looks like in other cases this problem
will be detected later in lowering or codegen anyway.
2023-07-05 19:46:03 +00:00
Ilya Chernikov
7866c63e49
Fir2Ir: add fake overrides binding for script top level classes
2023-07-05 19:46:03 +00:00
Ilya Chernikov
9adf24950a
Fir2Ir scripts: fix declarations registration and processing
2023-07-05 19:46:03 +00:00
Ilya Chernikov
5824b9c59c
K2 Scripting: add Fir script codegen tests
...
27 failing tests are muted
2023-07-05 19:46:03 +00:00
Ilya Chernikov
4fe3e875fa
Write refined classpath back to compiler config in core env
...
- fixes refining with classpath updates
2023-06-20 16:38:33 +00:00
Ilya Chernikov
699ef5490b
Scripting: using kotlin type names instead of java ones
...
avoids problems with K2 resolving of the java types in unexpected
places
2023-06-20 16:38:33 +00:00
Ilya Chernikov
ae10eebc84
minor: scripting: fix processing of externally provided options
2023-06-20 16:38:32 +00:00
Ilya Chernikov
6f8049ffd3
CLI: support -language-version option in cli runner
2023-06-20 16:38:32 +00:00
Ilya Chernikov
30131e289f
minor: improve tests failure reporting
2023-06-20 16:38:32 +00:00
Ilya Chernikov
7db9f9c3ae
minor: script some test cases to speedup parallel execution
2023-06-20 16:38:32 +00:00
Ilya Chernikov
3e5be0909a
Abstract away error reportin in topo sort
...
required for scripting support code
2023-06-20 16:38:32 +00:00
Ilya Chernikov
8c8ca7bb70
Remove examples/tests based on obsolete script-util
...
also mark the rest of the API as Obsolete
related to #KT-58367
2023-05-04 11:35:08 +00:00
Ilya Chernikov
2e393e8fb7
Stop publishing obsolete kotlin-script-util
...
#KT-58366 fixed
2023-05-04 11:35:08 +00:00
Ilya Chernikov
a045a0a81c
FIR: use default getter in serializer if fir contains none
...
since we generate the default getter in this case in
Fir2IrDeclarationStorage.createIrProperty, so the serialized metadata
should follow the same behavior.
#KT-57373 fixed
2023-04-27 09:14:20 +00:00
Ilya Chernikov
5ef0b52ac5
Add test to the fix of maven script executor
...
related to the fix of #KT-58101
2023-04-26 09:52:58 +00:00
Ilya Chernikov
5f6d8c9030
Fix maven script executor after changes in the jdk path processing
...
#KT-58101 fixed
2023-04-21 09:40:19 +00:00
Ilya Chernikov
8cc9f911d5
FIR: temp: make klib symbol provider know parent packages
...
Current qualified access resolving algo rely (likely incorrectly,
see #KT-58037) on a providers' "knowledge" about parent packages.
This commit adds this "knowledge" to k-lib based provider.
#KT-57353 fixed
2023-04-19 11:42:03 +00:00
Ilya Chernikov
df35e5431c
FIR: fix libs filtering for abs/rel paths combinations
...
Some of the incoming paths "absoluteness" may not match the
one of the corresponding library path, and that leaded to incorrect
filtering out some items in the deserialized symbol providers.
Fix the filtering to account for the mismatch.
#KT-57535 fixed
2023-04-13 11:18:38 +00:00
Ilya Chernikov
aa3c189d83
FIR: fix return statement generation for Unit-returning lambdas...
...
for case then the expected return type is not Unit.
#KT-56747 fixed
2023-03-22 13:23:24 +00:00
Ilya Chernikov
59b88f33b2
[K2, MPP] implement IR errors reporting and test infrastructure
...
Fix test data
^KT-56344 Fixed
2023-03-22 01:28:16 +00:00
Ilya Chernikov
fea344faa4
Test infra: fix regexes relying on \n line endings
2023-03-21 07:53:13 +00:00
Ilya Chernikov
b2b2914da1
Switch git checkout to eol=auto on testdata
...
so the tests on windows run on files with crlf line endings
2023-03-21 07:53:13 +00:00
Ilya Chernikov
0e77b67170
K2: implement correct check for ctors mapped from java
...
so the check is functionally the same as in K1.
#KT-57064 fixed
#KT-57065 fixed
One of the tests introduced here (javaMappedCtors) revealed an
additional issue, filed as KT-57368
2023-03-20 11:33:34 +00:00
Ilya Chernikov
8edf8573b5
Revert "[K2/N] adjust interop_objc_direct test for K2 because of ^KT-55902"
...
This reverts commit 8315eeaf92 .
2023-03-17 08:57:52 +00:00
Ilya Chernikov
0387ce0365
tmp: implement a hack to fix LA test
...
due to a missing mechanism to handle a case when LA succeeds while
codegen fails. See detailed comment in the source.
Fixes implicit conversion test introduced in the previous commit.
2023-03-17 08:57:52 +00:00
Ilya Chernikov
be2a85be71
K2: support implicit integer to unsigned conversions...
...
with dedicated opt-in language feature and special
annotation or module capability.
Not intended for a general use, solves specific K/N
scenario with interop libs.
#KT-55902 fixed
2023-03-17 08:57:51 +00:00
Ilya Chernikov
54218eb77d
FIR LT: fix column calculation with crlf line endings
...
#KT-57117 fixed
also:
- refactor the position finder (mostly for testability)
- add testing of position finder to the testLightTreeReadLineEndings
- refactor the test for readability
- add mixed line ending scenario
2023-03-08 10:18:05 +00:00
Ilya Chernikov
feca40071d
K2, MPP: Fix parent lookup in mangler in MPP scenario
...
fixes compilation of the ListTest.kt in stdlib tests
#KT-57131 fixed
(bootstrap required to see the effect!)
2023-03-08 09:38:48 +00:00
Ilya Chernikov
1d72681e4e
K2: Fix stdlib test use of assertEquals
...
fixes test compilation according to the workaround
described in #KT-56717
2023-03-08 09:38:48 +00:00
Ilya Chernikov
8a8b204e11
K2, stdlib tests: make unsigned conversions explicit
...
Allow using K2 to compile stdlib tests
related to #KT-56379
2023-03-08 09:38:47 +00:00
Ilya Chernikov
edcde79c02
Build: use K2 for stdlib tests when enabled
...
enables testing of #KT-56379
2023-03-08 09:38:47 +00:00
Ilya Chernikov
b3d0a0a1c8
FIR LT: support labelled destructured declarations
...
add missing conversion in the LT to FIR converter
#KT-56759 fixed
2023-03-08 07:28:35 +00:00
Ilya Chernikov
cecf22e035
Fix application environment keepalive handling
...
The previous changes to the disposer registration changes introduced a
weird problem exposed in the Gradle (test?) environment, that caused
a performance regression - it seems that keep alive system property
in that setting was cleared at the time the disposer was called, causing
app env disposal when keeping it alive was expected.
This fix captures property value at the moment of disposer registration,
making it similar in that respect to the previous variant and avoiding
the performance degradation.
#KT-56992 fixed
2023-02-28 08:08:09 +00:00
Ilya Chernikov
27db8ce1bb
FIR LT: extract syntax diagnostic info from error element
...
#KT-56701 fixed
2023-02-16 10:21:04 +00:00
Ilya Chernikov
e39eb62e6e
FIR LT: Fix diagnostic location calculation on the last line
...
it was calculated incorrectly on the last line that do not end
with EOL.
#KT-56649 fixed
2023-02-16 10:21:03 +00:00
Ilya Chernikov
46c8cbe1bb
FastJarFS: fix behavior on invalid zip files
...
"emulate" the ZipHandler - log error and ignore invalid file
#KT-55712 fixed
2023-01-31 12:50:29 +00:00