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

Support validators from the classpath? #15

Open
kubukoz opened this issue Nov 5, 2024 · 1 comment
Open

Support validators from the classpath? #15

kubukoz opened this issue Nov 5, 2024 · 1 comment

Comments

@kubukoz
Copy link

kubukoz commented Nov 5, 2024

Hi!

We're trialing this plugin as a viable alternative to the LSP. It works fine with Gradle builds, but I don't see any errors that I'd expect to see from validators.

Is there a plan to support those? Does the plugin even assemble the model at any point?

@iancaffey
Copy link
Owner

iancaffey commented Nov 5, 2024

Hey @kubukoz!

The plugin does assemble the model (in a kind of deconstructed & indexed fashion geared towards how IntelliJ wants editor context stored, not using the actual smithy-build ModelAssembler) to support all of the shape resolution required for resolving references in the editor and showing you details about traits/documentation/etc. when you hover references and shape declarations.

But it doesn't perform a full build itself, so wouldn't run any validators.

The long-term goal is to delegate to whatever build system the module is using, parse any validation events emitted from the build, and then surface those as error/warning/note annotations within each file accordingly.

The main reason for not following how the LS approached it (where it ships with its own smithy-build and runs it standalone from your actual build process) was so that it didn't require wiring in any custom classpaths (largely to support all the various ant/gradle/sbt/etc. based build systems without additional setup) and avoids issues with using different versions of the smithy build tooling (since this would require updating during runtime or forcing plugin updates on users, both still having risks of not matching the actual version of the tooling you're using).

But for the time being, you'd have to solely rely on console output and manually navigating back and fixing any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants