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: treat warnings as errors #273

Merged
merged 5 commits into from
Dec 18, 2024
Merged

SBT: treat warnings as errors #273

merged 5 commits into from
Dec 18, 2024

Conversation

kitbellew
Copy link
Contributor

No description provided.

@kitbellew
Copy link
Contributor Author

@tgodzik two issues, any thoughts?

i haven't been able to figure out where this is coming from:

[warn] found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn] 	* org.scalameta:metaconfig-typesafe-config_3:0.0.0-1-7a7e9f9b-SNAPSHOT (early-semver) is selected over {0.13.0}
[warn] 	    +- org.scalameta:metaconfig-docs_3:0.0.0-1-7a7e9f9b-SNAPSHOT (depends on 0.0.0-1-7a7e9f9b-SNAPSHOT)
[warn] 	    +- org.scalameta:mdoc_3:2.6.1                         (depends on 0.13.0)
[warn] 	    +- org.scalameta:mdoc-cli_3:2.6.1                     (depends on 0.13.0)

and this comes from the pprint copy, looks like the previous case supersedes the match on TypeBounds:

[error] -- [E030] Match case Unreachable Error: /home/runner/work/metaconfig/metaconfig/metaconfig-pprint/shared/src/main/scala-3/metaconfig/pprint/TPrintImpl.scala:129:19 
[error] 129 |              case (name, TypeBounds(lo, hi)) => fansi.Str("type " + name) ++
[error]     |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
[error]     |                   Unreachable case
[error] -- [E030] Match case Unreachable Error: /home/runner/work/metaconfig/metaconfig/metaconfig-pprint/shared/src/main/scala-3/metaconfig/pprint/TPrintImpl.scala:129:19 
[error] 129 |              case (name, TypeBounds(lo, hi)) => fansi.Str("type " + name) ++
[error]     |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
[error]     |                   Unreachable case
[error] -- [E030] Match case Unreachable Error: /home/runner/work/metaconfig/metaconfig/metaconfig-pprint/shared/src/main/scala-3/metaconfig/pprint/TPrintImpl.scala:129:19 
[error] 129 |              case (name, TypeBounds(lo, hi)) => fansi.Str("type " + name) ++
[error]     |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
[error]     |                   Unreachable case

@tgodzik
Copy link
Contributor

tgodzik commented Dec 9, 2024

and this comes from the pprint copy, looks like the previous case supersedes the match on TypeBounds:

We could ignore those via Wconf like in metals:

....
    "-Wconf:src=*.MtagsIndexer.scala&msg=parameter owner in method visitOccurrence:silent",
    "-Wconf:src=*.ScaladocParser.scala&msg=parameter (pos|message) in method reportError:silent",

https://github.com/scalameta/metals/blob/main/build.sbt#L154

I am digging into the other issue.

@tgodzik
Copy link
Contributor

tgodzik commented Dec 9, 2024

Ach, wait, I thought it's scalameta/scalameta repo 😅

Looks like TypeRepr is a type alias for Type, which is why that is failing. We should switch the cases around

@tgodzik
Copy link
Contributor

tgodzik commented Dec 9, 2024

The other issue is that mdoc depends on metaconfig and metaconfig-docs depend on metaconfig also obviously. But that module is just for documentation, so we can safely turn of that warning via exclude or just ignoring it. Do you want me to finish this PR?

@kitbellew
Copy link
Contributor Author

Ach, wait, I thought it's scalameta/scalameta repo 😅

Looks like TypeRepr is a type alias for Type, which is why that is failing. We should switch the cases around

i thought so, too, but then it looked like you simply copied this code from somewhere... was it fixed there? maybe the fix is not to switch them around but to remove the second case?

@kitbellew
Copy link
Contributor Author

The other issue is that mdoc depends on metaconfig and metaconfig-docs depend on metaconfig also obviously. But that module is just for documentation, so we can safely turn of that warning via exclude or just ignoring it. Do you want me to finish this PR?

Yes, please!!!

Comment on lines 2 to 3
import metaconfig.Configured.NotOk
import metaconfig.Configured.Ok
Copy link
Contributor Author

Choose a reason for hiding this comment

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

minor, feel free to skip all of this comment:

  • i'd add a blank line after package
  • i'd import as a wildcard metaconfig.Configured._

or i'd simply use case Configured.Xxx(...) below, like they did before, without adding imports.

Copy link
Contributor

Choose a reason for hiding this comment

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

done

@tgodzik tgodzik merged commit 40bb629 into scalameta:main Dec 18, 2024
5 checks passed
@kitbellew kitbellew deleted the 273 branch December 18, 2024 13:16
@kitbellew
Copy link
Contributor Author

thank you for helping with this.

one practical question: how did you manage to push changes into my fork, to continue with this pr?

@tgodzik
Copy link
Contributor

tgodzik commented Dec 18, 2024

thank you for helping with this.

one practical question: how did you manage to push changes into my fork, to continue with this pr?

I think that' a default option to allow contributors to push to the specific branch.

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