Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
d328513
feat: add `Tracking issue` template
owl-from-hogvarts Sep 14, 2024
8f37f67
feat: add notice, project status and scope
owl-from-hogvarts Sep 14, 2024
1363e93
refactor: convert todo to roadmap
owl-from-hogvarts Sep 14, 2024
87be4a9
feat: add contribution.md
owl-from-hogvarts Sep 14, 2024
18756b2
fix: broken link to CONTRIBUTION.md
owl-from-hogvarts Sep 14, 2024
aaa3e82
feat: manifest feature based workflow
owl-from-hogvarts Sep 14, 2024
f5acb03
Bump Kotlin to 2.0.0
AlexandrosAlexiou Jun 2, 2024
31a81ba
Fix compile warnings
AlexandrosAlexiou Jun 2, 2024
521032f
Use kotlin version variable in build.gradle
AlexandrosAlexiou Jun 8, 2024
99b4a96
Bump kotlin version to 2.0.10
AlexandrosAlexiou Aug 8, 2024
9a7d004
feat: add kotlin lang resources for newcomers
owl-from-hogvarts Sep 15, 2024
5fb2886
feat: describe how to configure custom language server
owl-from-hogvarts Sep 15, 2024
f863b04
feat: describe how to setup debug environment
owl-from-hogvarts Sep 18, 2024
e4c9bd1
chore: better structure contribution.md
owl-from-hogvarts Sep 18, 2024
39d908d
feat: add guide on custom vscode-kotlin download
owl-from-hogvarts Sep 19, 2024
d24e85e
refactor: drop idea of tracking issues
owl-from-hogvarts Sep 20, 2024
d0e3446
feat: remove roadmap
owl-from-hogvarts Sep 21, 2024
68ed02c
feat: clarify requirements and project guidelines
owl-from-hogvarts Sep 21, 2024
adb46dd
chore: bump Kotlin compiler to 2.0.20 (#8)
AlexandrosAlexiou Nov 5, 2024
a01682b
chore: update project status
owl-from-hogvarts Nov 5, 2024
14bc9cd
fix: internal errors propagating to stderr (#10)
AlexandrosAlexiou Nov 10, 2024
ccdc94a
chore: bump Kotlin compiler to 2.0.21
AlexandrosAlexiou Nov 7, 2024
b76c34f
feat: use newest catalog, and bump to kotlin 2.1.0
Decodetalkers Dec 24, 2024
a54963e
chore: add ci
Decodetalkers Jan 16, 2025
1a7d948
chore: adjust workflow
Decodetalkers Jan 16, 2025
07227d8
fix: ci problem
Decodetalkers Jan 16, 2025
daadd5f
Bump gradle/gradle-build-action from 2 to 3
dependabot[bot] Jan 16, 2025
1ac2603
Bump actions/setup-java from 3 to 4
dependabot[bot] Jan 16, 2025
78352c2
chore: ignore .kotlin
Decodetalkers Jan 16, 2025
147bd40
chore: ignore break unit test now
Decodetalkers Jan 17, 2025
aa95686
fix: failed unit test
Decodetalkers Jan 17, 2025
d667def
fix: Logger cannot redirect to multi outputs
Decodetalkers Jan 18, 2025
38dd968
chore: tidy up code
Decodetalkers Jan 18, 2025
00f3dc6
fix: rollback output
Decodetalkers Jan 18, 2025
405e543
feat: induced a tcpDebug param
Decodetalkers Jan 18, 2025
fcb7e4c
fix: unit test one
Decodetalkers Jan 18, 2025
9088f61
fix: some unit test
Decodetalkers Jan 18, 2025
6c1c758
fix: unit tests
Decodetalkers Jan 18, 2025
6ce2cdb
chore: tidy up
Decodetalkers Jan 18, 2025
b3eac47
chore: tidy up code
Decodetalkers Jan 18, 2025
6817550
fix: typos
Decodetalkers Jan 18, 2025
15c0074
chore: tidy up
Decodetalkers Jan 18, 2025
515c28c
chore: tidy up code
Decodetalkers Jan 18, 2025
68f119d
Revert "chore: tidy up code"
Decodetalkers Jan 18, 2025
be35c9a
chore: make tidy up
Decodetalkers Jan 18, 2025
5e826b0
chore: tidy up code
Decodetalkers Jan 18, 2025
f01c235
chore: code tidyup and fixci
Decodetalkers Jan 18, 2025
98aa527
fix: ci
Decodetalkers Jan 18, 2025
a6f04e2
chore: do fmt
Decodetalkers Jan 18, 2025
590bccb
chore: remove useless code
Decodetalkers Jan 18, 2025
6299389
feat: add fullLog param
Decodetalkers Jan 18, 2025
934243c
feat: enable this feature
Decodetalkers Jan 18, 2025
de016c7
fix: the classname is not true
Decodetalkers Jan 18, 2025
f203e1d
fix: ci
Decodetalkers Jan 18, 2025
5b85dba
chore: some tidy up
Decodetalkers Jan 18, 2025
a86e6a0
fix: the import cannot work well
Decodetalkers Jan 18, 2025
8046bfc
chore: bump epose
Decodetalkers Jan 18, 2025
b38df67
fix: ci
Decodetalkers Jan 18, 2025
357822b
chore: adjust for origin upstream
Decodetalkers Jan 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

# docs
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: "gradle"
directory: "/"
schedule:
interval: "weekly"
# We release on Tuesdays and open dependabot PRs will rebase after the
# version bump and thus consume unnecessary workers during release, thus
# let's open new ones on Wednesday
day: "wednesday"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-patch"]
groups:
# Only update polars as a whole as there are many subcrates that need to
# be updated at once. We explicitly depend on some of them, so batch their
# updates to not take up dependabot PR slots with dysfunctional PRs
polars:
patterns:
- "polars"
- "polars-*"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "wednesday"
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3
with:
cache-disabled: ${{ contains(matrix.os, 'windows') }}
- name: Build
run: ./gradlew :server:build :shared:build -PjavaVersion=${{ matrix.java }}
- name: Detekt
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/typos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
# yamllint disable rule:line-length
name: check_typos

on: # yamllint disable-line rule:truthy
push:
pull_request:
branches:
- '**'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: typos-action
uses: crate-ci/typos@v1.29.4
6 changes: 6 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[files]
extend-exclude = ["server/src/test/resources/completions/*.kt"]

[default.extend-words]
ba = "ba"
vertx = "vertx"
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ detekt {
// Registers a baseline for Detekt.
//
// The way it works is that you set create "baseline" for Detekt
// by running this task. It will then creatae a detekt-baseline.xml which
// by running this task. It will then create a detekt-baseline.xml which
// contains a list of current issues found within the project.
// Then every time you run the "detekt" task it will only report errors
// that are not in the baseline config.
Expand All @@ -33,6 +33,7 @@ detekt {
// fix detekt issues so that we can prevent regressions.
tasks.register<DetektCreateBaselineTask>("createDetektBaseline") {
description = "Overrides current baseline."
group = "verification"
buildUponDefaultConfig.set(true)
ignoreFailures.set(true)
parallel.set(true)
Expand Down
9 changes: 9 additions & 0 deletions detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ comments:

complexity:
excludes: *standardExcludes
CyclomaticComplexMethod:
threshold: 25
NestedBlockDepth:
threshold: 10

empty-blocks:
excludes: *standardExcludes
Expand All @@ -24,6 +28,8 @@ exceptions:
- NumberFormatException
- ParseException
- MissingPropertyException
TooGenericExceptionCaught:
active: false

naming:
excludes: *standardExcludes
Expand All @@ -38,6 +44,9 @@ style:
excludes: *standardExcludes
MaxLineLength:
active: false
ReturnCount:
active: true
max: 3 # Maximum allowed return statements in a function
WildcardImport:
excludeImports:
- java.util.*
Expand Down
4 changes: 2 additions & 2 deletions detekt_baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<SmellBaseline>
<ManuallySuppressedIssues></ManuallySuppressedIssues>
<CurrentIssues>
<ID>ComplexCondition:SemanticTokens.kt$element is KtVariableDeclaration &amp;&amp; (!element.isVar || element.hasModifier(KtTokens.CONST_KEYWORD)) || element is KtParameter</ID>
<ID>ComplexCondition:SemanticTokens.kt$element is KtVariableDeclaration &amp;&amp; (!element.isVar() || element.hasModifier(KtTokens.CONST_KEYWORD)) || element is KtParameter</ID>
<ID>CyclomaticComplexMethod:Completions.kt$private fun elementCompletions(file: CompiledFile, cursor: Int, surroundingElement: KtElement): Sequence&lt;DeclarationDescriptor&gt;</ID>
<ID>CyclomaticComplexMethod:Completions.kt$private fun indexCompletionItems(file: CompiledFile, cursor: Int, element: KtElement?, index: SymbolIndex, partial: String): Sequence&lt;CompletionItem&gt;</ID>
<ID>CyclomaticComplexMethod:GoToDefinition.kt$fun goToDefinition( file: CompiledFile, cursor: Int, classContentProvider: ClassContentProvider, tempDir: TemporaryDirectory, config: ExternalSourcesConfiguration, cp: CompilerClassPath ): Location?</ID>
Expand All @@ -26,7 +26,7 @@
<ID>EmptyClassBlock:samefile.kt$MyImplClass${}</ID>
<ID>EmptyClassBlock:samefile.kt$NullClass${}</ID>
<ID>EmptyClassBlock:samefile.kt$PrintableClass${}</ID>
<ID>EmptyClassBlock:standardlib.kt$MyComperable${}</ID>
<ID>EmptyClassBlock:standardlib.kt$MyComparable${}</ID>
<ID>EmptyClassBlock:standardlib.kt$MyList${}</ID>
<ID>EmptyClassBlock:standardlib.kt$MyThread${}</ID>
<ID>EmptyDefaultConstructor:BigFile.kt$BigFile.A$()</ID>
Expand Down
19 changes: 12 additions & 7 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[versions]
kotlinVersion = "2.1.0"
lsp4jVersion = "0.21.2"
exposedVersion = "0.37.3"
lsp4jVersion = "0.23.1"
exposedVersion = "0.58.0"
jmhVersion = "1.20"
guavaVersion = "33.3.0-jre"
slf4j = "2.0.16"
guavaVersion = "33.4.0-jre"

[libraries]
org-jetbrains-kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlinVersion" }
Expand Down Expand Up @@ -41,12 +42,16 @@ com-beust-jcommander = { module = "com.beust:jcommander", version = "1.78" }
org-openjdk-jmh-generator-annprocess = { module = "org.openjdk.jmh:jmh-generator-annprocess", version.ref = "jmhVersion" }
org-openjdk-jmh-core = { module = "org.openjdk.jmh:jmh-core", version.ref = "jmhVersion" }

org-xerial-sqlite-jdbc = { module = "org.xerial:sqlite-jdbc", version = "3.41.2.1" }
org-xerial-sqlite-jdbc = { module = "org.xerial:sqlite-jdbc", version = "3.48.0.0" }

# buildSrc
org-jetbrains-kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin",version.ref = "kotlinVersion" }
org-jetbrains-kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlinVersion" }

org-slf4j-api = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }
org-slf4j-simple = { module = "org.slf4j:slf4j-simple", version.ref = "slf4j" }


[plugins]
com-github-jk1-tcdeps = { id = "com.github.jk1.tcdeps", version = "1.2" }
com-jaredsburrows-license = { id = "com.jaredsburrows.license", version = "0.8.42" }
com-github-jk1-tcdeps = { id = "com.github.jk1.tcdeps", version = "1.6.2" }
com-jaredsburrows-license = { id = "com.jaredsburrows.license", version = "0.9.8" }
io-gitlab-arturbosch-detekt = { id = "io.gitlab.arturbosch.detekt", version = "1.22.0" }
32 changes: 28 additions & 4 deletions server/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ plugins {
id("kotlin-language-server.kotlin-conventions")
}

val serverDebugPort = 4000
val debugPort = 8000
val debugArgs = "-agentlib:jdwp=transport=dt_socket,server=y,address=8000,suspend=n,quiet=y"
val debugArgs = "-agentlib:jdwp=transport=dt_socket,server=y,address=$debugPort,suspend=n,quiet=y"

val serverMainClassName = "org.javacs.kt.MainKt"
val applicationName = "kotlin-language-server"
Expand All @@ -20,8 +21,21 @@ application {
description = "Code completions, diagnostics and more for Kotlin"
applicationDefaultJvmArgs = listOf("-DkotlinLanguageServer.version=$version")
applicationDistribution.into("bin") {
filePermissions { unix("755".toInt(radix = 8)) }
//fileMode = 755
filePermissions {
user {
read = true
execute = true
write = true
}
other {
read = true
write = false
execute = true
}
}
}

}

repositories {
Expand All @@ -43,6 +57,9 @@ dependencies {
implementation(libs.org.eclipse.lsp4j.lsp4j)
implementation(libs.org.eclipse.lsp4j.jsonrpc)

implementation(libs.org.slf4j.api)
implementation(libs.org.slf4j.simple)

implementation(kotlin("compiler"))
implementation(kotlin("scripting-compiler"))
implementation(kotlin("scripting-jvm-host-unshaded"))
Expand Down Expand Up @@ -74,8 +91,8 @@ configurations.forEach { config -> config.resolutionStrategy { preferProjectModu
tasks.startScripts { applicationName = "kotlin-language-server" }

tasks.register<Exec>("fixFilePermissions") {
// When running on macOS or Linux the start script
// needs executable permissions to run.
group = "Distribution"
description = "Fix file permissions for the start script on macOS or Linux."

onlyIf { !System.getProperty("os.name").lowercase().contains("windows") }
commandLine(
Expand All @@ -86,15 +103,20 @@ tasks.register<Exec>("fixFilePermissions") {
}

tasks.register<JavaExec>("debugRun") {
group = "Application"
description = "Run the application with debugging enabled."
mainClass.set(serverMainClassName)
classpath(sourceSets.main.get().runtimeClasspath)
standardInput = System.`in`

jvmArgs(debugArgs)
args(listOf("--tcpServerPort", serverDebugPort, "--tcpDebug", "--fullLog"))
doLast { println("Using debug port $debugPort") }
}

tasks.register<CreateStartScripts>("debugStartScripts") {
group = "Distribution"
description = "Create start scripts with debug options for the application."
applicationName = "kotlin-language-server"
mainClass.set(serverMainClassName)
outputDir = tasks.installDist.get().destinationDir.toPath().resolve("bin").toFile()
Expand All @@ -103,6 +125,8 @@ tasks.register<CreateStartScripts>("debugStartScripts") {
}

tasks.register<Sync>("installDebugDist") {
group = "Distribution"
description = "Install the debug distribution and create debug start scripts."
dependsOn("installDist")
finalizedBy("debugStartScripts")
}
Expand Down
Loading
Loading