Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(cli)!: remove deprecations #1777

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions hugr-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ pub mod extensions;
pub mod mermaid;
pub mod validate;

// TODO: Deprecated re-export. Remove on a breaking release.
#[doc(inline)]
#[deprecated(since = "0.13.2", note = "Use `hugr::package::Package` instead.")]
pub use hugr::package::Package;
use hugr::package::Package;

/// CLI arguments.
#[derive(Parser, Debug)]
Expand Down Expand Up @@ -135,19 +132,6 @@ impl HugrArgs {
}
}
}

/// Read either a package from the input.
///
/// deprecated: use [HugrArgs::get_package_or_hugr] instead.
#[deprecated(
since = "0.13.2",
note = "Use `HugrArgs::get_package_or_hugr` instead."
)]
pub fn get_package(&mut self) -> Result<Package, CliError> {
let val: serde_json::Value = serde_json::from_reader(&mut self.input)?;
let pkg = serde_json::from_value::<Package>(val.clone())?;
Ok(pkg)
}
}

/// Load a package or hugr from a seekable input.
Expand Down
3 changes: 2 additions & 1 deletion hugr-cli/tests/validate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use assert_cmd::Command;
use assert_fs::{fixture::FileWriteStr, NamedTempFile};
use hugr::builder::{DFGBuilder, DataflowSubContainer, ModuleBuilder};
use hugr::package::Package;
use hugr::types::Type;
use hugr::{
builder::{Container, Dataflow},
Expand All @@ -15,7 +16,7 @@ use hugr::{
types::Signature,
Hugr,
};
use hugr_cli::{validate::VALID_PRINT, Package};
use hugr_cli::validate::VALID_PRINT;
use predicates::{prelude::*, str::contains};
use rstest::{fixture, rstest};

Expand Down
Loading