Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] [PROTOTYPE] Dokka K2 analysis #2995

Closed
wants to merge 4 commits into from
Closed

[WIP] [PROTOTYPE] Dokka K2 analysis #2995

wants to merge 4 commits into from

Conversation

vmishenev
Copy link
Member

@vmishenev vmishenev commented May 12, 2023

In K2 symbol's are used instead of descriptor's to analyse Kotlin.

Compilier: Kotlin 1.8.10

TODO:

  • Support KLIB, MPP https://youtrack.jetbrains.com/issue/KTIJ-24790
  • Updating to 1.8.20 (or later). It has information about type projections. Also, it can fix the annotation value (sometimes KtUnsupportedAnnotationValue is throwed).
  • resolveKDocLink from IDE does have an alternative for symbols.
  • Fix the corner cases in unit tests.
  • Support Java synthesized property and Java Field. Should the Documentable model be changed?!
  • Implement ExternalClasslikes and other services using descriptors for symbols.

…ult` and `Dispatchers.IO` (#3562)

* Handle `Dispatchers.IO.limitedParallelism(Int.MAX_VALUE)` case

`LimitedDispatcher.limitedParallelism` returns `this` if requested parallelism is greater or equal
to the own parallelism of the said `LimitedDispatcher`. `UnlimitedIoScheduler` has parallelism effectively set
to `Int.MAX_VALUE`, so `parallelism >= this.parallelism` check folds into `parallelism == Int.MAX_VALUE`.

Before the change `LimitedDispatcher(Int.MAX_VALUE)` was returned. While it does work as expected, any submitted task
goes through its queue and `Int.MAX_VALUE` number of workers. The change allows eliminating the `LimitedDispatcher`
instance and its queue in this extreme case.

* Handle `Dispatchers.Default.limitedParallelism` when requested parallelism >= core pool size (#3442)

`LimitedDispatcher.limitedParallelism` returns `this` if requested parallelism is greater or equal
to the own parallelism of the said `LimitedDispatcher`. `DefaultScheduler` has parallelism effectively set
to `CORE_POOL_SIZE`.

Before the change `LimitedDispatcher(parallelism)` was returned. While it does work as expected, any submitted task
goes through its queue and `parallelism` number of workers. The change allows eliminating the `LimitedDispatcher`
instance and its queue in case the requested parallelism is greater or equal to `CORE_POOL_SIZE`.

Fixes #3442
Added benchmarks on cacheable child serializers

Relates #1918
@vmishenev vmishenev linked an issue May 12, 2023 that may be closed by this pull request
4 tasks
@vmishenev vmishenev mentioned this pull request Jul 26, 2023
@vmishenev
Copy link
Member Author

It's obsolete after refactoring #3034. See #3094

@vmishenev vmishenev closed this Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate Dokka's analysis to the K2 compiler API
1 participant