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

SBT: fail build on warnings, treat some as info #3561

Merged
merged 1 commit into from Feb 15, 2024

Conversation

kitbellew
Copy link
Contributor

@kitbellew kitbellew commented Feb 14, 2024

Now that most warnings have been fixed, let's make the build stricter.

Limit these extra checks to scala-2.13 only, as that's sufficient to ensure clean code and avoids running into tooling differences between versions.

build.sbt Outdated
if (isScala213.value)
List(
"-Xfatal-warnings",
"-Wconf:cat=deprecation:is,cat=other-match-analysis:i"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tgodzik @bjaglin perhaps you have some ideas; the match-analysis entry is only for "unreachable code" warnings coming from something in https://github.com/scalameta/scalameta/blob/main/scalameta/common/shared/src/main/scala/scala/meta/internal/transversers/transverser.scala (or the two adjacent implementations, but since both of them show that message, i assumed it was the parent).

since this is a macro, the message doesn't really help in figuring out which actual line of code leads to this. if you have some idea on how to find it, we could fix the problem -- and remove this extra warning exclusion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i figured it out: #3562.

Now that most warnings have been fixed, let's make the build stricter.

Limit these extra checks to scala-2.13 only, as that's sufficient to
ensure clean code and avoids running into tooling differences between
versions.
@kitbellew
Copy link
Contributor Author

now it's all clean, no warnings other than deprecations. ptal.

Copy link
Collaborator

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for adding those

@kitbellew kitbellew merged commit 6699cde into scalameta:main Feb 15, 2024
24 checks passed
@kitbellew kitbellew deleted the 3561 branch February 15, 2024 10:12
@bjaglin
Copy link
Member

bjaglin commented Feb 15, 2024

Thanks @kitbellew !

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.

None yet

3 participants