Closed rtyley closed 8 months ago
@rtyley has published a preview version of this PR with release workflow run #7, based on commit dc2a96be1a41e6dcd73ced8e0c0d360b936e351c:
5.0.0-PREVIEW.prevent-runtime-incompatibility-with-early-semver-content-api-scala-client.2024-01-25T1557.dc2a96be
@rtyley has published a preview version of this PR with release workflow run #8, based on commit fd2cdc6acd9ba8ab322a4e8b7825a4894cee854a:
5.0.0-PREVIEW.prevent-runtime-incompatibility-with-early-semver-content-api-scala-client.2024-01-25T1802.fd2cdc6a
This was taken care of in https://github.com/guardian/facia-scala-client/pull/306, so we can close this PR!
closed, as already taken care of in https://github.com/guardian/facia-scala-client/pull/306 !
Now that both
content-api-models
andcontent-api-scala-client
are both using 'early-semver' and adhering to it (thanks togha-scala-library-release-workflow
andsbt-version-policy
) this should mean that it is no longer possible for a single project that depends oncontent-api-scala-client
,content-api-models
andfacia-scala-client
to have incompatible versions of those artifacts.This should prevent horrible runtime compatibility errors like https://github.com/guardian/facia-scala-client/issues/301, which occurred with the rollout of the innocent-looking changes in
facia-scala-client
v4.0.6.sbt
messaging when incompatibility is introducedAs ana example, this is the "suspected to be binary incompatible" compile time error you'll get in
facia-tool
if you try to upgrade the FAPI client library to 5.0.0, without also upgrading the version of the CAPI client to match:Just upgrading the CAPI client version to the ultimately-selected version (
20.0.2
) will fix the problem here.In general, you want to upgrade any related library to be compiled against the selected library version - so in the example above, any library we're using in
facia-tool
that depends on the CAPI client, needs to have been compiled against CAPI client version20.0.x
(thex
there is because we can tolerate PATCH level version differences).