Mercurial > hg
changeset 44476:df5dfee8cfb4 stable
hg-core: add a compilation error if trying to compile outside of Linux
For now, we can only provide support for Linux in `hg-core`, so we have to be
explicit about it in case anyone wonders why their Dirstate is suddenly broken,
or why the crate does not compile (on Windows for example).
Differential Revision: https://phab.mercurial-scm.org/D8246
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Fri, 06 Mar 2020 10:38:37 +0100 |
parents | b7ca03dff14c |
children | daf083140b5b |
files | rust/hg-core/src/lib.rs |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/rust/hg-core/src/lib.rs Tue Mar 10 18:54:44 2020 +0100 +++ b/rust/hg-core/src/lib.rs Fri Mar 06 10:38:37 2020 +0100 @@ -23,6 +23,14 @@ pub use revlog::*; pub mod utils; +// Remove this to see (potential) non-artificial compile failures. MacOS +// *should* compile, but fail to compile tests for example as of 2020-03-06 +#[cfg(not(target_os = "linux"))] +compile_error!( + "`hg-core` has only been tested on Linux and will most \ + likely not behave correctly on other platforms." +); + use crate::utils::hg_path::HgPathBuf; pub use filepatterns::{ build_single_regex, read_pattern_file, PatternSyntax, PatternTuple,