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

Pull dependencies rather than scanning the build classpath #201

Merged

Conversation

daddykotex
Copy link
Contributor

TLDR:

  • make protocol a java lib (move test in another module)
  • depend on it and smithy in the model loader (avoid scanning the classpath)
  • minor comment fixes, etc.

If you have jars in your sbt classpath that contains smithy files, the content is taken into account and codegen will produce code accordingly.

In some context, users can be completely unaware that they're pulling such dependencies and may not understand why codegen has produced such code.

In other scenario, it straight up break the build because the generated code conflict with some stuff already on the classpath.

We avoid the issue here by using explicit dependency on : protocol (local project) and smithy-model.

We have to make sure that protocol is published locally for all jvm version before running the codegen scripted tests.

)
.settings(
libraryDependencies += Dependencies.Smithy.model,
javacOptions ++= Seq("--release", "8")
Copy link
Contributor

@Baccata Baccata Apr 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍, but we might want Xlint still

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at least, in the JVM 11, javac -Xlint did not seem to be a thing

Copy link
Contributor

@Baccata Baccata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work 👍

@Baccata Baccata merged commit cdbda85 into disneystreaming:main Apr 25, 2022
Baccata added a commit that referenced this pull request May 10, 2022
Pull dependencies rather than scanning the build classpath
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

Successfully merging this pull request may close these issues.

2 participants