-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Omit unrecognized models from sources
Smithy-Build is often invoked from the Smithy CLI, and developers often provide directories that contain model files. If a directory contains files other than recognized Smithy models, those unknown files are treated as "sources" and ultimately wind up in the sources plugin manifest file. Files that are not Smithy model files should not show up in the manifest as this can cause invalid JARs to get created by tooling like the Smithy Gradle plugin. Sources are now eagerly filtered when they are added to SmithyBuild. If someone, somehow, manually configures the sources plugin to use unrecognized Smithy model files, the plugin will skip those files and log a warning rather than create an invalid manifest.
- Loading branch information
Showing
7 changed files
with
130 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...esources/software/amazon/smithy/build/plugins/sources-ignores-unrecognized-files/a.smithy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
$version: "2.0" | ||
|
||
namespace smithy.example | ||
|
||
string MyString |
4 changes: 4 additions & 0 deletions
4
.../software/amazon/smithy/build/plugins/sources-ignores-unrecognized-files/foo.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Ignore me! | ||
|
||
The sources plugin should ignore unsupported files so that they don't show up | ||
in places like JARs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters