Skip to content

Commit df3893f

Browse files
authored
transpile: remove git-testament dependency (for now) to remove time dependency to build on 1.80.0 (#1115)
* Fixes #1109. Our old nightly (1.65) pins `time-macros` to an old version, which requires `time` to stay on an old version. But since 1.80 broke `time` (due to time-rs/time#693 and rust-lang/rust#127343), we need to update `time`. Doing this requires `time-macros` to be upgraded, which requires at least rust 1.67. There's an old PR, #811, for this, but it needs rebasing. So for now, removing `git-testament` and its `time` dependency is simpler, and we can add it back later once we update to a newer nightly. With this fix, both `cargo build -p c2rust` (the pinned nightly) and `cargo +stable build -p c2rust` (1.80.1) now work. If this is good, and once we merge this, we'll release a new version with the fix.
2 parents d762adf + 1cac320 commit df3893f

File tree

3 files changed

+1
-65
lines changed

3 files changed

+1
-65
lines changed

Cargo.lock

-58
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

c2rust/Cargo.toml

-3
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,11 @@ azure-devops = { project = "immunant/c2rust", pipeline = "immunant.c2rust", buil
2020
anyhow = "1.0"
2121
clap = { version = "3.2.22", features = ["yaml", "cargo", "derive"] }
2222
env_logger = "0.10"
23-
git-testament = "0.2.1"
2423
is_executable = "1.0"
2524
log = "0.4"
2625
regex = "1.3"
2726
shlex = "1.3"
2827
c2rust-transpile = { version = "0.18.0", path = "../c2rust-transpile" }
29-
# Required to avoid too-new version (dep of git-testament) which our rustc cannot compile
30-
time-macros = "=0.2.6"
3128

3229
[build-dependencies]
3330
c2rust-build-paths = { path = "../c2rust-build-paths", version = "0.18.0" }

c2rust/src/main.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use anyhow::anyhow;
22
use clap::{crate_authors, App, AppSettings, Arg};
3-
use git_testament::{git_testament, render_testament};
43
use is_executable::IsExecutable;
54
use std::borrow::Cow;
65
use std::collections::HashMap;
@@ -11,8 +10,6 @@ use std::process;
1110
use std::process::Command;
1211
use std::str;
1312

14-
git_testament!(TESTAMENT);
15-
1613
/// A `c2rust` sub-command.
1714
struct SubCommand {
1815
/// The path to the [`SubCommand`]'s executable,
@@ -124,7 +121,7 @@ fn main() -> anyhow::Result<()> {
124121

125122
// If we didn't get a subcommand, then use `clap` for parsing and error/help messages.
126123
let matches = App::new("C2Rust")
127-
.version(&*render_testament!(TESTAMENT))
124+
.version(env!("CARGO_PKG_VERSION"))
128125
.author(crate_authors!(", "))
129126
.settings(&[AppSettings::SubcommandRequiredElseHelp])
130127
.subcommands(sub_commands.keys().map(|name| {

0 commit comments

Comments
 (0)