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(expansion): correct length for 1-element arrays #316

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

reubeno
Copy link
Owner

@reubeno reubeno commented Jan 9, 2025

Among other things, this fixes some issues with completion for strace command lines.

@reubeno reubeno requested a review from Copilot January 9, 2025 21:30

Choose a reason for hiding this comment

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

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

Comments suppressed due to low confidence (1)

brush-core/src/expansion.rs:92

  • Ensure that the new from_array behavior is covered by tests, especially for single-element arrays.
pub(crate) fn polymorphic_len(&self) -> usize {
Copy link

github-actions bot commented Jan 9, 2025

Test Results

    2 files      9 suites   1m 16s ⏱️
  576 tests   576 ✅ 0 💤 0 ❌
1 138 runs  1 138 ✅ 0 💤 0 ❌

Results for commit b7313a5.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jan 9, 2025

Performance Benchmark Report

Benchmark name Baseline (μs) Test/PR (μs) Delta (μs) Delta %
clone_shell_object 16.34 μs 16.07 μs -0.26 μs ⚪ Unchanged
eval_arithmetic 0.19 μs 0.19 μs -0.00 μs ⚪ Unchanged
expand_one_string 1.57 μs 1.57 μs 0.00 μs ⚪ Unchanged
for_loop 32.17 μs 32.27 μs 0.09 μs ⚪ Unchanged
function_call 3.22 μs 3.30 μs 0.08 μs ⚪ Unchanged
instantiate_shell 48.06 μs 47.99 μs -0.08 μs ⚪ Unchanged
instantiate_shell_with_init_scripts 21239.79 μs 23084.64 μs 1844.85 μs 🟠 +8.69%
parse_bash_completion 1710.79 μs 1701.11 μs -9.68 μs ⚪ Unchanged
parse_sample_script 2.20 μs 2.18 μs -0.03 μs ⚪ Unchanged
run_echo_builtin_command 16.02 μs 16.23 μs 0.20 μs ⚪ Unchanged
run_one_external_command 1847.93 μs 1953.35 μs 105.42 μs 🟠 +5.70%

Code Coverage Report: Only Changed Files listed

Package Base Coverage New Coverage Difference
brush-core/src/expansion.rs 🟢 96.1% 🟢 96.14% 🟢 0.04%
brush-core/src/shell.rs 🟢 77.84% 🟢 77.71% 🔴 -0.13%
Overall Coverage 🟢 74.46% 🟢 74.47% 🟢 0.01%

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

@reubeno reubeno marked this pull request as ready for review January 9, 2025 21:45
@reubeno reubeno merged commit 89bb3ce into main Jan 9, 2025
17 checks passed
@reubeno reubeno deleted the fix-strace-complete branch January 9, 2025 21:45
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