Skip to content

chore(build): remove the dead -Xelide-below scalac option - #7709

Open
aglinxinyuan wants to merge 2 commits into
apache:mainfrom
aglinxinyuan:chore/remove-xelide-below
Open

chore(build): remove the dead -Xelide-below scalac option#7709
aglinxinyuan wants to merge 2 commits into
apache:mainfrom
aglinxinyuan:chore/remove-xelide-below

Conversation

@aglinxinyuan

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Removes -Xelide-below WARNING from the sixteen build.sbt files that set it, along with the comments that exist only to explain it. Build-config only, 16 files, −20 lines, no behaviour change.

⚠️ Stacked on #7451. The first commit here is #7451's deletion of ElidableStatement; it drops out of this diff once #7451 merges. The order is required — see Why the order matters below. Review the second commit, chore(build): remove the dead -Xelide-below scalac option.

Why the flag is dead

-Xelide-below <level> makes scalac replace a call to an @elidable(n) method with () when n < level. The only @elidable-annotated code in this repo was ElidableStatement:

Wrapper Level vs. WARNING (900)
finest FINEST 300 compiled out
finer FINER 400 compiled out
fine FINE 500 compiled out
info INFO 800 compiled out

It had no callers, so nothing was actually being elided, and #7451 deletes it. After that git grep -in elidable is empty and the flag switches nothing.

Why this is a no-op, not a silent re-enable

The obvious worry is assert. It is @elidable(ASSERTION) = 2000, above WARNING, so assertions are compiled in today — and scalac's default with -Xelide-below absent elides nothing, so they are compiled in after this too. Same for assume. Nothing that was elided starts running, and nothing that was running stops.

Why the order matters

Dropping the flag while ElidableStatement still exists would break ElidableStatementSpec, which asserts counter == 0 after ElidableStatement.info { counter += 1 } — true only under elision. Hence the stack rather than a standalone PR.

What was removed

Thirteen modules share one line; three differ:

File Removed
amber/build.sbt the whole scalacOptions ++= Seq(...) line + the // to turn on, use: INFO / // to turn off, use: WARNING pair above it
common/workflow-compiler/build.sbt two Seq entries (flag and value on separate lines)
computing-unit-managing-service/build.sbt one Seq entry
the other thirteen one Seq entry each, with its // Turn on optimizations with "WARNING" as the threshold trailing comment

Full list: access-control-service, amber, common/{auth,config,dao,pybuilder,resource,util,workflow-compiler,workflow-core,workflow-operator}, computing-unit-managing-service, config-service, file-service, notebook-migration-service, workflow-compiling-service.

Any related issues, documentation, discussions?

Closes #7706

Follow-up to a review note from @Yicong-Huang on #7451.

How was this PR tested?

Existing tests only — this is a build-config removal, and there is nothing left to test once the one construct the flag governed is gone.

Locally, from the repo root with Java 17:

  • sbt compile Test/compile over the root aggregate (all sixteen modules) — success.

Verification, re-runnable by a reviewer:

git grep -in xelide      # nothing
git grep -in elidable    # nothing

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 5)

`-Xelide-below WARNING` was set in sixteen build.sbt files. The only
`@elidable`-annotated code in the repo was ElidableStatement, whose four
wrappers (FINEST 300 / FINER 400 / FINE 500 / INFO 800) all sat below the
WARNING (900) threshold. It had no callers and is deleted in apache#7451, after
which no `@elidable` annotation remains and the flag switches nothing.

Not a behaviour change: `assert`/`assume` are `@elidable(ASSERTION)` = 2000,
above WARNING, so they are compiled in today; scalac elides nothing when the
flag is absent, so they are compiled in after this too.

Also drops the comments that only existed to explain the flag, including
amber's "to turn on, use: INFO" note.
Copilot AI lite review requested due to automatic review settings August 17, 2026 02:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added engine dependencies Pull requests that update a dependency file common platform Non-amber Scala service paths labels Aug 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @kz930, @Ma77Ball, @Yicong-Huang
    You can notify them by mentioning @kz930, @Ma77Ball, @Yicong-Huang in a comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common dependencies Pull requests that update a dependency file engine platform Non-amber Scala service paths

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove the -Xelide-below scalac option, which no longer switches anything

2 participants