Smithy CLI Build System Support
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.
- Detect the build system being used for Smithy (CLI, Gradle, or "Custom")
References
- ImportMavenRepositoriesTask for how IntelliJ supports this from Gradle build scripts.
- GradleDependencyModificator
- External Builder API
- External System Integration
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.
Hey @kubukoz! No issue at all, implementing the Maven dependency support would be very much appreciated. :)
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?
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.).