-
Notifications
You must be signed in to change notification settings - Fork 247
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
Unused imports included in headers break build #268
Comments
Hi @chrisbenincasa , thanks for the issue. Do you want to do some investigation on this issue to find a solution? Get more service ad-hoc generated code instead maybe. Patches are more than welcome! |
@yufangong sorry for the delayed reply! I can take a look at what it would take to fix this up. |
@chrisbenincasa sounds great! Thank you! |
+1 |
For others, a way to get around this problem is to add Compile / scalacOptions += "-Wconf:cat=unused&src=src_managed/.*:s",
Compile / scalacOptions +="-Wconf:cat=deprecation&src=src_managed/.*:s" to your build.sbt |
Unused imports are included in the headers of generated files causing 2.12 builds with the default -Yfatal-warnings` setting to fail (unless the correct linting options are unset)
Expected behavior
Scrooge generates files with headers including only the imports the current file needs.
Actual behavior
Scrooge generates import statements for classes that are never used.
Steps to reproduce the behavior
Generate a simple class with the following Thrift
Compiling with 2.12, with
-Xfatal-warnings
and-Xlint
set, the build will fail.The text was updated successfully, but these errors were encountered: