Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace all globs in IREE core with enforce_glob #5063

Merged
merged 2 commits into from
Mar 11, 2021

Conversation

GMNGeoffrey
Copy link
Contributor

@GMNGeoffrey GMNGeoffrey commented Mar 11, 2021

This avoids any globs of source files in CMake (which are
discouraged)
and any globs being evaluated in bazel_to_cmake (which would make it
depend on files other than the BUILD file). It still allows the safety
check that you actually included all the files you meant to (which is
particularly useful with tests, where a failure to do so is test
skipped forever instead of an immediate build failure). The cost is
having to explicitly list a new source file when you add it, which
seems not so bad.

I didn't remove bazel_to_cmake support for glob yet, so I can clean up
any stragglers after this lands.

Fixes #1083

@google-cla google-cla bot added the cla: yes label Mar 11, 2021
@GMNGeoffrey GMNGeoffrey changed the title enforce glob Replace all globs in IREE core with enforce_glob Mar 11, 2021
@GMNGeoffrey GMNGeoffrey marked this pull request as ready for review March 11, 2021 06:23
@@ -43,6 +43,7 @@ def _deep_copy_recursion_depth_1(x):

def deep_copy(x):
"""Returns a copy of the argument, making a deep copy if it is a container.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Uh... this has nothing to do with the change. I apparently just fixed a thing buildifier was complaining about. I can revert

Copy link
Member

@marbre marbre left a comment

Choose a reason for hiding this comment

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

Awesome! I really like this.

@GMNGeoffrey GMNGeoffrey merged commit 93a1ff1 into iree-org:main Mar 11, 2021
@GMNGeoffrey GMNGeoffrey deleted the enforce-glob branch March 11, 2021 18:39
GMNGeoffrey added a commit to GMNGeoffrey/iree that referenced this pull request Mar 11, 2021
These come from midair collision between
iree-org#5063 and
iree-org#4881
GMNGeoffrey added a commit that referenced this pull request Mar 11, 2021
These come from midair collision between
#5063 and
#4881
GMNGeoffrey added a commit to GMNGeoffrey/iree that referenced this pull request Mar 11, 2021
GMNGeoffrey added a commit that referenced this pull request Mar 11, 2021
@GMNGeoffrey GMNGeoffrey added the infrastructure Relating to build systems, CI, or testing label May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Relating to build systems, CI, or testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bazel_to_cmake avoid CONFIGURE_DEPENDS in glob
3 participants