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: propagate execution parameters more thoroughly #374

Merged
merged 2 commits into from
Feb 2, 2025
Merged

Conversation

reubeno
Copy link
Owner

@reubeno reubeno commented Feb 2, 2025

Address cases where command substitution environments don't correctly inherit the open files of the containing command.

Caveat: I'm not thrilled about how much code needed to be touched, but this at least fixes a known defect. Hopefully we can clean it up subsequently.

@reubeno reubeno requested a review from Copilot February 2, 2025 04:14

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 10 changed files in this pull request and generated no comments.

Files not reviewed (5)
  • brush-core/src/interp.rs: Evaluated as low risk
  • brush-core/src/arithmetic.rs: Evaluated as low risk
  • brush-core/src/extendedtests.rs: Evaluated as low risk
  • brush-shell/tests/cases/redirection.yaml: Evaluated as low risk
  • brush-core/src/builtins/printf.rs: Evaluated as low risk
Copy link

github-actions bot commented Feb 2, 2025

Test Results

    2 files      9 suites   1m 46s ⏱️
  668 tests   668 ✅ 0 💤 0 ❌
1 322 runs  1 322 ✅ 0 💤 0 ❌

Results for commit 1bac20b.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Feb 2, 2025

Performance Benchmark Report

Benchmark name Baseline (μs) Test/PR (μs) Delta (μs) Delta %
clone_shell_object 17.99 μs 18.07 μs 0.08 μs 🟠 +0.46%
eval_arithmetic 0.17 μs 0.17 μs 0.00 μs ⚪ Unchanged
expand_one_string 1.71 μs 1.81 μs 0.10 μs ⚪ Unchanged
for_loop 22.69 μs 21.80 μs -0.89 μs 🟢 -3.94%
function_call 2.78 μs 2.33 μs -0.46 μs 🟢 -16.36%
instantiate_shell 57.00 μs 57.43 μs 0.43 μs ⚪ Unchanged
instantiate_shell_with_init_scripts 23038.14 μs 20391.56 μs -2646.58 μs 🟢 -11.49%
parse_bash_completion 1669.90 μs 1649.69 μs -20.21 μs 🟢 -1.21%
parse_sample_script 1.74 μs 1.77 μs 0.03 μs 🟠 +1.61%
run_echo_builtin_command 16.00 μs 15.24 μs -0.77 μs ⚪ Unchanged
run_one_external_command 2393.14 μs 2359.33 μs -33.81 μs ⚪ Unchanged
tokenize_sample_script 2.78 μs 2.82 μs 0.03 μs 🟠 +1.22%

Code Coverage Report: Only Changed Files listed

Package Base Coverage New Coverage Difference
brush-core/src/arithmetic.rs 🟢 98.48% 🟢 98.52% 🟢 0.04%
brush-core/src/builtins/printf.rs 🟢 93.88% 🟢 94.55% 🟢 0.67%
brush-core/src/builtins/test.rs 🟢 91.3% 🟢 92.59% 🟢 1.29%
brush-core/src/commands.rs 🟢 87.14% 🟢 87.21% 🟢 0.07%
brush-core/src/completion.rs 🟠 63.43% 🟠 63.41% 🔴 -0.02%
brush-core/src/expansion.rs 🟢 96.1% 🟢 96.14% 🟢 0.04%
brush-core/src/extendedtests.rs 🟠 64.61% 🟠 66.46% 🟢 1.85%
brush-core/src/interp.rs 🟢 91.48% 🟢 91.58% 🟢 0.1%
brush-core/src/options.rs 🟢 92.39% 🟢 93.48% 🟢 1.09%
brush-core/src/shell.rs 🟢 86.07% 🟢 85.95% 🔴 -0.12%
brush-core/src/sys/unix/signal.rs 🟠 64.41% 🟠 61.02% 🔴 -3.39%
brush-core/src/tests.rs 🟠 50% 🟠 52.63% 🟢 2.63%
Overall Coverage 🟢 77.81% 🟢 77.88% 🟢 0.07%

Minimum allowed coverage is 70%, this run produced 77.88%

@reubeno reubeno marked this pull request as ready for review February 2, 2025 04:45
@reubeno reubeno merged commit 3e423c3 into main Feb 2, 2025
17 checks passed
@reubeno reubeno deleted the pass-exec-params branch February 2, 2025 04:46
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.

1 participant