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

Yuya Nishihara yuya at tcha.org
Wed Nov 27 08:29:13 EST 2019


>   > 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.


More information about the Mercurial-devel mailing list