Skip to content

Commit ec939b6

Browse files
committed
Test base64ct patch for Anchor
1 parent 42d007b commit ec939b6

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

template/anchor/base/program/Cargo.toml.njk

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,3 @@ idl-build = ["anchor-lang/idl-build"]
2222
[dependencies]
2323
anchor-lang = "{{ anchorVersion.full }}"
2424
solana-program = "~{{ solanaVersion.withoutPatch }}"
25-
26-
[patch.crates-io]
27-
base64ct = "1.7.3"

utils/solanaCli.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,21 @@ import {
99
import { VersionWithoutPatch } from './versionCore';
1010

1111
export async function patchSolanaDependencies(
12-
ctx: Pick<RenderContext, 'solanaVersion' | 'targetDirectory'>
12+
ctx: Pick<
13+
RenderContext,
14+
'solanaVersion' | 'targetDirectory' | 'programFramework'
15+
>
1316
): Promise<void> {
1417
const patchMap: Record<VersionWithoutPatch, string[]> = {
1518
'1.17': ['-p [email protected] --precise 0.8.6'],
1619
};
1720

1821
const patches = patchMap[ctx.solanaVersion.withoutPatch] ?? [];
22+
23+
if (ctx.programFramework === 'anchor') {
24+
patches.push('-p [email protected] --precise 1.7.3');
25+
}
26+
1927
await Promise.all(
2028
patches.map(async (patch) =>
2129
waitForCommand(

0 commit comments

Comments
 (0)