This is an archive of the discontinued Mercurial Phabricator instance.

hg-core: add utils::path to project
Needs RevisionPublic

Authored by indygreg on Dec 7 2019, 3:17 PM.

Details

Reviewers
pulkit
marmoute
Group Reviewers
hg-reviewers
Summary

This module was vendored in the previous commit but was not integrated into
the project. This commit performs that integration.

As part of this, we have to add a handful of new dependencies. The new
dependencies all seem quite reasonable. The versions taken were the exact
ones used by the upstream project.

Diff Detail

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

Event Timeline

indygreg created this revision.Dec 7 2019, 3:17 PM
Alphare added a subscriber: Alphare.Dec 9 2019, 5:54 AM
Alphare added inline comments.
rust/hg-core/Cargo.toml
12

Should we adopt this crate for error handling?

I feel like our current solution - although it might need a refactor - is good at forcing the programmer to provide context with finer-grained errors that what you are required to do with anyhow. I actually like anyhow better than more involved crates, but we will need to have a good "error hygiene" if you will.

This seems like a better place to discuss this than the previous patch.

indygreg added inline comments.Dec 23 2019, 1:14 PM
rust/hg-core/Cargo.toml
12

I actually wasn't aware of anyhow before writing this patch. And I have to say that I really like anyhow because it is simpler than other crates in this space while offering much of the same functionality.

I think it is inevitable that we'll want to use a crate like anyhow for more advanced error handling. If nothing else, it can help cut down on boilerplate code around error handling.

pulkit accepted this revision.Jan 13 2020, 11:35 AM
This revision is now accepted and ready to land.Jan 13 2020, 11:35 AM
pulkit requested changes to this revision.Jan 13 2020, 11:41 AM

This one fails to apply with conflicts in Cargo.lock.

This revision now requires changes to proceed.Jan 13 2020, 11:41 AM
marmoute requested changes to this revision.Mar 19 2020, 7:04 PM
marmoute added a subscriber: marmoute.

Looks like there are unresolved discussion about error handling here.