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

chore: remove "non-core artifact" nargo generated files #3026

Merged
merged 6 commits into from
Oct 25, 2023
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
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*