kotlin-language-server
kotlin-language-server copied to clipboard
Too strict regular matching makes it fail to match kotlin stdlib in bazel
I am using [project root]/kls-classpath
to provider classpath from bazel to language server and the content of kls-classpath like this
# kls-classpath
# I have made a aspects to provide all header-jars which depend by the target
bazel build "//examples/android:app" --config=android_arm64 --aspects=@bis//:bisproject_aspect.bzl%bis_aspect --output_groups="bis all index dependents //examples/android:app_lib_kt,bis all index dependents @//examples/android:app_lib_kt,bis all index dependents @@//examples/android:app_lib_kt" 2> >(grep -o 'bazel-.*\.jar') | tr '\n' ':'
For kotlin stdlib the output path is bazel-out/<CONFIGURATION>/<PATH>/header_kotlin-stdlib-jdk8-1.8.20.jar
with header prefix. And the file path can not be matched with val parser = Regex("""(kotlin-stdlib(-[^-]+)?)(?:-(\d+)\.(\d+)\.(\d+))?\.jar""")
Can you make the regex a little broader here?
For example