Skip to content

Conversation

Decodetalkers
Copy link
Contributor

@Decodetalkers Decodetalkers commented Jan 19, 2025

this is a huge pr.. before I think this project won't maintain anymore so I work myself, and follow another fork.. but that one also inactive

I will pr for this

This pr induced typos ci, dependabot, bump a lot of dependencies, make format, remove deperate function and etc

I think the most important part of this pr is:

bump the version of exposed, which solved the problem of it will through error during save the dependencies, which made kls throw all dependencies, cause the editer been whole red.

Then it induced some other ci, like dependencies bot, and some style change, during the time that I am maintaining it.

Also induced some changes for the log which I think been good to my debugging. I love that change because I can see the logs when debugging it. it is quite difficult for me to get the lsplog in neovim, so I found a way to keep the log to stderr. And I made the log can do the things like tracing in rust

@Decodetalkers Decodetalkers marked this pull request as draft January 19, 2025 00:55
@github-actions github-actions bot added dependency resolution Related to the project dependency/standard library resolver code completion Auto completion gradle Related to the language server's support for Gradle projects editor support Support for any non-VSCode editors/language clients index Related to the symbol indexer formatting Related to source code formatting ci-cd CI/CD-related (GitHub Actions) code quality Refactoring, tests etc. build Related to the language server's own build (including Gradle updates etc.) semantic tokens Related to semantic tokens/highlighting labels Jan 19, 2025
@Decodetalkers Decodetalkers force-pushed the hugefix branch 8 times, most recently from f2fca1f to 644c09b Compare January 19, 2025 01:06
@Decodetalkers Decodetalkers marked this pull request as ready for review January 19, 2025 01:06
@Decodetalkers Decodetalkers force-pushed the hugefix branch 2 times, most recently from dd9bb6d to 3f58147 Compare January 19, 2025 01:10
@Decodetalkers
Copy link
Contributor Author

@fwcd Can you take a look? I think I have fixed many thing.. and also induced some features, when I am debugging... because this days I have maintain another fork.. for if this one won't active

} ?: Pair(System.`in`, System.out)

val server = KotlinLanguageServer()
if (args.fullLog) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will enable something like tracing, when I am debug, I think it is useful, so ..

@Parameter(names = ["--tcpClientHost", "-h"])
var tcpClientHost: String = "localhost"

@Parameter(names = ["--tcpDebug"])
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if open tcpDebug, the log will always on stderr, then it won't be redirected lsplog

sourceFile(uri).prepareCompiledFile()

// Compile changed files
private fun compileAndUpdate(changed: List<SourceFile>, kind: CompilationKind): BindingContext? {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is not good to put a function inside another function, so I split it

// Combine with past compilations
val same = sources - allChanged
val combined = listOf(buildScriptsContext, sourcesContext).filterNotNull() + same.map { it.compiledContext!! }
val same = sources - allChanged.toSet()
Copy link
Contributor Author

@Decodetalkers Decodetalkers Jan 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is changed under the help of idea.. yes , many changes are by idea

val superClassTypeArguments = getSuperClassTypeProjections(file, it)
classDescriptor.getMemberScope(superClassTypeArguments).getContributedDescriptors().filter { classMember ->
(classMember is FunctionDescriptor && classMember.modality == Modality.ABSTRACT && !overridesDeclaration(kotlinClass, classMember)) || (classMember is PropertyDescriptor && classMember.modality == Modality.ABSTRACT && !overridesDeclaration(kotlinClass, classMember))
(classMember is FunctionDescriptor && classMember.modality == Modality.ABSTRACT && !overridesDeclaration(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idea thought this will be better


private val GRADLE_DSL_DEPENDENCY_PATTERN = Regex("^gradle-(?:kotlin-dsl|core).*\\.jar$")

private val ResolveImportList = listOf(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too long, so I split it

configuration = KotlinCompilerConfiguration().apply {
val langFeatures = mutableMapOf<LanguageFeature, LanguageFeature.State>()
for (langFeature in LanguageFeature.values()) {
for (langFeature in LanguageFeature.entries) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the lint by idea

@Decodetalkers
Copy link
Contributor Author

Please split this up into smaller PRs, each addressing a single concern. A huge kitchen-sink PR that includes a bunch of minor style changes is something I'll be unlikely to merge

done, it seems been many commit here..

@Decodetalkers Decodetalkers force-pushed the hugefix branch 3 times, most recently from 096ff06 to 7ee67ac Compare January 19, 2025 01:43
@Decodetalkers Decodetalkers requested a review from fwcd January 19, 2025 01:49
@fwcd
Copy link
Owner

fwcd commented Jan 19, 2025

Small commits are good, but please also group them into separate PRs. What I had in mind was a bunch of small PRs along the lines of:

  • "Update Detekt configuration and baseline" -> only updates the Detekt XMLs
  • "Bump dependencies" -> only updates libs.versions.toml and perhaps a few build scripts
  • "Add --tcpDebug option" -> only adds the new flag etc.
  • ... etc ...

@Decodetalkers
Copy link
Contributor Author

Decodetalkers commented Jan 19, 2025

Small commits are good, but please also group them into separate PRs. What I had in mind was a bunch of small PRs along the lines of:

* "Update Detekt configuration and baseline" -> only updates the Detekt XMLs

* "Bump dependencies" -> only updates `libs.versions.toml` and perhaps a few build scripts

* "Add `--tcpDebug` option" -> only adds the new flag etc.

* ... etc ...

I have committed a lot during this time,.. and update deps also will change some code.. now they all mixing up. I feel it will be difficult to split them.. The big problem is that I induced the typos ci and made a huge change there

Detekt configure and baseline is mixed together with typos... and after I do some format detekt find more problem so then I edit the detekt... seems they are hard to split.. but may you please let me just split the cli feature one? I can make that in another pr..

@Decodetalkers
Copy link
Contributor Author

Decodetalkers commented Jan 19, 2025

Small commits are good, but please also group them into separate PRs. What I had in mind was a bunch of small PRs along the lines of:

* "Update Detekt configuration and baseline" -> only updates the Detekt XMLs

* "Bump dependencies" -> only updates `libs.versions.toml` and perhaps a few build scripts

* "Add `--tcpDebug` option" -> only adds the new flag etc.

* ... etc ...

I have committed a lot during this time,.. and update deps also will change some code.. now they all mixing up. I feel it will be difficult to split them.. The big problem is that I induced the typos ci and made a huge change there

Detekt configure and baseline is mixed together with typos... and after I do some format detekt find more problem so then I edit the detekt... seems they are hard to split.. but may you please let me just split the cli feature one? I can make that in another pr..

Then this pr just for bump the version of exposed, but also some changes in ci.. I will split the cli part, can this be accept?

@Decodetalkers Decodetalkers force-pushed the hugefix branch 2 times, most recently from a2a48f6 to 357822b Compare January 19, 2025 02:37
@Decodetalkers
Copy link
Contributor Author

ok.. I will put this pr here and open other pr instead, this will just be used as reference

@Decodetalkers Decodetalkers marked this pull request as draft January 19, 2025 03:03
@Decodetalkers
Copy link
Contributor Author

@fwcd I have already split them into other prs, can you please take a look? after those been merged, I will continue to tidy up the code, and remove the deprecated part of hte use of exposed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Related to the language server's own build (including Gradle updates etc.) ci-cd CI/CD-related (GitHub Actions) code completion Auto completion code quality Refactoring, tests etc. dependency resolution Related to the project dependency/standard library resolver editor support Support for any non-VSCode editors/language clients formatting Related to source code formatting gradle Related to the language server's support for Gradle projects index Related to the symbol indexer semantic tokens Related to semantic tokens/highlighting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants