Skip to content

expr.go's extractPlatformStringsExprs falsely reports no error if the expression type is unmatched #2173

@tzaman-stripe

Description

@tzaman-stripe

func extractPlatformStringsExprs(expr bzl.Expr) (platformStringsExprs, error) {

If the expression type is unmatched, this will result in no error appearing.

I discovered this while merging the following rule (roughly speaking) into itself:

first_list = []
second_list = []

scala_library(
    deps = first_list + second_list
)

first_list and second_list are not lists or calls. this function will return an empty platformStringsExprs, causing the deps array to become empty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions