Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buildozer: Handle multiple glob arguments in 'set' arguments #1249

Open
stagnation opened this issue Mar 11, 2024 · 1 comment
Open

Buildozer: Handle multiple glob arguments in 'set' arguments #1249

stagnation opened this issue Mar 11, 2024 · 1 comment

Comments

@stagnation
Copy link

Following on #100 and #99

Ideally, we'd find a more general solution.

The special case for single argument glob works fine, but with multiple arguments it again parses the glob as individual files.

$ buildozer 'set srcs glob(["*.c"])' //:foobar
fixed /.../buildozer/glob-multiple-args/BUILD.bazel
$ cat BUILD.bazel
cc_library(
    name = "foobar",
    srcs = glob(["*.c"]),
)
$ buildozer 'set srcs glob(["*.c", "*.h"])' //:foobar
fixed /.../buildozer/glob-multiple-args/BUILD.bazel
$ cat BUILD.bazel
cc_library(
    name = "foobar",
    srcs = [
        "\"*.h\"])",
        "glob([\"*.c\",",
    ],
)
@stagnation stagnation changed the title Handle multiple glob arguments in 'set' arguments Buildozer: Handle multiple glob arguments in 'set' arguments Mar 11, 2024
@stagnation
Copy link
Author

I'll take a look and see if I can improve the special handling of globs here.

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

No branches or pull requests

1 participant