Skip to content

Fix stray ")" in global_indexstore path in generated BUILD.bazel#1090

Merged
ileitch merged 1 commit intoperipheryapp:masterfrom
MartinP7r:fix/bazel-global-indexstore-stray-paren
Mar 21, 2026
Merged

Fix stray ")" in global_indexstore path in generated BUILD.bazel#1090
ileitch merged 1 commit intoperipheryapp:masterfrom
MartinP7r:fix/bazel-global-indexstore-stray-paren

Conversation

@MartinP7r
Copy link
Contributor

Summary

BazelProjectDriver.swift line 89 has an extra literal ) in the string interpolation that constructs the global_indexstore value for the generated BUILD.bazel:

"\"\($0.makeAbsolute()))\""
//                      ^ stray ")" — literal character, not part of \(...)

This produces invalid Bazel syntax in /var/tmp/periphery_bazel/BUILD.bazel:

global_indexstore = "/path/to/indexstore)",  # broken — stray ")"

instead of:

global_indexstore = "/path/to/indexstore",   # correct

Fix

Remove the extra ) so the interpolation reads "\"\($0.makeAbsolute())\"".

How to reproduce

Run periphery with --bazel --bazel-index-store /any/path and inspect the generated /var/tmp/periphery_bazel/BUILD.bazel — the global_indexstore value will contain a trailing ) inside the quotes.

The string interpolation on line 89 of BazelProjectDriver.swift has an
extra literal ")" after the Swift interpolation closure:

    "\"\($0.makeAbsolute()))\""

The first "))" is: one ")" closing the interpolation \(...), and one
literal ")" that gets emitted into the BUILD.bazel file. This produces:

    global_indexstore = "/path/to/indexstore)",

which is invalid Bazel syntax. Remove the stray ")".
@ileitch ileitch merged commit 7a78e36 into peripheryapp:master Mar 21, 2026
12 of 13 checks passed
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.

2 participants