extras: move the license-notice registry into xff_extras_api - #327
Merged
Conversation
Second step of the true-module extras refactor (#123). The license-notice registration seam (Notice + Register + Registrar + Notices + the process-wide registry) moves out of //xff/license into a second xff_extras_api target, license_notice - mirroring b1's regex_backend. So an extra self-registers its notice via @xff_extras_api, not the core. - extra_modules/xff_extras_api: split into two targets, regex_backend (backend.{h,cc}, include_prefix xff/regex) and license_notice (notice.{h,cc}, include_prefix xff/license). notice.h keeps the xff/license/notice.h include path + xff::license namespace, so consumers are unchanged. - //xff/license: license.h re-includes notice.h; license.cc keeps the core registrars (kAbseil/kRe2/kMbo) + NoticeText() + the generated LicenseText(), drops the moved registry; license_cc deps @xff_extras_api//:license_notice. - extra_modules/pcre2: the backend now includes xff/license/notice.h and deps @xff_extras_api//:{regex_backend,license_notice} + @pcre2 - NO root-package deps left, which unblocks making pcre2 a standalone module (b3). No behavior change: --help=notice still lists PCRE2 (full) / omits it (lean) via the base seam; lean //... (74/74, incl license_test) and --config=xff_full both green.
helly25
enabled auto-merge (squash)
July 10, 2026 23:17
helly25
added a commit
that referenced
this pull request
Jul 11, 2026
…l; minimal-archive CI (#328) * extras: make pcre2 a standalone module; relocate xff_extras_api to top level Final step of the true-module extras refactor (#123). extra_modules/pcre2 becomes its own Bazel module (xff_pcre2), and the shared base module moves out of extra_modules/ so that directory holds ONLY removable extras. - xff_extras_api relocated extra_modules/xff_extras_api -> top-level xff_extras_api/. It is core-required (RegexBackend + license-notice seams), so it must NOT live under extra_modules/; now `rm -rf extra_modules/` (+ dropping the extras' bazel_deps) yields a minimal core archive. (Fixes the location introduced in #326/#327.) - extra_modules/pcre2: new MODULE.bazel (module xff_pcre2, bazel_dep pcre2 + xff_extras_api); root swaps the include() segment for bazel_dep + local_path_override (the override is root-global, so xff_pcre2's bazel_dep(xff_extras_api) resolves). The old pcre2.MODULE.bazel segment + its exports_files are gone. pcre2_backend is //visibility:public. - pcre2_backend_test rewritten to drive the backend through the base seam (MakePcre2Backend / RegexBackend), dropping its //xff/regex dep so it is module-local; the Matcher routing stays covered by //xff/cli:full_binary_test. - xff_full select + CI full cell: //extra_modules/pcre2:... -> @xff_pcre2//:... Verified: lean //... (74/74) has zero extra_modules/@pcre2 deps (cquery); --config=xff_full full_binary_test + @xff_pcre2//:pcre2_backend_test green; --help=notice still lists PCRE2 (full) via the standalone module's license seam. * ci: add a minimal-core-archive cell (drop all of extra_modules/) Guards the full-separation property (#123): strip the whole extra_modules/ directory plus the extras' bazel_dep + local_path_override lines, then build the lean core (//xff/cli:xff). It passes only because xff_extras_api is top-level core infrastructure (not under extra_modules/) and nothing in the core reaches into an extra - so a future core->extra dependency, or a regression that pulls an extra into a lean target, fails here. One cell on the single most-default target (ubuntu default); wired into the done gate. Verified locally: rm -rf extra_modules + the sed strip -> bazel build --nobuild //... re-resolves and loads all targets cleanly (xff_full's @xff_pcre2 select is lazy/manual).
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.
b2 of the true-module extras refactor (#123).
Mirrors b1: the license-notice registration seam (
Notice+Register+Registrar+Notices+ the process-wide registry) moves out of//xff/licenseinto a secondxff_extras_apitarget,license_notice. So an extra self-registers its notice via@xff_extras_api, not the core - removing the last root-package dep onextra_modules/pcre2's backend and unblocking b3 (pcre2 as a standalone module).Changes
extra_modules/xff_extras_api: now two targets -regex_backend(backend.{h,cc},include_prefix xff/regex) andlicense_notice(notice.{h,cc},include_prefix xff/license).notice.hkeeps thexff/license/notice.hinclude path +xff::licensenamespace, so consumers are unchanged.//xff/license:license.hre-includesnotice.h;license.cckeeps the core registrars (kAbseil/kRe2/kMbo) +NoticeText()+ the generatedLicenseText(), drops the moved registry;license_ccdeps@xff_extras_api//:license_notice.extra_modules/pcre2: the backend includesxff/license/notice.hand deps@xff_extras_api//:{regex_backend,license_notice}+@pcre2- no root-package deps left.Verified
No behavior change.
--help=noticestill lists PCRE2 (full binary) / omits it (lean) via the base seam;bazel test //...(74/74, incllicense_test) and--config=xff_full(pcre2_backend_test+full_binary_test) both green.Next
extra_modules/pcre2a real standalone module (ownMODULE.bazel+bazel_dep/local_path_override), retiring theinclude()segment.Part of #123.