( )⚙ D8383 rust-chg: update name of the server process

This is an archive of the discontinued Mercurial Phabricator instance.

rust-chg: update name of the server process
ClosedPublic

Authored by yuja on Apr 6 2020, 10:19 AM.

Details

Summary

This is a copy of updateprocname() of hgclient.c.

At this point, rust-chg is basically functional. I did dogfooding for
a couple of weeks in 2018. There are a few remaining tasks:

a. loop detection by CHGINTERNALMARK
b. forward unsupported commands (notably serve -d) to real hg
c. better handling of early server exception
d. modernize codebase (2018 edition, impl trait, async/await)

For (d), we'll probably want to switch to async-std, but I'm thinking of
upgrading to Tokio 0.2 as an intermediate step since process API isn't
ported to async-std yet. I'm pretty sure future migration to async-std
will be painless compared to the mass rewrite from futures-0.1 to 0.3.

https://github.com/async-rs/async-std/issues/22

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

yuja created this revision.Apr 6 2020, 10:19 AM
Alphare accepted this revision.Apr 8 2020, 4:47 AM
Alphare added a subscriber: Alphare.

For (d) [modernizing the codebase], we'll probably want to switch to async-std, but I'm thinking of
upgrading to Tokio 0.2 as an intermediate step since process API isn't
ported to async-std yet. I'm pretty sure future migration to async-std
will be painless compared to the mass rewrite from futures-0.1 to 0.3.

That seems reasonable indeed.

There is also a potentially interesting project we need to keep an eye out for, since it's made by the same person that started async-std in the first place: https://stjepang.github.io/2020/04/03/why-im-building-a-new-async-runtime.html. I have to admit that the constant rewrites of async runtimes (or lack thereof) does not help when making a decision and are not really reassuring, but I guess it's a new-ish problem in the Rust ecosystem.

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.