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

Unable to build a Smithy sample from following README #446

Closed
kggilmer opened this issue May 26, 2020 · 4 comments
Closed

Unable to build a Smithy sample from following README #446

kggilmer opened this issue May 26, 2020 · 4 comments

Comments

@kggilmer
Copy link
Contributor

I have read the readme, the quick start guide, and the smithy-build documentation. I wanted to try it out, starting with something simple. I noticed the "Building Smithy models" section in the readme, so I created an empty Java/Gradle project in Intellij. I created the smithy-build.json file as specified and added the Smithy plugin to my gradle file. When I build I get the following error:

Execution failed for task ':smithyBuildJar'.
> Smithy projection `source` not found. Is this projection defined in your smithy-build.json file?

It's not clear to me how to overcome this. I tried coping some more comprehensive smithy-build.json files but was unable to overcome this error.

Ideally, as a newcomer to this project, I could quickly get to some "hello world" level of functionality and have branching off points to expand my knowledge and understanding of how this tool works. As is, I have a sense how how the modeling language works and that there is a gradle plugin but lack the sufficient details to have a cohesive understanding or how to learn more.

@mtdowling
Copy link
Member

I think what happened here is that you created a project with no models in it (or your models couldn't be found), and this trips up the Gradle plugin. I created a fix here that's in code review: smithy-lang/smithy-gradle-plugin#24.

I agree that projects should have a good getting started experience. This is a failure case we didn't think of but should have! By the way, you can also check out the examples of using the Gradle plugin in the plugin's repo: https://github.com/awslabs/smithy-gradle-plugin/tree/master/examples

@kggilmer
Copy link
Contributor Author

Thanks @mtdowling , that makes sense. I was able to build successfully after copying one of the examples into /model/main.smithy with gradle plugin version 0.5.0.

What would be reasonable for a "quick start" section on the README...to just successfully build the models, or perhaps to produce something like documentation or a client? The former seems too abstract to a newcomer like myself to really showcase any value of the tool, but perhaps the latter is too big in scope to be sufficiently concise for the README?

@mtdowling
Copy link
Member

Yeah, I agree. We should update the quick start guide to show how to build the example model using the Gradle plugin and produce artifacts. It would be even better if there was a link to a repo that has the code for the example. We're still working on publishing client generators that can be used outside of AWS SDKs, so not much we can do there yet.

@JordonPhillips
Copy link
Contributor

Between the plugin bug fix and #449 this should be fixed. Feel free to open up another issue if things are still unclear.

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

3 participants