smithy-intellij-plugin icon indicating copy to clipboard operation
smithy-intellij-plugin copied to clipboard

Smithy CLI Build System Support

Open iancaffey opened this issue 2 years ago • 5 comments

Background

Smithy CLI GA'd a few weeks ago.

Users who wish to migrate off the Smithy Gradle Plugin onto the CLI will run into dependency resolution issues in IntelliJ.

Deliverables

  • Parse Maven repositories and dependencies from smithy-build.json, register all Maven repositories, add all Maven dependencies to the current Module, and add the Smithy CLI as a Library
  • Tool Window which provides all Smithy build actions (similar to Gradle)
    • Detect the build system being used for Smithy (CLI, Gradle, or "Custom")
      • If using Gradle or some custom/unknown build system, no additional build system support will be provided outside of Maven dependency/repository resolution.
    • Discover the set of commands from Smithy CLI and present them in the UI with an ability to create Run Configurations which invoke the Smithy CLI
    • Process Smithy CLI build output and annotate Smithy files within the editor with the last build execution warnings/errors.

References

iancaffey avatar May 12 '23 16:05 iancaffey

Hi @iancaffey, my team would be able to implement the Maven dependency part of this. If you're not working on it, do you see any issue with us doing it? We'd likely use the LSP implementation as inspiration.

kubukoz avatar Nov 17 '23 00:11 kubukoz

Hey @kubukoz! No issue at all, implementing the Maven dependency support would be very much appreciated. :)

iancaffey avatar Nov 17 '23 02:11 iancaffey

Hi @iancaffey , I wanted to take a stab at the maven dependency support, but came up a bit short so it'd be nice if I could get some things clarified. At the moment smithy-intellij-plugin doesn't provide any dependency mechanism. To resolve any potential dependencies defined in smithy-build.json we would have to either:

  • Rely on an existing build system (i.e. if the project is set-up with either maven or gradle) and somehow extend it to be aware of the dependencies specified in the smithy build file.
  • Implement our own "build system" which would use the "native" MavenDependencyResolver.

Does that sound correct?

denisrosca avatar Jan 29 '24 08:01 denisrosca

Yep, External System Integration would likely be the best path forward.

Since this would be the way to add all of the build features (e.g. auto-import, running build commands, etc.).

iancaffey avatar Mar 03 '24 02:03 iancaffey