Skip to content

Commit

Permalink
fix: add warnings to DebugArtifact
Browse files Browse the repository at this point in the history
  • Loading branch information
alexghr committed Oct 30, 2023
1 parent 852273c commit 8cb4aba
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions compiler/wasm/src/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export type CompiledProgram = {
export type DebugArtifact = {
debug_symbols: Array<any>;
file_map: Record<number, any>;
warnings: Array<any>;
};
export type CompileResult = (
Expand Down Expand Up @@ -232,8 +233,11 @@ fn add_noir_lib(context: &mut Context, library_name: &CrateName) -> CrateId {
}

fn preprocess_program(program: CompiledProgram) -> CompileResult {
let debug_artifact =
DebugArtifact { debug_symbols: vec![program.debug], file_map: program.file_map };
let debug_artifact = DebugArtifact {
debug_symbols: vec![program.debug],
file_map: program.file_map,
warnings: program.warnings,
};

let preprocessed_program = PreprocessedProgram {
hash: program.hash,
Expand All @@ -250,6 +254,7 @@ fn preprocess_contract(contract: CompiledContract) -> CompileResult {
let debug_artifact = DebugArtifact {
debug_symbols: contract.functions.iter().map(|function| function.debug.clone()).collect(),
file_map: contract.file_map,
warnings: contract.warnings,
};
let preprocessed_functions = contract
.functions
Expand Down

0 comments on commit 8cb4aba

Please sign in to comment.