Skip to content

FixLoads issue / can we have forced loads? #2146

@tzaman-stripe

Description

@tzaman-stripe

This test case in fix_test.go fails:

"this test fails": {
    input: `foo_binary(
    name = "a",
    field = [magic_macro],
)
`,
    want: `load("@bar", "magic_macro")
load("@foo", "foo_binary")

foo_binary(
    name = "a",
    field = [magic_macro],
)
`,

I can help PR a fix, but would it be possible to have generate force certain rules to be loaded? The current FixLoads code seems fairly brittle, and it'd be nice to add in certain loads no matter what.

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