Skip to content

Comments

Adding type testing for Targets, Labels, and Files#614

Open
alphalex-google wants to merge 2 commits intobazelbuild:mainfrom
alphalex-google:main
Open

Adding type testing for Targets, Labels, and Files#614
alphalex-google wants to merge 2 commits intobazelbuild:mainfrom
alphalex-google:main

Conversation

@alphalex-google
Copy link

While these types cannot be created in the loading phase (i.e. value = type(File())) for internally consistent type checking, these type rituals allow for a central definition of how/where this type checking can be governed, allowing for future changes, etc to all become generationally compatible as appropriate.

While these types cannot be created in the loading phase (i.e. `value =
type(File())`) for internally consistent type checking, these type
rituals allow for a central definition of how/where this type checking
can be governed, allowing for future changes, etc to all become
generationall compatible as appropriate.
Copy link
Collaborator

@tetromino tetromino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I think CI is failing because docs need to be regenerated; let me take a look

Copy link
Collaborator

@tetromino tetromino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alphalex-google - please run bazelisk run //docs:update to regenerate docs/types_doc.md


asserts.false(env, types.is_file(99))
asserts.false(env, types.is_file(""))
asserts.false(env, types.is_file(set()))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here and everywhere below - please remove usage of set() because it requires Bazel 8.x (skylib is supposed to be compatible down to Bazel 7).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants