Skip to content

Commit

Permalink
transpile: remove git-testament dependency (for now) to remove `tim…
Browse files Browse the repository at this point in the history
…e` dependency to build on 1.80.0

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.
  • Loading branch information
kkysen committed Aug 28, 2024
1 parent d762adf commit 1cac320
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 65 deletions.
58 changes: 0 additions & 58 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions c2rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,11 @@ azure-devops = { project = "immunant/c2rust", pipeline = "immunant.c2rust", buil
anyhow = "1.0"
clap = { version = "3.2.22", features = ["yaml", "cargo", "derive"] }
env_logger = "0.10"
git-testament = "0.2.1"
is_executable = "1.0"
log = "0.4"
regex = "1.3"
shlex = "1.3"
c2rust-transpile = { version = "0.18.0", path = "../c2rust-transpile" }
# Required to avoid too-new version (dep of git-testament) which our rustc cannot compile
time-macros = "=0.2.6"

[build-dependencies]
c2rust-build-paths = { path = "../c2rust-build-paths", version = "0.18.0" }
Expand Down
5 changes: 1 addition & 4 deletions c2rust/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use anyhow::anyhow;
use clap::{crate_authors, App, AppSettings, Arg};
use git_testament::{git_testament, render_testament};
use is_executable::IsExecutable;
use std::borrow::Cow;
use std::collections::HashMap;
Expand All @@ -11,8 +10,6 @@ use std::process;
use std::process::Command;
use std::str;

git_testament!(TESTAMENT);

/// A `c2rust` sub-command.
struct SubCommand {
/// The path to the [`SubCommand`]'s executable,
Expand Down Expand Up @@ -124,7 +121,7 @@ fn main() -> anyhow::Result<()> {

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

0 comments on commit 1cac320

Please sign in to comment.