Skip to content

Adding dependency to current rule in pre_build fails. #3318

@cemeceme

Description

@cemeceme

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions