Conversation
- `-feature` in all four repos, so a `-Werror` failure names the construct, the file and the line instead of "re-run with -feature" in a `ci` log nobody can re-run interactively. - One canonical scalac option order, stated in a comment so a new option has one obvious place to go. - Delete `ThisBuild / publishMavenStyle := true`: it is sbt's default and `lintUnused` reported it as unused on every build. `show publishMavenStyle` still answers true and the generated POM is byte-identical. - Delete the `scalaz-bintray` resolver: Bintray was sunset in 2021 and the host answers 404 for every path. No lib depends on scalaz and `sbt update` is green without it. - The groupId comment, byte-identical in all four, so the repos most likely to be edited by somebody who has not seen lib-util 0.0.34 are warned too.
mbryzek
marked this pull request as ready for review
August 19, 2026 07:02
Owner
Author
|
Autonomously merging. Details: https://admin.plybk.us/admin/autonomy/decisions/adc-2f4a64efba9547c4b01aefaf13e7bb9c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes ISS-3819.
The four
lib-*repos publish through fourbuild.sbtfiles that are the same file fourtimes. This aligns the shared part and removes two lines that are dead in all four. No
published artifact changes: the generated POM is byte-identical before and after, in every
repo (see Verification).
What changed
-featureis now in all four. It was in lib-util and lib-cipher only.-Werrorfailsthe build either way, so this is not a gate two repos lacked — it is what makes the failure
name the construct, the file and the line instead of
there was 1 feature warning; re-run with -feature. That lands where it is worth most: acirun whose log is the only artifactand which nobody can re-run interactively.
One canonical option order, in all four: the two general flags, then the
-Wsetalphabetically. The four lists held the same options in three different orders for no
reason. The convention is stated in a comment above the list so a new option has one
obvious place to go — an order nobody can state is one that drifts back.
ThisBuild / publishMavenStyle := truedeleted from all four. sbt'slintUnusedreported it on every single build of every repo (
there's a key that's not used by any other settings/tasks). It is also the default, so removing it changes nothing:show publishMavenStylestill answerstruein all four, and the POMs are unchanged.resolvers += "scalaz-bintray"deleted from all four. Bintray was sunset in 2021 andthe host now answers 404 for every path — measured, not assumed:
No lib depends on scalaz, and every dependency in all four resolves from Maven Central —
verified by a green
sbt updateafter the removal. This is one of the four lines ISS-3819enumerates as duplicated; it is dead in all four copies rather than merely repeated.
The groupId comment is now in all four, byte-identical. It records why
ThisBuild / organizationmust not be removed (lib-util 0.0.34 published under a defaultgroupId no consumer resolves). It was in lib-util and lib-cipher only — so the half of the
fleet most likely to be edited by somebody who has not seen that incident was the half not
warned about it.
lib-ai's
-Wconf:src=.*/generated/.*:snow says why it is there (only, in lib-ai). Itis justified divergence, and an unexplained divergence is indistinguishable from drift —
which is the whole subject of this issue.
After this, the POM/publish block is byte-identical across all four repos modulo the repo
name in three URLs.
Alternatives considered
ISS-3819 proposes three homes for the shared block and asks for the decision to be a
decision. I chose neither shared home, and the three cheap fixes above are the whole
change. Reasoning, with what it is measured on:
(1) A published sbt AutoPlugin (
sbt-bryzek-lib). Rejected. The issue's own costestimate — a new repo, a publish path, four version bumps, a bootstrapping order — is real,
and three things make it larger than it reads:
cross-published as
_2.12_1.0. That is a different artifact shape from these Scala 3libraries, and the fleet's release machinery models the lib shape specifically —
ocaml/test/test_maven_central.mlasserts artifact idslib-util_2.13/lib-util_3, andAgent::LibraryPin::LIBRARY_REPOis/\Alib-/, so a repo namedsbt-bryzek-libisinvisible to the mechanism that tracks library pins in consumers.
dev release libis interactive — it prompts and shells out to GPG, so no autonomoussession can run it. Every future change to publish metadata would become: a human GPG
session to publish the plugin, then four version bumps. Today it is four edits anyone can
make.
lib-query/project/plugins.sbtrecords a planned sbt 2 migration ("Staying on sbt 1 untilsbt-pgp / sbt-sonatype publish final sbt 2.x builds"). The plugin would need re-cross-building
for sbt 2 at exactly the moment the four
build.sbtfiles need one edit each anyway.And it does not deliver what it promises. A published plugin converts content drift into
version drift across four
addSbtPluginpins, and the plugin's ownbuild.sbtstillcarries the publish block it exports — so four copies become two, not one.
(2) A devops template plus a drift check. Rejected, and the precedent it cites argues
against it.
templates/ci/build.shis a copy-and-adapt reference, not a synced artifact:all four
lib-*/ci/build.shdiffer today, deliberately, each carrying its own reasoning aboutwhy it has no database block. So a block-comparing drift check over
build.sbtwould be anew mechanism rather than the existing one — and it would have to tolerate lib-ai's
-Wconf, itsTest / javaOptions += "-Xmx4g"and itsenablePlugins(PlayScala), which arelegitimate per-repo divergence. It buys detection at most of the cost of ownership.
(3) Deriving
homepage/licenses/scmInfofrom the repo name, so the block becomesliterally byte-identical. Rejected: it removes no lines, adds cleverness to a build file, and
the remaining variance is three URLs that cannot go wrong silently — a wrong repo name in
scmInfois visible in the published POM.What is actually at stake. The duplicated content is near-frozen config: publish metadata
changes when Sonatype changes, the
-Wset when Scala does, the ISS-356testOptionsblockonce. The drift measured over that period cost diagnostics, not correctness. The part that
would cost correctness if it drifted — the shared dependency pins — is already held together
by the nightly
dependency-upgrade-appruns (ISS-3469), which is why ISS-3819 records versionskew as absent. Paying for a fifth repo and a human-gated publish path to own 45 lines of
frozen config is a worse trade than four edits, and I would rather this be revisited when
something in the block actually changes than pre-empted now.
Verification
dev agent build -- sbt "show publishMavenStyle" "show scalacOptions" update Test/compile test makePom,run in each of the four repos. Real output is in the PR checks and was pasted into the issue.
The load-bearing check is that publishing is unaffected: the POM generated by
makePombefore the change was saved, and diffed against the POM generated after. Empty in all four —
which is the whole test of "these settings were dead or default".
Decisions & assumptions
publishMavenStylerather than adding it toGlobal / excludeLintKeys. The POMdiff is the evidence it is redundant; suppressing the warning for a setting that does
nothing keeps the line and loses the signal.
resolver is one of the duplicated lines the issue enumerates and it is dead in every copy.
It is verified by
sbt updaterather than assumed.one that stops drift recurring is the one written down.
-Wconf,Test / javaOptions += "-Xmx4g"andenablePlugins(PlayScala)—ISS-3819 names these as justified divergence and they are untouched.
One change across four repos, one behaviour, reviewed together:
lib-util#21, lib-query#23, lib-cipher#23, lib-ai#53.