Skip to content

Using new string_flag settings in external repositories #10152

@keith

Description

@keith

With the new string_flag type, it would be nice if we could include some of these in rules repos, but currently it doesn't seem like you can reference them if they're in a WORKSPACE repo in your project. For example if we add this:

string_flag(
    name = "ios_simulator_id",
    build_setting_default = "",
    visibility = ["//visibility:public"],
)

To rules_apple, and then try to set it with:

bazel test //... --@build_bazel_rules_apple//apple:ios_simulator_id=foo

We get this error:

ERROR: Unrecognized option: --@build_bazel_rules_apple//apple:ios_simulator_id=foo

I also tried using //external here with no luck.

What's the output of bazel info release?

release 1.1.0

Related: bazelbuild/rules_apple#648

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3We're not considering working on this, but happy to review a PR. (No assignee)team-ExternalDepsExternal dependency handling, remote repositiories, WORKSPACE file.type: feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions