Skip to content

Allow load statements in conditionals and loops #553

@edigaryev

Description

@edigaryev

The commit cd131d1 disables the load statements in conditionals and loops, saying that:

This is a potentially breaking language change, but I suspect few users care. If you are one of them, please report the issue.

Looking at the official spec, namely, the Load statements and Grammar reference sections, nothing prevents the load statement to be in a conditional or a loop.

We need this feature at Cirrus Labs for our Starlark tasks, and it seems that fellows at Tilt need it too for their core product's Tiltfile.

Since this is the current behavior for almost 4 years now, perhaps a good compromise would be giving the users of this package an option to re-enable this behavior using the syntax.FileOptions.

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