Commit Graph

44 Commits

Author SHA1 Message Date
Ilya Chernikov fd1b677904 Switch reflect to compiled core classes 2017-09-19 23:58:32 +02:00
Ilya Chernikov d039d191f2 Fix tests in the new build infrastructure 2017-09-19 23:58:30 +02:00
Alexander Podkhalyuzin 3f8170d369 Clean idea files generated on the gradle import, add them to .gitignore 2017-09-19 23:58:27 +02:00
Ilya Chernikov 27968c8e13 Set proper jvmTarget for projects 2017-09-19 21:37:27 +02:00
Ilya Chernikov deda50dbbb Continue switching projects to improved dsl: sourceSets and test running 2017-09-19 21:37:26 +02:00
Ilya Chernikov aa4fdaa713 Implement publishing in the build 2017-09-19 21:37:13 +02:00
Ilya Chernikov 61dfb75e0e Implement Gradle Kotlin DSL build 2017-09-19 21:37:06 +02:00
Pavel V. Talanov c132f3b0d1 KT-19276: Drop exception logging on loading script definitions failure
See YT discussion
Have to come up with more meaningful diagnostics on definition loading

#KT-19276 Fixed
2017-08-18 19:11:35 +03:00
Mikhail Glukhikh c5a81691fb Partial code cleanup: can be private and some others applied 2017-08-01 17:08:56 +03:00
Pavel V. Talanov b0b2c046b2 script.runtime 1.1.4: IDE and compiler use 'kotlin.script.experimental' 2017-07-30 18:15:41 +03:00
Pavel V. Talanov f1811e7f0e Minor, more precise error message 2017-07-24 18:56:14 +03:00
Pavel V. Talanov 5faad493b4 Catch and report exceptions from DependenciesResolver 2017-07-19 12:29:25 +03:00
Pavel V. Talanov b1ac451959 Make sure template classpath is always among script dependencies 2017-07-19 12:29:15 +03:00
Pavel V. Talanov f84cc7fb5b Offload legacy dependency resolver work to a separate thread pool
This is mainly to improve experience for kdsl users before gradle migrates to new API
2017-07-19 12:29:12 +03:00
Pavel V. Talanov bc399444ab Fix creating DependenciesResolver with default arguments 2017-07-19 12:29:09 +03:00
Pavel V. Talanov c0e08c61ee Minor: extract ScriptContentLoader::getEnvironment 2017-07-19 12:29:04 +03:00
Pavel V. Talanov aacb9a437a Rename: dependenciesClasspath -> templateClasspath
Clearer distinction from additionalResolverClasspath
2017-07-19 12:28:54 +03:00
Pavel V. Talanov 96d8f685e9 Refactor KotlinScriptConfigurationManager: extract parts
Introduce ScriptDependenciesUpdater, DependenciesCache and ScriptContentLoader
2017-07-19 12:28:51 +03:00
Pavel V. Talanov 1b42095dc1 Support @AcceptedAnnotations for different kinds of resolvers 2017-07-19 12:28:49 +03:00
Pavel V. Talanov 1c412b4068 AsyncDependenciesResolver: provide implementation for sync resolve 2017-07-19 12:28:46 +03:00
Pavel V. Talanov ee70a64e1c Minor, template providers: don't create classloader for empty classpath 2017-07-19 12:28:41 +03:00
Pavel V. Talanov 5c18ab750b GradleScriptTemplateProvider: avoid duplicating template loading code 2017-07-19 12:28:36 +03:00
Pavel V. Talanov 6c3ce7adc1 ScriptTemplatesProvider: refactor dependency loading
Change dependenciesClasspath is of type List<File>
Add additionalResolverClasspath
2017-07-19 12:28:33 +03:00
Pavel V. Talanov a77cd0ab09 Catch errors when instantiating script templates
If we throw from this code IDE becomes unusable

 #KT-18945 Fixed
2017-07-19 12:28:31 +03:00
Pavel V. Talanov 75220e145b Minor: suppress deprecation warning 2017-07-19 12:28:26 +03:00
Pavel V. Talanov cf57e5a7a1 Script templates: search for parameterless constructor of resolver 2017-07-19 12:28:23 +03:00
Pavel V. Talanov 10e14103b6 Propagate reports from script dependency resolver
Compiler: show as compiler messages
IDE: annotate code in a separate highlighting pass
2017-07-19 12:28:20 +03:00
Pavel V. Talanov 96c2a589c0 Support legacy resolver interface 2017-07-19 12:28:18 +03:00
Pavel V. Talanov 65dba3615c Update project code to use new script.runtime APIs 2017-07-19 12:28:15 +03:00
Pavel V. Talanov 1012a24afc Refactor: move KotlinScriptExternalImportsProviderImpl to 'cli' module 2017-07-19 12:28:10 +03:00
Pavel V. Talanov b6a7d831bf Script IDE API: remove <TF: Any> 2017-07-19 12:28:08 +03:00
Pavel V. Talanov 788eaf8a18 Refactor getting dependencies for script files API
Deprecate KotlinScriptDefinition#getDependenciesFor
Expose dependencyResolver as a property
KotlinScriptExternalImportsProvider is the component clients should be asking for dependencies
2017-07-19 12:28:02 +03:00
Pavel V. Talanov a2aeda7b2c Support async script dependency updates for annotation based templates
Do not try to cache dependencies for every script on startup
Schedule cache updates upon request as opposed to updating them synchronously
2017-07-19 12:27:45 +03:00
Pavel V. Talanov b7fc909821 Split compiler and ide specific parts of script dependency caching
Move all caching logic to ide specific KotlinScriptConfigurationManager
Clean up apis
Remove logging when updating caches
2017-07-19 12:27:43 +03:00
Ilya Chernikov 2ec2a08753 Implement advanced gradle script template selection in the provider, improve diagnostics 2017-07-08 18:16:24 +02:00
Alexander Udalov 7febd846e8 Export 'intellij-core' in module 'frontend'
Remove intellij-core from dependencies of modules which already depend
on frontend or any module that exports frontend (such as frontend.java)
2017-06-06 14:29:26 +03:00
Alexander Udalov cbaa676c3d Move some declarations between 'descriptors' and 'deserialization'
- Move the following from 'deserialization' to 'descriptors':
  NotFoundClasses.kt
  AdditionalClassPartsProvider.kt
  ClassDescriptorFactory.kt
  PlatformDependentDeclarationFilter.kt
  findClassInModule.kt
- Move the following form 'descriptors' to 'deserialization':
  BuiltInSerializerProtocol.kt
  builtInsPackageFragmentProvider.kt
- Extract a marker interface from BuiltInsPackageFragment and move its
  implementation to 'deserialization'
- Change the type of parameters in PlatformDependentDeclarationFilter
  and AdditionalClassPartsProvider to ClassDescriptor

This will help in getting rid of the circular dependency of
'descriptors' <-> 'deserialization'
2017-06-06 14:29:18 +03:00
Ilya Chernikov ca331d2f55 Optimize scripting-related cache creation and update
reduce number of cases when changes are reported from script dependencies
  provider, that causing rootsChanged event, in particular empty dependencies
  are filtered out now

Should reduce IDEA startup delays.
2017-05-07 17:32:48 +02:00
Ilya Chernikov 07ad9aa08d Add logging with time measurement to script dependencies caching and caches updating 2017-05-07 17:32:47 +02:00
Ilya Chernikov cdb42c989e Relax error reporting on script dependencies resolving
to avoid exceptions reported on the gradle model problems, e.g. missing
dependencies
2017-04-19 08:14:30 +02:00
Ilya Chernikov 2a9de93a82 Attempt to eliminate crashes if script template is broken
Attempts to fix issues similar to EA-100334 completely
2017-04-18 14:57:31 +02:00
Ilya Chernikov 7754e90ad4 Restore another part of script template resolving for even older legacy code
complements d284979
Fixes EA-100334
2017-04-18 14:57:30 +02:00
Zalim Bashorov 9783a31779 Remove kotlin-reflect.jar dependency from util module and move reflectionUtil.kt closer to "clients"
Main goal is get rid of kotlin-reflect.jar from modules what required for minimal compiler.jar which can compile Kotlin only to JS to make it smaller.
2017-04-17 18:18:38 +03:00
Zalim Bashorov 51e84f7ce4 Move some script related part of frontend to separate module to avoid using kotlin-reflect.jar in frontend module
Main goal is get rid of kotlin-reflect.jar from modules what required for minimal compiler.jar which can compile Kotlin only to JS to make it smaller.
2017-04-17 18:18:35 +03:00