Skip to content

build: consume the Scala 3 cross-built lift-persistence (v1.0.6) - #100

Open
hongwei1 wants to merge 3 commits into
developfrom
build/scala-3-lift-persistence-compatibility
Open

build: consume the Scala 3 cross-built lift-persistence (v1.0.6)#100
hongwei1 wants to merge 3 commits into
developfrom
build/scala-3-lift-persistence-compatibility

Conversation

@hongwei1

@hongwei1 hongwei1 commented Sep 5, 2026

Copy link
Copy Markdown
Owner

What this is — and what it is not

This does not move OBP-API to Scala 3. <scala.version> stays 2.13 and
<scala.compiler> stays 2.13.18; not one source file changes.

What it does is verify the other half of the question: now that lift-persistence has
grown a Scala 3 cross-build, is its existing 2.13 consumer still intact?
OBP-API is
that consumer, and this branch is the experiment — build it, run the full suite, and
see whether anything moved.

Companion PR: hongwei1/lift-persistence#2.

The change

Three <groupId> entries plus <lift.version>:

before after
groupId net.liftweb com.github.hongwei1.lift-persistence
version 3.5.0-lift-persistence-dev-20260903 v1.0.6

The first commit on this branch had pointed these at net.liftweb:...:3.5.0-lift-persistence-dev-20260903.
That coordinate only ever existed in one developer's ~/.m2 — no declared repository
serves it, so the build was unresolvable on CI or on any other machine. The second
commit puts it back on the JitPack mechanism pom.xml already declares (the same one
com.github.OpenBankProject.lift-persistence:v1.0.5 used), pointed at the fork that
carries the Scala 3 cross-build.

Resolution verified against an empty local Maven repository, so this is not a
warm-cache illusion: _2.12, _2.13 and _3 all download from https://jitpack.io.
OBP-API consumes _2.13.

Reviewer note — the run-script environment variables

The first commit also adds OBP_* environment variables to run_tests_parallel.sh
and both flushall_*_build_and_run.sh scripts, with no explanation in its message.
They are not required by the dependency change and are best read as a separate
concern:

  • The 13 variables added to run_tests_parallel.sh are a one-to-one mirror of the
    props that CI's Setup props step appends to test.default.props
    (.github/workflows/build_pull_request.yml) — allow_sandbox_data_import,
    transactionRequests_enabled, allow_public_views, consents.allowed,
    berlin_group_v1_3_alias_path, allowed_internal_redirect_urls,
    ResetPasswordUrlEnabled and the six *_OTP_INSTRUCTION_TRANSPORT entries.
  • test.default.props is gitignored, so it does not exist in a fresh checkout or
    worktree. Without those variables the local parallel runner has no props at all.
  • run_tests_parallel.sh already documents this exact mechanism in its own header
    ("Setup props step writes test.default.props → missing critical props injected
    via OBP_* env vars"), so the commit extends a pre-existing design rather than
    inventing one.
  • The flushall_* additions are the same idea for the runtime server rather than the
    test suite (connector, hostname, starConnector_supported_types,
    OBP_API_INSTANCE_ID), covering the equally-gitignored default.props.

They are a real improvement to the local harness and they change no CI behaviour, but
they are orthogonal to the coordinate switch and would be clearer as their own commit,
e.g. test: let the local parallel runner supply CI props itself. Flagging rather
than rewriting history, since the first commit is already pushed.

One further unexplained edit in the same commit: the scala-compiler dependency block
in obp-api/pom.xml is moved from the end of the dependency list to just after
lift-persistence. It is a pure reorder with no version change, but dependency order is
classpath order, so it is worth a second pair of eyes.

Verification

  • mvn test-compile clean against v1.0.6.
  • Full local suite via run_tests_parallel.sh (complete suite list — a single suite on
    its own aborts).
  • lift-persistence's own sbt +test is green on all three Scala versions with identical
    counts (406 examples / 24 specifications / 0 failures on each), so the Scala 3 work
    did not disturb the 2.13 sources this module actually consumes.

The previous commit pointed the three lift-persistence coordinates at
net.liftweb:lift-persistence_2.13:3.5.0-lift-persistence-dev-20260903,
which only ever existed in a local ~/.m2 — no declared repository serves
it, so the build was unresolvable anywhere else.

Point them back at the JitPack mechanism already declared in pom.xml,
using the fork that carries the Scala 3 cross-build:
com.github.hongwei1.lift-persistence:lift-persistence_2.13:v1.0.6.

Verified against an empty local repository: all three published
artifacts (_2.12, _2.13, _3) resolve from https://jitpack.io.
v1.0.6's Scala 3 FieldFinder over-matched: it accepted any accessor
whose return type was a mapped field type, not only real object/val
fields, which corrupted field discovery for entities with a plain
forwarding accessor alongside the real field. v1.0.7 fixes this
(hongwei1/lift-persistence#2). scala.version is unchanged.
@sonarqubecloud

sonarqubecloud Bot commented Sep 5, 2026

Copy link
Copy Markdown

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.

1 participant