Conversation
|
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. |
|
Hello BCR maintainers, modules without existing maintainers (marisa-trie) have been updated in this PR. |
c29fcd4 to
e41da8d
Compare
|
@bazel-io skip_check unstable_url |
e41da8d to
6452356
Compare
|
All tests passed! |
|
@UebelAndre Can you help merge this PR? |
UebelAndre
left a comment
There was a problem hiding this comment.
Thanks! One request for you
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.
8978b0f to
198c076
Compare
|
can anyone review / merge? |
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>
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>
Summary
marisa-trie@0.3.1.bcr.1with a patch that removes theVERSIONfile from the source tree#include <version>(C++ standard header) resolves to theVERSIONdata file on case-insensitive filesystemsProblem
On Windows, any target that depends on
marisa-triefails to compile with:Root cause
marisa-trie ships a file named
VERSION(containing only0.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 likemarisa/trie.hcan 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 theVERSIONdata file instead of the real<version>standard header. The preprocessor then reads0.3.1as C++ source and fails to parse it.On Linux and macOS the filesystem is case-sensitive, so
<version>never matchesVERSIONand the real standard header is found normally. This is why the bug only manifests on Windows.Fix
Add a patch that deletes the
VERSIONfile 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.1passes