From ecd2a64a517e34ada4770d26e6d7f9c578ee82aa Mon Sep 17 00:00:00 2001 From: Dan Lee <142251406+dan-aztec@users.noreply.github.com> Date: Fri, 13 Oct 2023 05:57:32 -0700 Subject: [PATCH] fix: copied box nargo toml trailing slash (#2819) missed this in previous update to make box buildable in monorepo(?) double checking if correct or not, https://aztecprotocol.slack.com/archives/C8QHBFVSA/p1695119518355949?thread_ts=1695039245.640269&cid=C8QHBFVSA --- yarn-project/cli/src/index.ts | 5 ++++- yarn-project/cli/src/unbox.ts | 7 ++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/yarn-project/cli/src/index.ts b/yarn-project/cli/src/index.ts index 3b164760ddf..5fe1099d6bd 100644 --- a/yarn-project/cli/src/index.ts +++ b/yarn-project/cli/src/index.ts @@ -572,7 +572,10 @@ export function getProgram(log: LogFn, debugLogger: DebugLogger): Command { 'Unboxes an example contract from @aztec/boxes. Also Copies `noir-libs` dependencies and setup simple frontend for the contract using its ABI.', ) .argument('', 'Name of the contract to unbox, e.g. "PrivateToken"') - .argument('[localDirectory]', 'Local directory to unbox to (relative or absolute), defaults to ``') + .argument( + '[localDirectory]', + 'Local directory to unbox source folder to (relative or absolute), optional - defaults to `/`', + ) .action(async (contractName, localDirectory) => { const unboxTo: string = localDirectory ? localDirectory : contractName; await unboxContract(contractName, unboxTo, version, log); diff --git a/yarn-project/cli/src/unbox.ts b/yarn-project/cli/src/unbox.ts index c3dd5359469..ada3918b6a4 100644 --- a/yarn-project/cli/src/unbox.ts +++ b/yarn-project/cli/src/unbox.ts @@ -103,7 +103,7 @@ async function downloadContractAndBoxFromGithub( // small string conversion, in the ABI the contract name looks like PrivateToken // but in the repostory it looks like private_token - log(`Downloading @aztex/boxes/${contractName}/ to ${outputPath}...`); + log(`Downloading @aztec/boxes/${contractName}/ to ${outputPath}...`); // Step 1: Fetch the monorepo ZIP from GitHub, matching the CLI version const url = `https://github.com/${GITHUB_OWNER}/${GITHUB_REPO}/archive/refs/tags/${tag}.zip`; const response = await fetch(url); @@ -176,8 +176,9 @@ async function updateNargoToml(tag: string, outputPath: string, log: LogFn): Pro line.trim().startsWith(`${dependencyName} =`), ); if (key) { - // Replace the line - return `${key} = { git="https://github.com/AztecProtocol/aztec-packages", tag="${tag}", directory="yarn-project/aztec-nr/${key}" }`; + // Replace the line, which was configured for compiling within the `aztec-packages` monorepo. We replace + // the local path with `git` and `directory` fields with a `tag` field, which points to the tagged release + return `${key} = { git="https://github.com/AztecProtocol/aztec-packages/", tag="${tag}", directory="yarn-project/aztec-nr/${key}" }`; } return line; });