Skip to content

Commit

Permalink
chore: remove "non-core artifact" nargo generated files (#3026)
Browse files Browse the repository at this point in the history
Fixes #2977
  • Loading branch information
benesjan authored Oct 25, 2023
1 parent 0769d20 commit 03ebb8e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,5 +234,5 @@ describe('e2e_cross_chain_messaging', () => {
).rejects.toThrowError(
"Failed to solve brillig function, reason: explicit trap hit in brillig 'l1_to_l2_message_data.message.content == content'",
);
});
}, 50_000);
});
4 changes: 3 additions & 1 deletion yarn-project/noir-compiler/src/compile/nargo.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { LogFn, createDebugLogger } from '@aztec/foundation/log';

import { execSync } from 'child_process';
import { readFileSync, readdirSync, statSync } from 'fs';
import { readFileSync, readdirSync, statSync, unlinkSync } from 'fs';
import { emptyDirSync } from 'fs-extra';
import path from 'path';

Expand Down Expand Up @@ -66,6 +66,8 @@ export class NargoContractCompiler {
} else {
contractArtifacts.set(filename, JSON.parse(readFileSync(file).toString()) as NoirCompiledContract);
}
// Delete the file as it is not needed anymore and it can cause issues with prettier
unlinkSync(file);
}
}

Expand Down
5 changes: 4 additions & 1 deletion yarn-project/noir-contracts/scripts/types_all.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/bin/bash
# Run the types script for all files
./scripts/types.sh $(./scripts/get_all_contracts.sh)
./scripts/types.sh $(./scripts/get_all_contracts.sh)

# Remove the debug files as they are no longer needed and can cause prettier and build issues
rm -r ./target/debug*

0 comments on commit 03ebb8e

Please sign in to comment.