Commit Graph

22 Commits

Author SHA1 Message Date
Nikolay Krasko
99a75021e1 Problem: manually shutdown AppScheduledExecutorService to allow compiler stop properly
Without such shutdown console program that gets PSI file will hang forever.

Introduced in 446b80077a

Stack example:

 java.lang.Thread.State: RUNNABLE
	  at com.intellij.util.concurrency.AppDelayQueue.<init>(AppDelayQueue.java:37)
	  at com.intellij.util.concurrency.AppScheduledExecutorService.<init>(AppScheduledExecutorService.java:50)
	  at com.intellij.util.concurrency.AppScheduledExecutorService$Holder.<clinit>(AppScheduledExecutorService.java:41)
	  at com.intellij.util.concurrency.AppScheduledExecutorService.getInstance(AppScheduledExecutorService.java:46)
	  at com.intellij.util.concurrency.AppExecutorUtil.getAppScheduledExecutorService(AppExecutorUtil.java:39)
	  at com.intellij.concurrency.JobScheduler.getScheduler(JobScheduler.java:43)
	  at com.intellij.psi.impl.source.AstPathPsiMap.<clinit>(AstPathPsiMap.java:45)
	  at com.intellij.psi.impl.source.PsiFileImpl.<init>(PsiFileImpl.java:76)
	  at com.intellij.extapi.psi.PsiFileBase.<init>(PsiFileBase.java:39)
	  at org.jetbrains.kotlin.psi.KtFile.<init>(KtFile.java:48)
	  at org.jetbrains.kotlin.parsing.KotlinParserDefinition.createFile(KotlinParserDefinition.kt:73)
	  at com.intellij.psi.SingleRootFileViewProvider.createFile(SingleRootFileViewProvider.java:407)
	  at com.intellij.psi.SingleRootFileViewProvider.createFile(SingleRootFileViewProvider.java:348)
	  at com.intellij.psi.SingleRootFileViewProvider.createFile(SingleRootFileViewProvider.java:326)
	  at com.intellij.psi.SingleRootFileViewProvider.getPsiInner(SingleRootFileViewProvider.java:171)
	  at com.intellij.psi.SingleRootFileViewProvider.getPsi(SingleRootFileViewProvider.java:155)
	  at com.intellij.psi.impl.PsiFileFactoryImpl.trySetupPsiForFile(PsiFileFactoryImpl.java:121)
	  at com.intellij.psi.impl.PsiFileFactoryImpl.createFileFromText(PsiFileFactoryImpl.java:100)
	  at com.intellij.psi.impl.PsiFileFactoryImpl.createFileFromText(PsiFileFactoryImpl.java:56)
	  at org.jetbrains.kotlin.psi.KtPsiFactory.doCreateFile(KtPsiFactory.kt:174)
	  at org.jetbrains.kotlin.psi.KtPsiFactory.createFile(KtPsiFactory.kt:178)
	  at org.jetbrains.kotlin.preprocessor.Preprocessor.processFileSingleEvaluator(Preprocessor.kt:82)
	  at org.jetbrains.kotlin.preprocessor.Preprocessor.processDirectorySingleEvaluator(Preprocessor.kt:105)
	  at org.jetbrains.kotlin.preprocessor.Preprocessor.processDirectorySingleEvaluator(Preprocessor.kt:135)
	  at org.jetbrains.kotlin.preprocessor.Preprocessor.processSources(Preprocessor.kt:74)
	  at org.jetbrains.kotlin.preprocessor.PreprocessorCLI.main(PreprocessorCLI.kt:35)
2016-09-20 15:25:37 +03:00
Mikhail Glukhikh
e31806e2b5 Code cleanup: redundant modality (minor) 2016-05-13 17:57:12 +03:00
Alexander Udalov
1a5a077bd6 Replace map + filterNotNull -> mapNotNull in project 2016-02-20 19:05:30 +03:00
Ilya Gorbunov
744a7a83f7 Cleanup RC deprecations in compiler and plugin. 2016-01-27 18:34:30 +03:00
Dmitry Jemerov
117a0d8b7b compiler: cleanup 'public', property access syntax 2016-01-07 17:57:38 +01:00
Ilya Gorbunov
80916d5ed7 Cleanup in compiler modules 2015-12-29 18:04:15 +03:00
Ilya Gorbunov
ea60ab74a7 Replace deprecated toMap usages with toMapBy 2015-12-01 01:18:44 +03:00
Yan Zhulanow
87799e9b6b Fix "operator modifier required" errors in project 2015-11-27 15:51:11 +03:00
Ilya Gorbunov
551e0181dc Require explicit type parameter specification for filterIsInstance. 2015-10-27 21:47:50 +03:00
Dmitry Jemerov
49033e0002 rename Jet* classes to Kt* 2015-10-19 21:35:30 +02:00
Mikhail Glukhikh
cae0388a57 Code cleanup: data deprecations and some effective visibility stuff 2015-10-19 15:24:22 +03:00
Yan Zhulanow
e14c9645dc Error on 'if' without an 'else' branch when used as an expression 2015-10-19 03:56:15 +03:00
Ilya Gorbunov
a58a7727d1 Preprocessor: cleanup unused code. 2015-10-11 16:14:38 +03:00
Ilya Gorbunov
423a146bce Preprocessor: do not use legacy package facade name in build.xml. 2015-10-11 16:14:24 +03:00
Ilya Gorbunov
12d218632c logging: debug enabled for CLI 2015-09-25 21:09:29 +03:00
Ilya Gorbunov
9970c34961 Preprocessor: improved logging. 2015-09-25 21:09:27 +03:00
Ilya Gorbunov
1df4ab847d Remove task for ant, include preprocessor into the compiler, call preprocessor in ant build. 2015-09-25 21:09:22 +03:00
Ilya Gorbunov
e8c93abdb5 Developing preprocessor task for ant 2015-09-25 21:09:20 +03:00
Ilya Gorbunov
7b206fdaf4 Refactor a bit 2015-09-25 21:09:18 +03:00
Ilya Gorbunov
d76e177834 Each platform is processed separately but in parallel. 2015-09-25 21:09:15 +03:00
Ilya Gorbunov
706771829e Processing sources for multiple platforms in one pass. 2015-09-25 21:09:13 +03:00
Ilya Gorbunov
de778d9865 Prototyping preprocessor: stripping declarations and replacing name. 2015-09-25 21:09:08 +03:00