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

chore(xtask): Upgrade xshell #4358

Merged
merged 2 commits into from
Nov 30, 2024
Merged

chore(xtask): Upgrade xshell #4358

merged 2 commits into from
Nov 30, 2024

Conversation

zecakeh
Copy link
Collaborator

@zecakeh zecakeh commented Nov 29, 2024

Gets rid of an unexpected_cfgs warning. Alternative to #4352.

Because most subcommands are functions, this uses a thread-local static shared shell API. If they were methods, we could just use a shared shell API for a given command.

Gets rid of an unexpected_cfgs warning.

Signed-off-by: Kévin Commaille <[email protected]>
@zecakeh zecakeh requested a review from a team as a code owner November 29, 2024 18:41
@zecakeh zecakeh requested review from andybalaam and removed request for a team November 29, 2024 18:41
@@ -74,7 +74,8 @@ impl ReleaseArgs {
//
// More info: https://git-cliff.org/docs/usage/monorepos
if self.cmd != ReleaseCommand::Changelog {
let _p = pushd(workspace::root_path()?)?;
let sh = sh();
let _p = sh.push_dir(workspace::root_path()?);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am not sure if I understand the initial intent here. Because pushd / Shell::push_dir returns a RAII guard, it stop having an effect as soon as it is out of scope. And it is out of scope right after being created.

Copy link
Contributor

Choose a reason for hiding this comment

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

The intention was to not change the directory to the workspace if the Changelog command is used.

A let _p; before the if branch give the guard the correct lifetime. Could you add that please?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

Copy link

codecov bot commented Nov 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.11%. Comparing base (1072d0a) to head (f496096).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4358      +/-   ##
==========================================
+ Coverage   85.09%   85.11%   +0.01%     
==========================================
  Files         280      280              
  Lines       30535    30535              
==========================================
+ Hits        25984    25990       +6     
+ Misses       4551     4545       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Kévin Commaille <[email protected]>
Copy link
Contributor

@poljar poljar left a comment

Choose a reason for hiding this comment

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

Seems to work as it worked previously, the code looks sane as well.

Thanks for taking care of this.

@poljar poljar enabled auto-merge (rebase) November 30, 2024 16:32
@poljar poljar merged commit 685386d into matrix-org:main Nov 30, 2024
41 checks passed
@zecakeh zecakeh deleted the upgrade-xshell branch November 30, 2024 17:04
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