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

fix(plan): stdout logic for valid output files #1249

Merged
merged 4 commits into from
Jan 6, 2025

Conversation

CoderJoshDK
Copy link
Contributor

Don't let build plans generate anything invalid files. If an error or warning should be generated, it should be outputted to stderr. That way, consumers can be pretty confident that the output is only ever in valid TOML/JSON format.

This closes #1241 and is a slightly more complete solution over #1242.

Considerations were made to have a "verbose mode" however, doing that would require significant refactoring, all for only 3 or 4 impacted providers. Instead, recoverable errors should be directed to stderr using eprintln!

Don't let build plans generate anything other than the build plan
itself. If an error or warning should be generated, it should be
outputted to stderr. That way consumers can be pretty confident that the
output is only ever in valid TOML/JSON format.
@CoderJoshDK CoderJoshDK changed the title feat: cleanup plan logic and stdout fix(plan): stdout logic for valid output files Dec 29, 2024
Copy link
Contributor

@coffee-cup coffee-cup left a comment

Choose a reason for hiding this comment

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

Nice, I like this solution

@coffee-cup coffee-cup added the release/patch Author patch release label Jan 6, 2025
@coffee-cup coffee-cup merged commit 1c61eb9 into railwayapp:main Jan 6, 2025
103 of 104 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release/patch Author patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nixpack plan generates an invalid toml file for python projects containing a .tool-versions file.
2 participants