-
Notifications
You must be signed in to change notification settings - Fork 218
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
Smithy models with subdirectories no-longer resolve correctly #1859
Comments
Actually after double checking the
|
Clarifying after looking closer, it's not the resolution that's failing as such. The OpenAPI plugin/projection works correctly, however the changes means not all the smithy files are copied into the JAR for the project, resulting in the validate JAR task failing. This also means the sources projection is incomplete. |
Edit: I didn't realize this was using latest changes in git, rather than 1.34.0 release, I am able to reproduce. |
Fixes smithy-lang#1859 Modifies the changes in smithy-lang#1851, specifically `SmithyBuild::addSources`, to not check subdirectories for Smithy files. The previous behavior was to just add whatever path was given to the method, *not* everything in subdirectories. However, the change didn't recursively search subdirectores, so you could get build errors due to missing shapes when running the sources plugin. This change reverts the behavior of `SmithyBuild::addSource` to only add whichever path it was given, but still checks to see if the path is a valid Smithy model.
@milesziemer Yes, I probably could have been clearer about this referring to unreleased changes. I see you've now been able to reproduce and PR a fix. For posterity I've still created a minimal repro here: https://github.com/Xtansia/smithy-1859-repro |
Fixes #1859 Modifies the changes in #1851, specifically `SmithyBuild::addSources`, to not check subdirectories for Smithy files. The previous behavior was to just add whatever path was given to the method, *not* everything in subdirectories. However, the change didn't recursively search subdirectores, so you could get build errors due to missing shapes when running the sources plugin. This change reverts the behavior of `SmithyBuild::addSource` to only add whichever path it was given, but still checks to see if the path is a valid Smithy model.
Fixes smithy-lang#1859 Modifies the changes in smithy-lang#1851, specifically `SmithyBuild::addSources`, to not check subdirectories for Smithy files. The previous behavior was to just add whatever path was given to the method, *not* everything in subdirectories. However, the change didn't recursively search subdirectores, so you could get build errors due to missing shapes when running the sources plugin. This change reverts the behavior of `SmithyBuild::addSource` to only add whichever path it was given, but still checks to see if the path is a valid Smithy model.
Fixes smithy-lang#1859 Modifies the changes in smithy-lang#1851, specifically `SmithyBuild::addSources`, to not check subdirectories for Smithy files. The previous behavior was to just add whatever path was given to the method, *not* everything in subdirectories. However, the change didn't recursively search subdirectores, so you could get build errors due to missing shapes when running the sources plugin. This change reverts the behavior of `SmithyBuild::addSource` to only add whichever path it was given, but still checks to see if the path is a valid Smithy model.
After the changes in 5e864a1, when using a directory as the source (ie. via the gradle plugin), any smithy files that were in subdirectories are no longer resolved.
Is this an intended removal of this behaviour, as I'm unsure if the recursive resolution was intended/documented originally?
We are relying on this behaviour for organisational purposes in our repo here for example: https://github.com/opensearch-project/opensearch-api-specification/tree/main/model
The text was updated successfully, but these errors were encountered: