apple / pkl-intellij

JetBrains editor plugins providing Pkl language support
https://pkl-lang.org/intellij/current/index.html
Apache License 2.0
49 stars 10 forks source link

Project dependency aliases don't resolve in editor #19

Closed bvalyou closed 5 months ago

bvalyou commented 6 months ago

Trying to leverage Pkl projects with the IntelliJ Plugin. When using project dependencies, the plugin loses all context on the dependencies, even after running pkl project resolve.

Plugin Version 0.26.0

IntelliJ IDEA 2023.3.4 (Ultimate Edition) Build #IU-233.14475.28, built on February 13, 2024 Runtime version: 17.0.10+1-b1087.17 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 14.3.1

image

The red underline for ObjectMeta says "Unresolved reference: ObjectMeta"

If I replace @k8s with its url from PklProject, everything looks good.

image

Thanks for the great work on this to date!

bvalyou commented 5 months ago

I tried looking into this myself but not really sure where to start. It would be a big help if this could get some attention

bvalyou commented 5 months ago

@bioball @stackoverflow @holzensp Could one of you take a look please?

holzensp commented 5 months ago

Apologies; missed this. The plugin knows how to hold the CLI, so you should never have to pkl project resolve to inform the plugin. When you open the corresponding PklProject file, do you see a top-bar offering you to Sync Pkl project (as in attached screenshot)? If so, click that Sync and revisit your file.

Screenshot 2024-04-02 at 15 25 03
bvalyou commented 5 months ago

Doh! That was it! Thank you!