Commit Graph

55622 Commits

Author SHA1 Message Date
Ilya Gorbunov 16111ab79f Opt-in for Experimental/UseExperimental annotation usage in tests 2019-06-18 04:02:34 +03:00
Ilya Gorbunov 3b989cc815 Avoid using 'D' component in ISO duration string representation
Days in ISO have nominal duration, they are not always equal to 24H
2019-06-18 04:02:34 +03:00
Ilya Gorbunov 6dbc2eeb90 Provide more efficient ClockMark implementation
Do not use default 'plus' operator implementation, that creates a wrapping
AdjustedClockMark instance, create instance of the same type instead.
2019-06-18 04:02:34 +03:00
Ilya Gorbunov 8c730e180c Make ClockMark an abstract class instead of an interface 2019-06-18 04:02:34 +03:00
Ilya Gorbunov 04ec90164e Use ThreadLocals to cache DecimalFormat instances 2019-06-18 04:02:34 +03:00
Ilya Gorbunov 368452748b Move convertDurationUnit into Duration companion 2019-06-18 04:02:33 +03:00
Ilya Gorbunov ca10d13f34 Rename Duration storage property to 'value' 2019-06-18 04:02:33 +03:00
Ilya Gorbunov 365cbb94cd Change Duration.absoluteValue to property 2019-06-18 04:02:33 +03:00
Ilya Gorbunov 3f7a0d0845 Rename DurationMeasured to TimedValue, withMeasureTime to measuredTimeValue
Add measureTime docs
2019-06-18 04:02:33 +03:00
Ilya Gorbunov 9deac2a591 Rename withComponents to toComponents and add two overloads of them 2019-06-18 04:02:33 +03:00
Ilya Gorbunov 796ad29637 Add shortcuts to convert duration to milliseconds and nanoseconds 2019-06-18 04:02:32 +03:00
Ilya Gorbunov 8004c34e44 Reduce Duration API surface, add top-level docs
- toDuration(unit) extension instead of constructors
- toDouble/Long/Int(unit) function instead of inUnits()
- remove static factory functions
- remove MIN_VALUE/MAX_VALUE constants
2019-06-18 04:02:32 +03:00
Ilya Gorbunov 682430766b Add ClockMark and measureTime tests with test clock 2019-06-18 04:02:32 +03:00
Ilya Gorbunov b5d16f1a9b Simplify Clock/ClockMark design
- Do not require initialElapsed parameter
- Introduce instead ClockMark +- Duration operators
- Do not require ClockMark to expose its originating Clock back
- Turn elapsedFrom property into elapsed() function
- Rename abstract clock classes
- Fix unit of abstract clocks when constructing them

Add top-level docs for Clocks
2019-06-18 04:02:32 +03:00
Ilya Gorbunov ca29cfb88d Implement MonoClock in JS
It uses either process.hrtime() in node.js or performance.now() in browser,
falling back to Date.now() if the latter is not available
2019-06-18 04:02:31 +03:00
Ilya Gorbunov b816f50d4d Implement and test default string formatting in JVM and JS
Relax Duration.toString tests for JS and Native rounding specifics
2019-06-18 04:01:55 +03:00
Ilya Gorbunov 804d2b2d8c Helper utilities to execute test code on particular platforms 2019-06-18 03:59:52 +03:00
Ilya Gorbunov 95139252b7 Exclude kotlin.time.* from reduced js runtime 2019-06-18 03:59:52 +03:00
Ilya Gorbunov c1f7fd0281 Duration: test toString in particular units 2019-06-18 03:59:52 +03:00
Ilya Gorbunov b9c56af9ba Change Duration value storage unit to ns 2019-06-18 03:59:52 +03:00
Ilya Gorbunov 690049c082 Duration unit tests 2019-06-18 03:59:52 +03:00
Ilya Gorbunov 7977b6cdb8 Implement DurationUnit in JS, add doc summary and conversion test 2019-06-18 03:59:51 +03:00
Ilya Gorbunov 37c5f2c54f Initial prototype of Duration and Clocks API 2019-06-18 03:59:51 +03:00
Mikhail Zarechenskiy 7749afb13e [NI] Fix exception for type check callable reference against error type
#KT-32029 Fixed
 #EA-145311 Fixed
2019-06-17 19:18:04 +03:00
Mikhail Zarechenskiy 8fe632f52b [NI] Record DFI for callable reference arguments
#KT-31941 Fixed
2019-06-17 19:18:04 +03:00
Roman Artemev 1f70284b18 [JS IR BE] Fix charSequenceLength function for JS IR 2019-06-17 18:10:53 +03:00
Vyacheslav Gerasimov e69ae451cf Build: Fix performanceTestCompileOnly configuration 2019-06-17 17:49:12 +03:00
Sergey Igushkin 41d8c536c3 Update Gradle module metadata warnings: don't warn when it's enabled
Also add a suggestion to enable the module metadata publishing in
Gradle 5.3+ projects that consume Gradle module metadata by default but
don't produce it unless explicitly enabled.

Issue #KT-31023 Fixed
2019-06-17 17:29:41 +03:00
Mikhail Zarechenskiy 2964be8caa Remove "experimental" suffix from IDE settings for NI 2019-06-17 16:59:18 +03:00
Vyacheslav Gerasimov 54222bd429 Build: compiler tests-common test runtime 2019-06-17 16:30:14 +03:00
Vyacheslav Gerasimov 1da2bc5dab Build: Fix idea performance tests runtime 2019-06-17 15:52:18 +03:00
Ilya Kirillov d6dec2a066 New J2K: use PsiModifierListOwner instead of JvmAnnotatedElement for getting annotations from declaration while building AST as PsiLocalVariable is no longer a JvmAnnotatedElement in 192
#KT-31821 fixed
2019-06-17 12:18:05 +03:00
Andrey Uskov ae2ef0ac79 Fix MultiModuleHighlightingTest 2019-06-17 11:53:10 +03:00
Mikhail Glukhikh 5f896936ae Fix broken test (related to "Convert to lazy property") 2019-06-17 11:06:38 +03:00
Natalia Selezneva 20d19ee66f Temporary workaround for ProcessCanceledException that may happen during dependencies update
This happens during finding script definition (especially during virtual file to psi file search)
In this case dependencies may be already saved to cache, so makeRootChangeEvent should be generated, otherwise indexes aren't updated and highlighting in the script can be broken
2019-06-17 10:30:58 +03:00
Natalia Selezneva 233c37db57 Scripts: provide more concrete scope for files from script dependencies 2019-06-17 10:30:58 +03:00
Natalia Selezneva 213b0a37d1 Do not include jdks dependencies into run configuration of script
^KT-25187 Fixed
2019-06-17 10:30:57 +03:00
Natalia Selezneva 151c12dd85 Scripts: clear modification stamps cache when script dependencies cache is cleared
Otherwise it prevents script dependencies reloading
It may occur when script definitions are reloaded, cache is cleared, but dependencies aren't reloaded

^KT-31826 Fixed
2019-06-17 10:30:57 +03:00
Natalia Selezneva 2b748ccd9a Scripts: if sdk isn't use for some module in project, PsiElementFinder doesn't return jdk classes
For example in Android project all modules can have AndroidSDK, but JavaSDK can be set as ProjectSdk
In this case build.gradle.kts couldn't resolve jdk classes
2019-06-17 10:30:56 +03:00
Natalia Selezneva a69b5345d5 Fix RunConfigurationTest 2019-06-17 10:30:56 +03:00
Natalia Selezneva 39f6a6b249 Scripts: replace notification with traffic light icon
When script dependencies aren't loaded yet prevent editor to show green arrow in the top right corner.
Now pause is shown with the correct status
Remove tray notification as obsolete

^KT-31779 Fixed
2019-06-17 10:30:56 +03:00
Denis Zharkov fdebb38706 Disable slow assertions in type checker everywhere except for tests 2019-06-17 10:29:23 +03:00
Dmitry Gridin 46d8f45c11 Apply LiftReturnOrAssignmentInspection on idea 2019-06-17 11:24:28 +07:00
Toshiaki Kameyama 05a132357b Lift assignment: suggest for assignment of null
#KT-30191 Fixed
 #KT-28595 Fixed
2019-06-17 11:24:28 +07:00
Toshiaki Kameyama 4b4be07942 Add Inspection for lateinit var overrides another lateinit var
#KT-30775 Fixed
2019-06-17 01:28:55 +03:00
Toshiaki Kameyama fbd992f8c7 Add intentions to convert lazy <--> ordinary property
#KT-23501 Fixed
2019-06-17 01:10:19 +03:00
Toshiaki Kameyama a2205cfc98 Add "'equals()' between objects of inconvertible types" inspection
#KT-25006 Fixed
2019-06-17 01:09:54 +03:00
Ilya Gorbunov a1979677d0 Docs: mark all experimental annotations as MustBeDocumented
So that they are shown in the docs of annotated experimental API
2019-06-15 16:37:45 +03:00
Ilya Gorbunov a55563f5ec Docs: suppress docs for newly introduced hidden API 2019-06-15 16:37:44 +03:00
Kirill Shmakov ae45bbcead Explicit misconfiguration signalization 2019-06-15 12:47:56 +03:00