Skip to content

feat: implement enableInlineBuilds#20

Open
paul-soporan wants to merge 3 commits intomainfrom
paul/inline-builds
Open

feat: implement enableInlineBuilds#20
paul-soporan wants to merge 3 commits intomainfrom
paul/inline-builds

Conversation

@paul-soporan
Copy link
Member

This PR implements Yarn's enableInlineBuilds configuration option and the --inline-builds flag for the install command.

At the moment the lines aren't prefixed with STDOUT/STDERR (like in Yarn) and don't exactly fit in nicely with the rest of the output, as the guidelines are missing.
I'll leave those things for future PRs.

@arcanis
Copy link
Member

arcanis commented Jul 6, 2025

I'm not sure the implementation works well - if an error happens the generated file referenced in the error message will be empty, since we won't have been able to catch the output.

What if instead we always generated a build log entry, which would then be rendered by the Report struct (similar to how it currently works for build error logs)?

@paul-soporan
Copy link
Member Author

Good catch, though it would be nice to find a way to pipe the output to the terminal and to the logfile at the same time, as it's more user-friendly to display the output in real-time, especially on CI where things seem to take forever.

cursor[bot]

This comment was marked as outdated.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Inline Builds Disable Error Logging

When inline builds are enabled, shell forwarding is activated, which prevents stdout/stderr from being captured. This results in empty error log files when build scripts fail, as the logging mechanism attempts to write non-existent captured output, making debugging impossible.

packages/zpm/src/build.rs#L61-L62

// TODO: Use streams prefixed with STDOUT / STDERR just like in Yarn.
.with_shell_forwarding(project.config.project.enable_inline_builds.value)

Fix in CursorFix in Web


Was this report helpful? Give feedback by reacting with 👍 or 👎

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