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

[Bug]: Kotlin gazelle plugin outputs unexpected parse errors #530

Open
reddaly opened this issue Oct 9, 2023 · 2 comments · May be fixed by #536
Open

[Bug]: Kotlin gazelle plugin outputs unexpected parse errors #530

reddaly opened this issue Oct 9, 2023 · 2 comments · May be fixed by #536
Assignees
Labels
bug Something isn't working

Comments

@reddaly
Copy link

reddaly commented Oct 9, 2023

What happened?

Gazelle outputs parse errors for Kotlin files that seem to compile without problems. Example:

                1: package gazelle.kotlin.tests.gcsutil
                    ^
                 49:     if (path.contains("//")) {
                                           ^
                 51:             "GCS URIs should not contain two adjacent slashes: ${quote(this)
                                                                                  ^
                 71:      * Returns a [CloudStoragePath] for this "gs://"-style URI.
                                                                     ^
                 73:     val path: CloudStoragePath
                                 ^
                 73:     val path: CloudStoragePath get() = CloudStorageFileSystemSet.DEFAULT.pathFromGsUri(this)
                                                        ^
                 79:     val pathStringWithBucketName: String get() = this.uri.toString().removePrefix("gs://")
                                                     ^
                 79:     val pathStringWithBucketName: String get() = this.uri.toString().removePrefix("gs://")
                                                                    ^
                 84:     val bucket: String get() = this.uri.authority
                                   ^
                 84:     val bucket: String get() = this.uri.authority
                                                  ^
                 90:     val bucketRelativePath: String get() = this.uri.path.removePrefix("/")
                                               ^
                 90:     val bucketRelativePath: String get() = this.uri.path.removePrefix("/")
                                                              ^
                 95:     override fun toString(): String = this.uri.toString()
                                      ^
                 103:     fun child(relativePath: String): CloudStorageUri =
                                                ^
                 103:     fun child(relativePath: String): CloudStorageUri =
                                                        ^
                 103:     fun child(relativePath: String): CloudStorageUri =
                                                                           ^
                 105: }
                      ^

Version

Development (host) and target OS/architectures:

Output of bazel --version:

$ bazel version
Build label: 6.3.2
Build target: bazel-out/k8-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Aug 8 15:48:33 2023 (1691509713)
Build timestamp: 1691509713
Build timestamp as int: 1691509713

Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file:

Language(s) and/or frameworks involved:
gazelle / Kotlin

How to reproduce

Reproduction: https://github.com/aspect-build/aspect-cli/pull/529

Any other information?

No response

@reddaly reddaly added the bug Something isn't working label Oct 9, 2023
@github-actions github-actions bot added the untriaged Requires traige label Oct 9, 2023
@reddaly reddaly changed the title [Bug]: [Bug]: Kotlin gazelle plugin outputs unexpected parse errors Oct 9, 2023
@reddaly
Copy link
Author

reddaly commented Oct 9, 2023

This specific parser error might be due to fwcd/tree-sitter-kotlin#102

gonzojive added a commit to gonzojive/aspect-cli that referenced this issue Oct 12, 2023
@gonzojive gonzojive linked a pull request Oct 12, 2023 that will close this issue
alexeagle pushed a commit to gonzojive/aspect-cli that referenced this issue Mar 7, 2024
@alexeagle alexeagle removed the untriaged Requires traige label Mar 27, 2024
@alexeagle
Copy link
Member

@jbedard I thought we had a fix for this one when we paired in Vancouver? Any idea where it went?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

3 participants