trunk icon indicating copy to clipboard operation
trunk copied to clipboard

Delay asset pipeline until rust build finished

Open lpotthast opened this issue 1 year ago • 4 comments

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?

lpotthast avatar Feb 03 '24 21:02 lpotthast

A not-so-great workaround would be to add a “pre-build” hook that executes a cargo check to enforce running the build once.

lpotthast avatar Feb 03 '24 22:02 lpotthast

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.

ctron avatar Feb 04 '24 11:02 ctron