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

Adding dependency to current rule in pre_build fails. #3318

Open
cemeceme opened this issue Dec 15, 2024 · 0 comments
Open

Adding dependency to current rule in pre_build fails. #3318

cemeceme opened this issue Dec 15, 2024 · 0 comments

Comments

@cemeceme
Copy link
Contributor

If a dependency is added within a pre_build function of the current rule, then please doesn't wait for the new dependency to be built before proceeding.
However, running please a second time, with the dependency now cached, works fine.

This is a similar issue as #3168, since please misses some blocking functionality within the buildTarget function for pre and post build calls for cases where dependencies may change.

Ideally, adding new dependencies to the current rule should be permissible in pre_build, since there are cases where the sources are not fully known until build time.
Specifically, this is something I noticed when using please to generate code that is then compiled in a separate rule. In that case, the cc-rules for instance, will only use a single build step to compile a potentially large number of sources, running on a single thread. Instead, it should be possible to go through the sources in a pre_build rule, to generate rules according to the actual files input.

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

No branches or pull requests

1 participant