D7503: rust-dirs: address failing tests for `dirs` impl with a temporary fix

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Wed Nov 27 08:30:51 EST 2019


yuja added a comment.


  >   > I generally prefer adding safety checks at ABI boundary. If malicious input
  >   > makes Rust code crash or exhaust CPU/memory resource, I would add sanity
  >   > check to rust-cpython layer.
  >   Sure, that makes sense in our configuration, but we need to consider `hg-core` as its own standalone library when making decisions like this.
  
  Okay, then using non-debug `assert!()` seems more appropriate. If we prefer
  being stricter, "checked" HgPath type can be introduced.
  
  > Either the `Dirs` / `dirs` API has changed to this new behavior (which I'm not super happy about), either we revert the changes proposed by Augie with a change in the fuzzer instead.
  >
  >   Sorry for the warnings, I'll send a follow-up, I've been caught up in another project.
  
  Actually I tried to suppress these warnings by propagating Result upwards,
  and I got a feeling that we're doing wrong.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7503/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7503

To: Alphare, #hg-reviewers
Cc: yuja, marmoute, durin42, kevincox, mercurial-devel


More information about the Mercurial-devel mailing list