[read-only] Kotlin language specification coverage - #225
Draft
hikkidev wants to merge 167 commits into
Draft
Conversation
Contributor
Author
|
This PR is strictly read-only in nature and may be useful for LLMs when developing a roadmap for improving the project. It contains a set of Kotlin 2.4 language requirements formulated based on repositories that were cloned locally and analyzed. fyi @Hessesian @ulite-Amr |
Owner
|
That's a lot of changes, it'll take a while for me to get through this, so far it looks like plenty of valuable stuff like toml matrix, thaks for the effort ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Kotlin 2.4 language coverage baseline
Based on sources
Kotlin/kotlin-spec/1.9-rfc+0.1docs/src/md, 20 Kotlin/Core documentsJetBrains/kotlin/v2.4.10JetBrains/kotlin-web-siteLanguage guideTOC subtreeThe Kotlin 1.9 specification remains the normative source for the 2,105 Kotlin/Core requirements because no separate Kotlin 2.4 specification exists.
Those citations do not make Kotlin 1.9 a supported baseline. Forty additional KL requirements capture current behavior established by the pinned Kotlin 2.4.10 compiler sources and test data.
Result
Kotlin
2.4and compilerv2.4.10are the initial language boundary for the kmp-lsp coverage matrix. The matrix describes the current contract directly; it does not reconstruct the release-by-release migration from Kotlin 1.9.The baseline contains 2,145 requirements:
Status totals are 659 active, 442 ignored, and 1,044 excluded. The 442 ignored
requirements have 448 unique executable tests. The complete matrix has 1,109
unique primary test links.
Classification
exactmeans the test directly verifies the requirement within its stated LSP scope. It does not imply complete Kotlin compiler conformance beyond that scope.heuristicmeans the test verifies a useful observable approximation. Its unverified boundaries are recorded in heuristic_limitations.out-of-scopemeans the rule concerns behavior such as runtime execution, backend semantics, platform-specific behavior, or compiler semantics that kmp-lsp cannot expose reliably.Status
activemeans the primary test runs as part of the normal test suite and passes.ignoredmeans an executable test exists but is marked#[ignore]because it currently demonstrates unsupported behavior. It records ignore_reason, observed_failure, and expected_behavior.excludedmeans no executable test is expected. The requirement records an exclusion_kind and an individual exclusion_rationale.ignoreddoes not mean forgotten or removed from coverage. It represents a known, reproducible support gap. Likewise, excluded does not mean unsupported - it means the behavior is outside the observable responsibility of the language server.Reading KS and KL identifiers
Format:
KS-<SOURCE>-<ORDINAL>Example:
KS-DECLARATIONS-0207Format:
KL-<MAJOR>-<MINOR>-<ORDINAL>Example:
KL-2-4-0004KL requirements describe current language behavior that is not defined by the pinned Kotlin/Core specification. They are backed by pinned compiler sources, compiler test data, and - where applicable the current Language Guide.
Matrix layout
The tracked matrix uses 23 TOML files whose stems mirror the Rust fundamentals
test modules:
tests/kotlin_spec/coverage/mod.tomldefines the Kotlin 2.4 target, aggregatecounts, source identities, and the Language Guide topic list;
Rust test modules;
tests/kotlin_spec/coverage/coverage_matrix.tomlcontains only excluded KSrequirements without tests;
tests/kotlin_spec/coverage/language_features.tomlcontains all 40 currentKL requirements not defined by Kotlin/Core.
Known unsupported Kotlin 2.4 behavior
Ignored executable tests expose unsupported behavior rather than removing it
from the matrix:
@alluse-site target,multi-dollar interpolation, and
whenguards are not recognized by theproduction grammar;
companion-bearing, call-argument, or annotation-argument types;
bounded types, data-flow narrowing, shared triangle leaves, or inline-lambda
control-flow facts;
class literals, enum-entry callable references, deprecated enum-entry
diagnostics, invalid named lambda arguments, and expression-body return
restrictions;
unsupported.
Supported current behavior stays active, including local and inherited nested type aliases, explicit backing-field navigation, underscore local declarations, root-package import rules, package modifier rejection, and Kotlin 2.4 smart-casted
whensubject exhaustiveness.Verification
The self-contained matrix check is:
cargo test coverage_matrix_has_valid_traceability_entries --quietThe following ignored tests validate pinned revisions, source files, retained
anchors, and the Language Guide TOC when the read-only source checkouts are
present:
Repository verification also includes:
cargo fmt --check cargo test cargo clippy -- -D warnings cargo clippy --all-targets -- -D warnings git diff --check