-
Notifications
You must be signed in to change notification settings - Fork 49
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
Improved prePR #729
base: main
Are you sure you want to change the base?
Improved prePR #729
Conversation
Happy to add documentation if it looks like this code change will get accepted. |
lazy val tlPrePRSteps = | ||
settingKey[List[String]]("Steps to be performed before a user submits a PR") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly curious, why did you introduce this setting in the kernel plugin? I think we could introduce and set the default in the CI plugin, without need a blank default.
Also the doc can be more specific that these are the steps run by the prePR
command alias.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added it to kernel because at my work we are using the Github plugin without using TypelevelCiPlugin
, so for our use it made more sense to push it into Kernel. Maybe there is an argument that we should be extending TypelevelCiPlugin
... Ill take a look next week, but now that I
ve looked closer at the CIPlugin it might make sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are only using the kernel plugin, then it's fairly straightforward to do whatever you want directly with tlCommandAliases
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While it is, and I did... I thought I would basically push back up the changes I was making for myself internally. My thought process was that as people add different 'linters' or other things that are expected to pass in CI, such as scalafix/fmt, mima, or sbt-explicit-dependency, or sbt-missinglink , I wanted an easy way to aggregate those into a check at the the same time (in the same auto-plugin) as i was adding the github workflow.
What ended up happening in my world is people started defining a command alias called 'build' in each project and just put in the various steps, but somehow it would always be out of sync with what we actually did in CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, so the reason I'd prefer to keep prePR in kernel is because we have our own custom ci steps and we'd like the easier to extend prePR.
@armanbilge Thoughts on getting this merged? |
I'm pondering whether this belongs in kernel. Historically the mandate of kernel has been to implement public features that ideally would be upstreamed to sbt itself and private utilities that can be shared across the other plugins. |
@armanbilge I can make a separate plugin in kernel project or a separate project? In my opinion it doesn't belong in core either (we don't use core, we just use kernel, github, versioning, mima and scalafix) |
I agree, I would say it belongs in the CI project—the notion of |
😅 Completely understand your reasoning, but I was intentionally trying to avoid putting it in the ci project because we don't want to depend on it... We don't want the |
@armanbilge We could also change it so instead of using |
These are all interesting and IMO "opinionated" which I think we should try to avoid for the kernel plugin. |
How about i make a new sbt project and move all the code in there? Something independent of |
That's exactly the purpose of I appreciate your effort to upstream but it sounds like you are looking for something custom and maybe sbt-typelevel is a bit too opinionated for you? Why can't you depend on the sbt-typelevel-ci plugin? |
Since our deployment pipeline is just too different from the sbt-typelevel-ci-plugin... If i included it i'd basically be overriding all the things it does anyways 😅. Well, we can probably just do our own thing internally, but I can move this into the CI plugin for other projects to use? I still see the value for the OSS community either way. |
I've found
prePR
to be a nice handy alias, but a little clumsy to extend. My team has been doing something similar for a while, but did a command alias in every project. I thought it would be nice if we had a handy easy way to extend the list of checks a developer should perform before submitting a pr so they have fewer painful moments realizing they forget a step and now their PR has failed.