mirror of
https://github.com/pezkuwichain/revive-differential-tests.git
synced 2026-06-12 05:21:14 +00:00
Move Mode to common crate
This commit is contained in:
@@ -20,7 +20,7 @@ use revive_dt_common::types::VersionOrRequirement;
|
||||
use revive_dt_config::Arguments;
|
||||
|
||||
// Re-export this as it's a part of the compiler interface.
|
||||
pub use revive_dt_format::mode::{Mode, ModeOptimizerSetting, ModePipeline};
|
||||
pub use revive_dt_common::types::{Mode, ModeOptimizerSetting, ModePipeline};
|
||||
|
||||
pub mod revive_js;
|
||||
pub mod revive_resolc;
|
||||
|
||||
@@ -39,7 +39,6 @@ impl SolidityCompiler for Resolc {
|
||||
async fn build(
|
||||
&self,
|
||||
CompilerInput {
|
||||
// Ignored as we only support one pipeline (Y)
|
||||
pipeline,
|
||||
optimization,
|
||||
evm_version,
|
||||
@@ -53,6 +52,10 @@ impl SolidityCompiler for Resolc {
|
||||
}: CompilerInput,
|
||||
additional_options: Self::Options,
|
||||
) -> anyhow::Result<CompilerOutput> {
|
||||
if !matches!(pipeline, None | Some(ModePipeline::Y)) {
|
||||
anyhow::bail!("Resolc only supports the Y (via Yul IR) pipeline, but the provided pipeline is {pipeline:?}");
|
||||
}
|
||||
|
||||
let input = SolcStandardJsonInput {
|
||||
language: SolcStandardJsonInputLanguage::Solidity,
|
||||
sources: sources
|
||||
|
||||
Reference in New Issue
Block a user