Skip to content

incompatible_disable_proto_source_root: remove the attribute proto_library.proto_source_root #7153

@lberki

Description

@lberki

The proto_library.proto_source_root attribute is going away in favor of the more flexible proto_library.strip_import_prefix and proto_library.import_prefix.

In order to migrate your BUILD files, replace proto_source_root with strip_import_prefix: since the only allowed value of that attribute is the package the rule is in, simply replace the name of the attribute and prepend / to its value. For example, the rule (necessarily in foo/bar/BUILD):

proto_library(name="proto", srcs=["proto.proto"], proto_source_root="foo/bar")

Needs to be migrated to:

proto_library(name="proto", srcs=["proto.proto"], strip_import_prefix="/foo/bar")

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1I'll work on this now. (Assignee required)incompatible-changeIncompatible/breaking changeteam-Rules-ServerIssues for serverside rules included with Bazel

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions