Skip to content

Conversation

@ansh7432
Copy link

@ansh7432 ansh7432 commented Mar 3, 2025

Description
This PR adds the sbt-typelevel-mergify plugin to the build to assist with project maintenance. With this change, Mergify can automatically merge Scala Steward PRs once they are approved by a maintainer.

Changes Made
Added the correct version of sbt-typelevel-mergify to plugins.sbt.
Resolved dependency conflicts related to sbt-typelevel-mergify.
Successfully generated the .mergify.yml configuration file using mergifyGenerate.
Verified that the generated configuration aligns with project requirements.
Impact
Automates the merging process for Scala Steward PRs, reducing manual effort.
Ensures a smoother dependency update process by leveraging Mergify.
Improves project maintainability and efficiency.
Testing
Ran mergifyGenerate to verify that the .mergify.yml file was correctly generated.
Checked that all dependencies resolve correctly without build errors.
Ensured that Mergify rules align with the project's contribution workflow.
Additional Notes
This enhancement will streamline dependency management and improve the project's overall maintenance workflow. 🚀

@ansh7432 ansh7432 requested review from bpholt and milanvdm as code owners March 3, 2025 00:50
@ansh7432
Copy link
Author

ansh7432 commented Mar 3, 2025

Heyy @bpholt @milanvdm please review the PR for issue #522

@bpholt
Copy link
Member

bpholt commented Mar 3, 2025

It looks like the build config for this repo was far enough out of date that we need to upgrade some things before GHA will run our jobs. Sorry about that!

I merged an update to sbt-typelevel that I think will trigger Scala Steward to propose yet another update to sbt-typelevel that I think will get the build going again. (There may be some other changes needed to make the forthcoming PR mergable too, but I'll work through those.) Once that's merged, I'll let you know, and then you can do the needful to adapt this PR so it can be merged as well. I'll post here once that's merged so you don't have to keep checking back. 🙂

@bpholt
Copy link
Member

bpholt commented Mar 3, 2025

Ok, I think the build is working again. Can you please update this PR accordingly? Thanks!

@ansh7432
Copy link
Author

ansh7432 commented Mar 4, 2025

Yeah sure @bpholt will look into this

@ansh7432 ansh7432 force-pushed the add-mergify branch 2 times, most recently from 77e8dac to 1718d9c Compare March 4, 2025 15:23
@ansh7432
Copy link
Author

ansh7432 commented Mar 5, 2025

[error] sbt.librarymanagement.ResolveException: Error downloading org.typelevel:kind-projector_2.12.20:0.13.2 please review this getting this error help to resolve @bpholt

@bpholt
Copy link
Member

bpholt commented Mar 5, 2025

[error] sbt.librarymanagement.ResolveException: Error downloading org.typelevel:kind-projector_2.12.20:0.13.2

please review this getting this error help to resolve @bpholt

Using Coursier's complete-dep feature, we can figure out what versions of kind-projector are published for Scala 2.12.20:

$ cs complete-dep org.typelevel:kind-projector_2.12.20:
0.13.3

So org.typelevel:kind-projector_2.12.20 needs to be version 0.13.3. I think kind-projector is added to the build by one of the sbt-typelevel plugins, and when I'm on the main branch, I see that it's already versioned 0.13.3:

[info] libraryDependencies
[info] 	List(…, org.typelevel:kind-projector:0.13.3:plugin->default(compile), …)

Can you try rebasing your changes on top of the latest commits on main and try again? I'll point it out in the diff, but it currently looks like this PR would downgrade several dependencies.

addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0")
addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.7.7")
addSbtPlugin("com.github.sbt" % "sbt-ghpages" % "0.8.0")
addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.4.22")
Copy link
Member

Choose a reason for hiding this comment

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

We don't want to downgrade these dependencies. I think they were added as updates originally, but since I merged several PRs to fix the build, these versions are no longer up to date. You should probably be able to leave this file alone, except to add

addSbtPlugin("org.typelevel" % "sbt-typelevel-mergify" % "0.7.7")

@ansh7432 ansh7432 requested a review from bpholt March 5, 2025 19:34
@ansh7432
Copy link
Author

ansh7432 commented Mar 5, 2025

Hii @bpholt please review this again thanks for you guidance :)

@ansh7432
Copy link
Author

ansh7432 commented Mar 8, 2025

Hii @bpholt this is a gentle reminder to review 😊

@ansh7432
Copy link
Author

ansh7432 commented Mar 9, 2025

Hi @bpholt @milanvdm please review this if needs further changes..

Copy link
Member

Choose a reason for hiding this comment

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

It looks like this downgrades the sbt version; is that necessary?

addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.14.2")
addSbtPlugin("org.typelevel" % "sbt-typelevel-mergify" % "0.7.7")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.16")
Copy link
Member

Choose a reason for hiding this comment

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

I'm surprised to see sbt-scala-native added in this PR. Is it necessary?

addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.3.1")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.14.2")
addSbtPlugin("org.typelevel" % "sbt-typelevel-mergify" % "0.7.7")
Copy link
Member

Choose a reason for hiding this comment

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

This is a nitpick, but if you need to modify this file anyway to remove sbt-scala-native, could you please move this line up so it's immediately under the sbt-typelevel reference above? In other words, make this line the new line 3. That will keep the sbt-typelevel* dependencies together, which hopefully will be easier to read and help reduce future merge conflicts.

pull_request_rules:
- name: merge scala-steward's PRs
conditions:
- author=scala-steward
Copy link
Member

Choose a reason for hiding this comment

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

Oh, I forgot that we need some additional configuration to override this PR author setting. Could you please add these sbt settings to this project's build.sbt. Once this is done, you can confirm that the generated YAML config looks similar to this.

@bpholt bpholt closed this Oct 21, 2025
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