Hey all, I am trying to use pants + kotlin in vsco...
# general
a
Hey all, I am trying to use pants + kotlin in vscode. I am having trouble getting VSCode to find my kotlin dependencies. Most of my code has red squiggles underneath it with errors looking something like this the attached screenshot. My pants.toml has this (among other things) in it:
Copy code
[kotlin]
version_for_resolve = "{'spes': '1.9.0', 'incremental': '1.9.0'}"

backend_packages = [
  "pants.backend.experimental.java",
  "pants.backend.experimental.kotlin",
  "pants.backend.experimental.terraform",
  # Activate the following backend if you want to use `ktlint` for code formatting and linting.
  "pants.backend.experimental.kotlin.lint.ktlint",
 ]
under
3rdparty/project_name
my BUILD file looks contains this:
Copy code
__defaults__({jvm_artifact: dict(resolve="incremental")})

jvm_artifact(
  name="org.jetbrains.kotlin_kotlin-script-runtime",
  group="org.jetbrains.kotlin",
  artifact="kotlin-script-runtime",
  version="1.9.0",
)

jvm_artifact(
  name="org.jetbrains.kotlin_kotlin-reflect",
  group="org.jetbrains.kotlin",
  artifact="kotlin-reflect",
  version="1.9.0",
)

jvm_artifact(
  name="org.jetbrains.kotlin_kotlin-stdlib",
  group="org.jetbrains.kotlin",
  artifact="kotlin-stdlib",
  version="1.9.0",
)
Any ideas?
b
Sorry for the trouble. I don't know anything about Kotlin (or pants' support for it), but I know one needs to use
pants export ...
when using Python dependencies to have good IDE support. Potentially there's something similar for Kotlin. https://www.pantsbuild.org/stable/docs/using-pants/setting-up-an-ide