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

fix: remove use of label ctor in repo rule impl to avoid restarts #200

Merged
merged 1 commit into from
May 25, 2023

Conversation

mattem
Copy link
Contributor

@mattem mattem commented May 24, 2023

Removes the use of the Label constructor used for templating with a predeclared dependency on the files as private rule attrs. This removes the need for Skyframe to restart the rule each time a new dependency is encountered during the running of the repository rule.

From running bazel test //... in the test directory before this change:

Screen Shot 2023-05-24 at 3 46 43 PM

Where as the profile after shows just the single invocation.

This is a similar issue we caught in rules_nodejs, bazel-contrib/rules_nodejs#2621 and there's further context in bazelbuild/bazel#16162

@jsharpe
Copy link
Member

jsharpe commented May 24, 2023

@mattem this generally looks good to me, just needs fixing up so it passes CI

@mattem
Copy link
Contributor Author

mattem commented May 24, 2023

🤦 missed the commit of the typo fix.

@jsharpe jsharpe merged commit ceeedcc into bazel-contrib:master May 25, 2023
@mattem mattem deleted the rule_restarts branch May 25, 2023 13:50
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