diff --git a/crates/codegen/parser/runtime/Cargo.toml b/crates/codegen/parser/runtime/Cargo.toml index 7664a8ab5c..79565e84c4 100644 --- a/crates/codegen/parser/runtime/Cargo.toml +++ b/crates/codegen/parser/runtime/Cargo.toml @@ -22,7 +22,8 @@ strum_macros = { workspace = true } [features] default = ["slang_napi_interfaces"] slang_napi_interfaces = ["dep:napi", "dep:napi-derive", "dep:serde_json"] -ariadne = ["dep:ariadne"] +# Only used by the `slang_solidity` CLI +__private_ariadne = ["dep:ariadne"] [lints] workspace = true diff --git a/crates/codegen/parser/runtime/src/diagnostic.rs b/crates/codegen/parser/runtime/src/diagnostic.rs index f528c14f0c..6e5facf296 100644 --- a/crates/codegen/parser/runtime/src/diagnostic.rs +++ b/crates/codegen/parser/runtime/src/diagnostic.rs @@ -18,7 +18,7 @@ pub trait Diagnostic: Error { fn message(&self) -> String; } -#[cfg(feature = "ariadne")] +#[cfg(feature = "__private_ariadne")] pub fn render(error: &D, source_id: &str, source: &str, with_color: bool) -> String { use ariadne::{Color, Config, Label, Report, ReportKind, Source}; diff --git a/crates/solidity/outputs/cargo/slang_solidity/Cargo.toml b/crates/solidity/outputs/cargo/slang_solidity/Cargo.toml index 8a86ed4f37..b97ac13776 100644 --- a/crates/solidity/outputs/cargo/slang_solidity/Cargo.toml +++ b/crates/solidity/outputs/cargo/slang_solidity/Cargo.toml @@ -33,9 +33,9 @@ required-features = ["cli"] [features] default = ["cli"] -cli = ["dep:anyhow", "dep:clap", "dep:serde_json", "ariadne"] +cli = ["dep:anyhow", "dep:clap", "dep:serde_json", "__private_ariadne"] # This is meant to be used by the CLI or internally only. -ariadne = ["dep:ariadne"] +__private_ariadne = ["dep:ariadne"] [build-dependencies] # __REMOVE_THIS_LINE_DURING_CARGO_PUBLISH__ anyhow = { workspace = true } # __REMOVE_THIS_LINE_DURING_CARGO_PUBLISH__ diff --git a/crates/solidity/outputs/cargo/slang_solidity/src/generated/diagnostic.rs b/crates/solidity/outputs/cargo/slang_solidity/src/generated/diagnostic.rs index c6e4a42a97..999c05589f 100644 --- a/crates/solidity/outputs/cargo/slang_solidity/src/generated/diagnostic.rs +++ b/crates/solidity/outputs/cargo/slang_solidity/src/generated/diagnostic.rs @@ -20,7 +20,7 @@ pub trait Diagnostic: Error { fn message(&self) -> String; } -#[cfg(feature = "ariadne")] +#[cfg(feature = "__private_ariadne")] pub fn render(error: &D, source_id: &str, source: &str, with_color: bool) -> String { use ariadne::{Color, Config, Label, Report, ReportKind, Source}; diff --git a/crates/solidity/outputs/cargo/tests/Cargo.toml b/crates/solidity/outputs/cargo/tests/Cargo.toml index ab6ff5a7e8..d411646ff9 100644 --- a/crates/solidity/outputs/cargo/tests/Cargo.toml +++ b/crates/solidity/outputs/cargo/tests/Cargo.toml @@ -19,7 +19,7 @@ infra_utils = { workspace = true } once_cell = { workspace = true } regex = { workspace = true } semver = { workspace = true } -slang_solidity = { workspace = true } +slang_solidity = { workspace = true, features = ["__private_ariadne"] } solidity_language = { workspace = true } strum_macros = { workspace = true } diff --git a/crates/solidity/testing/sanctuary/Cargo.toml b/crates/solidity/testing/sanctuary/Cargo.toml index c1c2328a30..e5e831fd31 100644 --- a/crates/solidity/testing/sanctuary/Cargo.toml +++ b/crates/solidity/testing/sanctuary/Cargo.toml @@ -17,7 +17,7 @@ rayon = { workspace = true } semver = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } -slang_solidity = { workspace = true } +slang_solidity = { workspace = true, features = ["__private_ariadne"] } strum_macros = { workspace = true } url = { workspace = true } diff --git a/crates/testlang/outputs/cargo/slang_testlang/src/generated/diagnostic.rs b/crates/testlang/outputs/cargo/slang_testlang/src/generated/diagnostic.rs index c6e4a42a97..999c05589f 100644 --- a/crates/testlang/outputs/cargo/slang_testlang/src/generated/diagnostic.rs +++ b/crates/testlang/outputs/cargo/slang_testlang/src/generated/diagnostic.rs @@ -20,7 +20,7 @@ pub trait Diagnostic: Error { fn message(&self) -> String; } -#[cfg(feature = "ariadne")] +#[cfg(feature = "__private_ariadne")] pub fn render(error: &D, source_id: &str, source: &str, with_color: bool) -> String { use ariadne::{Color, Config, Label, Report, ReportKind, Source};