This is an archive of the discontinued Mercurial Phabricator instance.

rust-dirs: handle forgotten `Result`s
AbandonedPublic

Authored by Alphare on Nov 27 2019, 8:30 AM.

Details

Reviewers
kevincox
durin42
Group Reviewers
hg-reviewers
Summary

In 20a3bf5e71d6 I introduced a temporary bugfix to align Rust code with a new
behavior from C/Python and forgot about a few Results (cargo's compiler cache
does not re-emit warnings on cached modules). This fixes it.

For the record, I am still unsure that this behavior change is a good idea.

Note: I was already quite unhappy with the setters and getters for the
DirstateMap and, indirectly, Dirs, and this only further reinforces my
feelings. I hope we can one day fix that situation at the type level; Georges
Racinet and I were just talking about devising a POC for using the builder
pattern in the context of FFI with Python, we'll see what comes out of it.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

Alphare created this revision.Nov 27 2019, 8:30 AM
kevincox accepted this revision.Dec 2 2019, 7:59 AM
durin42 resigned from this revision.Dec 11 2019, 12:41 PM

This needs a rebase that I'm not sure I can accomplish correctly. Could you take a look?

martinvonz added inline comments.
rust/hg-core/src/dirstate/dirstate_map.rs
355

Have to update at this test and probably others

@martinvonz I was scratching my head trying to find this changeset to update/rebase it, here's hg obslog -r 5a1ff3d75f35 --hidden:

x  5a1ff3d75f35 (46379) rust-dirs: handle forgotten `Result`s
|    rewritten as 80c3e3d4ddea by Martin von Zweigbergk <martinvonz@google.com> (Wed Dec 11 10:51:38 2019 -0800)
|
x  2c62ed1a015a (46378) rust-dirs: handle forgotten `Result`s
     rewritten(description) as 5a1ff3d75f35 using phabsend by Raphaël Gomès <rgomes@octobus.net> (Wed Nov 27 14:30:10 2019 +0100)

I don't have 80c3e3d4ddea in my local repository. I could just revive 2c62ed1a015a and edit from here, but I'm worried that might complicate things further.

@martinvonz I was scratching my head trying to find this changeset to update/rebase it, here's hg obslog -r 5a1ff3d75f35 --hidden:

x  5a1ff3d75f35 (46379) rust-dirs: handle forgotten `Result`s
|    rewritten as 80c3e3d4ddea by Martin von Zweigbergk <martinvonz@google.com> (Wed Dec 11 10:51:38 2019 -0800)
|
x  2c62ed1a015a (46378) rust-dirs: handle forgotten `Result`s
     rewritten(description) as 5a1ff3d75f35 using phabsend by Raphaël Gomès <rgomes@octobus.net> (Wed Nov 27 14:30:10 2019 +0100)

I don't have 80c3e3d4ddea in my local repository. I could just revive 2c62ed1a015a and edit from here, but I'm worried that might complicate things further.

I think I had just pruned my local version of it. I assume you got the prune marker too, so I'm surprised that doesn't show up in obslog. Anyway, it should be the right thing to just revive your version. Sorry about the trouble. We need to fix this workflow some day.

Alphare abandoned this revision.Dec 12 2019, 10:00 AM

Abandoned in favor of D7609