Skip to content

marisa-trie@0.3.1.bcr.1#8221

Merged
UebelAndre merged 2 commits intobazelbuild:mainfrom
BYVoid:marisa-trie-0.3.1.bcr.1
Apr 14, 2026
Merged

marisa-trie@0.3.1.bcr.1#8221
UebelAndre merged 2 commits intobazelbuild:mainfrom
BYVoid:marisa-trie-0.3.1.bcr.1

Conversation

@BYVoid
Copy link
Copy Markdown
Contributor

@BYVoid BYVoid commented Mar 31, 2026

Summary

  • Add marisa-trie@0.3.1.bcr.1 with a patch that removes the VERSION file from the source tree
  • Fixes Windows build failure where MSVC's #include <version> (C++ standard header) resolves to the VERSION data file on case-insensitive filesystems

Problem

On Windows, any target that depends on marisa-trie fails to compile with:

external\marisa-trie+\version(1): error C2059: syntax error: 'constant'

Root cause

marisa-trie ships a file named VERSION (containing only 0.3.1) at its repo root. Bazel adds the external repo root to the compiler's include search path (-Iexternal/marisa-trie+) so that headers like marisa/trie.h can be found.

On Windows, the filesystem is case-insensitive. When MSVC resolves #include <version> (a C++17/20 standard header included transitively by other standard headers), it searches the include paths and matches the VERSION data file instead of the real <version> standard header. The preprocessor then reads 0.3.1 as C++ source and fails to parse it.

On Linux and macOS the filesystem is case-sensitive, so <version> never matches VERSION and the real standard header is found normally. This is why the bug only manifests on Windows.

Fix

Add a patch that deletes the VERSION file from the marisa-trie source tree before Bazel uses the repo. With the file gone, MSVC's #include <version> lookup correctly finds the standard library header.

See BYVoid/OpenCC#1084 for the original report and rationale.

@bazel-io skip_check unstable_url

Test plan

  • bazel run //tools:bcr_validation -- --check marisa-trie@0.3.1.bcr.1 passes
  • BCR presubmit CI passes on all platforms (debian10, ubuntu2004, macos, macos_arm64, windows) × (bazel 7.x, 8.x, 9.x)

@google-cla
Copy link
Copy Markdown

google-cla bot commented Mar 31, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@bazel-io
Copy link
Copy Markdown
Member

Hello BCR maintainers, modules without existing maintainers (marisa-trie) have been updated in this PR.
Please review the changes. You can view a diff against the previous version in the "Generate module diff" check.

@bazel-io bazel-io requested review from a team and UebelAndre and removed request for a team March 31, 2026 03:05
@BYVoid BYVoid force-pushed the marisa-trie-0.3.1.bcr.1 branch from c29fcd4 to e41da8d Compare March 31, 2026 03:05
@BYVoid
Copy link
Copy Markdown
Contributor Author

BYVoid commented Mar 31, 2026

@bazel-io skip_check unstable_url

@BYVoid BYVoid force-pushed the marisa-trie-0.3.1.bcr.1 branch from e41da8d to 6452356 Compare March 31, 2026 03:07
@bazel-io bazel-io added the skip-url-stability-check Skip the URL stability check for the PR label Mar 31, 2026
@UebelAndre UebelAndre added the presubmit-auto-run Presubmit jobs will be triggered for new changes automatically without reviewer's approval label Mar 31, 2026
@BYVoid
Copy link
Copy Markdown
Contributor Author

BYVoid commented Mar 31, 2026

All tests passed!

@BYVoid
Copy link
Copy Markdown
Contributor Author

BYVoid commented Apr 2, 2026

@UebelAndre Can you help merge this PR?

Copy link
Copy Markdown
Contributor

@UebelAndre UebelAndre left a comment

Choose a reason for hiding this comment

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

Thanks! One request for you

Comment thread modules/marisa-trie/0.3.1.bcr.1/patches/add_build_file.patch Outdated
Overlays make future changes easier to review since they show the full
file content rather than a diff-of-a-diff. Adds bazel_compatibility
>= 7.2.1 as required for overlay support.
@BYVoid BYVoid force-pushed the marisa-trie-0.3.1.bcr.1 branch from 8978b0f to 198c076 Compare April 7, 2026 01:03
@BYVoid BYVoid requested a review from UebelAndre April 7, 2026 01:04
@BYVoid
Copy link
Copy Markdown
Contributor Author

BYVoid commented Apr 14, 2026

can anyone review / merge?
cc @Wyverald

@UebelAndre UebelAndre merged commit 9c747b5 into bazelbuild:main Apr 14, 2026
23 checks passed
@BYVoid BYVoid deleted the marisa-trie-0.3.1.bcr.1 branch April 14, 2026 20:20
BYVoid added a commit to BYVoid/OpenCC that referenced this pull request Apr 14, 2026
The new BCR release bundles the VERSION-file removal patch
(bazelbuild/bazel-central-registry#8221), so the local
single_version_override and patch file are no longer needed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
BYVoid added a commit to BYVoid/OpenCC that referenced this pull request Apr 14, 2026
The new BCR release bundles the VERSION-file removal patch
(bazelbuild/bazel-central-registry#8221), so the local
single_version_override and patch file are no longer needed.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

presubmit-auto-run Presubmit jobs will be triggered for new changes automatically without reviewer's approval skip-url-stability-check Skip the URL stability check for the PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants