Open lpotthast opened 9 months ago
A not-so-great workaround would be to add a “pre-build” hook that executes a cargo check
to enforce running the build once.
Interesting. Right now, there isn't a real scheduler/dependency tree in the trunk build pipeline. However, there's another use case, where web-workers might have a dependency on each other, and the application being last (in order to inject env-vars with cache busting name).
Your use case looks like one more use case for having dependencies between different build steps.
I have a very similar issue, but in my case the build always runs twice, which is annoying.
My build scripts generates some static assets to be served to the website.
There are two ways that I can think about to solve this:
trunk
to wait for cargo build
to finish before loading the assets.Yea, in general it might be great to have a dependency graph inside of trunk for that. But I agree that having a simple flag of "run pipelines sequentially" might be a good alternative.
My use case includes copying SCSS files through a libraries build.rs file into my application root directory.
Building the styles (SASS) will only work with the output from this build script.
But the asset pipeline always runs in parallel / can not be configured to run after a finished rust build. Errors in the SASS pipeline lead to a retry, also skipping/aborting the rust build, leading to no build.rs being executed an and endless retry-loop.
Could such an optional behavior be integrated into trunk?