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

Refactor command execution #986

Merged
merged 30 commits into from
Sep 25, 2024
Merged

Conversation

yaito3014
Copy link
Contributor

fixes #970

@yaito3014
Copy link
Contributor Author

yaito3014 commented Sep 14, 2024

I'm not sure whether execute should use output and discard output, or both functions should have similar lines except pipes (or remove execute entirely)

@ken-matsui
Copy link
Member

Removing execute makes sense to me.

@yaito3014 yaito3014 marked this pull request as ready for review September 16, 2024 12:48
Copy link
Member

@ken-matsui ken-matsui left a comment

Choose a reason for hiding this comment

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

Thank you so much for working on this! This PR looks great. I left some comments to address.

src/Command.cc Outdated Show resolved Hide resolved
src/Manifest.cc Outdated Show resolved Hide resolved
src/Cmd/Fmt.cc Outdated Show resolved Hide resolved
src/Manifest.cc Show resolved Hide resolved
src/Cmd/Tidy.cc Show resolved Hide resolved
src/BuildConfig.cc Show resolved Hide resolved
src/Algos.cc Outdated Show resolved Hide resolved
src/Algos.cc Outdated Show resolved Hide resolved
@ken-matsui
Copy link
Member

Please request a review when you are ready. Thank you for taking the time to work on this!

Copy link
Member

@ken-matsui ken-matsui left a comment

Choose a reason for hiding this comment

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

Sorry for the late response. We need to see outputs from Make when verbose like: https://github.com/poac-dev/poac/actions/runs/10867870493/job/30157136538#step:7:80

We don't see such outputs in this PR:
https://github.com/poac-dev/poac/actions/runs/10919313898/job/30306697425?pr=986#step:7:78

@yaito3014
Copy link
Contributor Author

added Command::StdioConfig enum type like Rust's std::process::Stdio, and now spawn defaults to inherit stdout and commandExists use StdioConfig::Null to nullify the output.

Copy link
Member

@ken-matsui ken-matsui left a comment

Choose a reason for hiding this comment

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

This looks great. Thank you for taking your time!

@ken-matsui ken-matsui merged commit 6e5cdda into poac-dev:main Sep 25, 2024
17 checks passed
@yaito3014 yaito3014 deleted the refactor-cmd-exec branch September 26, 2024 06:05
ken-matsui added a commit that referenced this pull request Oct 5, 2024
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.

Use execve instead of std::system
2 participants