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

feat: implement cd - #201

Merged
merged 5 commits into from
Oct 13, 2024
Merged

feat: implement cd - #201

merged 5 commits into from
Oct 13, 2024

Conversation

39555
Copy link
Contributor

@39555 39555 commented Oct 12, 2024

No description provided.

Copy link

github-actions bot commented Oct 12, 2024

Performance Benchmark Report

Benchmark name Baseline (μs) Test/PR (μs) Delta (μs) Delta %
expand_one_string 3.33 μs 3.33 μs 0.00 μs ⚪ Unchanged
instantiate_shell 60.10 μs 60.62 μs 0.52 μs ⚪ Unchanged
instantiate_shell_with_init_scripts 30023.46 μs 30391.20 μs 367.75 μs ⚪ Unchanged
parse_bash_completion 2698.06 μs 2717.67 μs 19.61 μs 🟠 +0.73%
parse_sample_script 4.02 μs 4.02 μs 0.00 μs ⚪ Unchanged
run_echo_builtin_command 90.78 μs 91.23 μs 0.46 μs ⚪ Unchanged
run_one_builtin_command 108.94 μs 110.37 μs 1.43 μs ⚪ Unchanged
run_one_external_command 1920.78 μs 2091.24 μs 170.46 μs 🟠 +8.87%
run_one_external_command_directly 1019.99 μs 1026.11 μs 6.12 μs ⚪ Unchanged

Code Coverage Report: Only Changed Files listed

Package Base Coverage New Coverage Difference
brush-core/src/builtins/cd.rs 🟠 75% 🟢 80% 🟢 5%
brush-core/src/shell.rs 🟢 81.53% 🟢 81.8% 🟢 0.27%
Overall Coverage 🟢 75.26% 🟢 75.3% 🟢 0.04%

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

@39555
Copy link
Contributor Author

39555 commented Oct 12, 2024

Sad that it fails with 1.75. I didn't know temporary lifetime extension is such a recent feature rust-lang/rust#121346

@reubeno
Copy link
Owner

reubeno commented Oct 12, 2024

The changes look good to me; thanks for adding this. Before we merge this, could you add compat tests under brush-shell/tests/cases/builtins/cd.yaml to cover the changed logic?

Edit: just saw your comment regarding temporary lifetime extension. Agreed that's unfortunate. As we'd previously discussed, I was hoping to hold out a big longer before upgrading MSRV; how much messier would the code be with a workaround?

@39555
Copy link
Contributor Author

39555 commented Oct 13, 2024

@reubeno all done

@39555 39555 force-pushed the cd-oldpwd branch 2 times, most recently from 74c6320 to 36d1dd2 Compare October 13, 2024 12:57
@reubeno reubeno merged commit 2f02e01 into reubeno:main Oct 13, 2024
11 checks passed
@39555 39555 deleted the cd-oldpwd branch October 14, 2024 18:57
39555 added a commit to 39555/brush that referenced this pull request Oct 22, 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.

2 participants