-
Notifications
You must be signed in to change notification settings - Fork 8
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
Migrate to sbt-typelevel and self-host #120
Conversation
List("doc"), | ||
name = Some("Build docs"), | ||
cond = Some("matrix.ci == '' || matrix.ci == 'ciJVM'")), |
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.
So, this cond
here is a bit annoying.
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.
I don't quite understand it.
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.
I'm trying to account for CI matrices with a JVM/JS axis here. There might be a better way to do this.
We only want to run doc
once per platform, but we don't know if there are platforms and if so how they are setup. E.g. we might want to do project rootJVM; doc
and project rootJS; doc
in their appropriate jobs. But that seems hard, since not all project have rootJVM
and rootJS
.
So, what I did was try to run doc
conditionally:
matrix.ci == 'ciJVM'
we are running in a JVM job in a crossed matrix, so we should rundoc
matrix.ci == ''
Theci
key is not defined, so the matrix is not crossed, and we should rundoc
Of course, we could run this step on all the jobs, but it would be redundant and time-consuming.
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.
Fixing typelevel/sbt-typelevel#61 would fix this insanity.
githubWorkflowBuildMatrixFailFast := Some(false), | ||
githubWorkflowArtifactUpload := false, |
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.
Any reason we don't like this?
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.
I remember it being an irritant, but don't remember why. I'm happy to try without it.
List("unusedCompileDependenciesTest"), | ||
name = Some("Check unused compile dependencies")), |
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.
This is something not currently covered in sbt-typelevel. I'm a bit confused, are projects actually using this? If so I should add it back.
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.
http4s should be. I think it's good POM hygiene, but it's one of my less popular opinions.
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.
I've never used it but seems like a good idea. I don't see it in the http4s CI rn:
https://github.com/http4s/http4s/blob/0671d49d246639e3edad89d7f8e1ba979d9a7658/.github/workflows/ci.yml#L100-L125
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.
We had the explicit dependencies check in addition to the unused dependencies check. The former was very controversial, but I'd like to reinstate the latter.
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.
Maybe it's good to have a common org shim as we think about the Great Schism, but this plugin has shrunk to the point that I question whether it's still useful... which is a good thing.
.github/workflows/ci.yml
Outdated
|
||
- name: Run tests | ||
run: sbt ++${{ matrix.scala }} test | ||
- run: sbt ++${{ matrix.scala }} 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.
Now that I see it from a workflow perspective, I'm not sure I consider this progress. It is now harder to see on what step a build fails.
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.
Opened typelevel/sbt-typelevel#60 to think about this one.
List("unusedCompileDependenciesTest"), | ||
name = Some("Check unused compile dependencies")), |
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.
http4s should be. I think it's good POM hygiene, but it's one of my less popular opinions.
List("doc"), | ||
name = Some("Build docs"), | ||
cond = Some("matrix.ci == '' || matrix.ci == 'ciJVM'")), |
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.
I don't quite understand it.
We should possibly upstream more stuff from http4s proper to here, for example the laika config. I've currently duplicated it in the http4s-dom build to keep the theme consistent. |
Yeah, site configs are one of the last remaining big chunks in the modern g8 templates. I'd love to see an easy way to start a Laika site, and encourage that in new project templates. |
I think I heard of this happening to someone once, and it's baffling. Edit: here maybe: http4s/http4s#5313 (comment).
|
Oh, I know what's going on: non-determinism in the order settings are enabled actually. Seems to be causing the headers and formatting checks to swap around? |
I wonder if it's related to the version of sbt installed on the system (not defined in the The GH runner ships with sbt 1.5.7 (according to this) and my other local where I fixed the workflow has sbt 1.5.0 installed. My dev machine has 1.6.1 on it. Edit: nope, not this. |
WTF. Is that not an ordered collection in the GitHub plugin? |
It is, but it's updated |
Oh, yikes. I don't know how to linearize that without one plugin knowing about the other. Those plugins don't really do much. I wouldn't mind if these were baked into the opinionated Typelevel plugin, and anybody who doesn't want them can filter the steps, override the tasks, or just use the lower level plugin. |
Yep, I got a bit too ambitious there with all the separate plugins. Too much pain for little gain. It's already plenty flexible. |
I think this is ready. |
Some comments below.