From 7295675f1302906af20e20a9ad2d77578d55b96e Mon Sep 17 00:00:00 2001 From: "g. nicholas d'andrea" Date: Mon, 9 Nov 2026 19:10:20 -0500 Subject: [PATCH] conformance: drop the solc resources stamp workaround solc now emits the `ethdebug` stamp on its resources object, so the solc tests validate its artifact as it is. Closes #311 --- packages/conformance/test/conformance.test.ts | 34 ++----------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/packages/conformance/test/conformance.test.ts b/packages/conformance/test/conformance.test.ts index cf584f150b..07484902c6 100644 --- a/packages/conformance/test/conformance.test.ts +++ b/packages/conformance/test/conformance.test.ts @@ -139,36 +139,6 @@ function resourcesWithVersion(version: string) { }; } -// Expected failure (#311): solc does not emit the stamp on its resources -// object yet. Until it does, the solc tests add the stamp to a copy of the -// artifact before they validate it, so the rest of resources is still -// checked. The check below fails once solc emits the stamp; then remove -// this function and validate the artifact as it is. -function withSolcResourcesStamp(artifact: EthdebugArtifact): EthdebugArtifact { - expect( - artifact.resources?.ethdebug, - "solc now emits the stamp on its resources object; " + - "remove withSolcResourcesStamp", - ).toBeUndefined(); - if (!artifact.resources) { - return artifact; - } - - const programVersion = artifact.programs.find( - ({ program }) => program.ethdebug, - )?.program.ethdebug?.version; - return { - ...artifact, - resources: { - ...artifact.resources, - ethdebug: { - schema: "ethdebug/format/info/resources", - version: programVersion ?? version, - }, - }, - }; -} - // Expected failure (#324): solc still writes the format's pointer // vocabulary with the old `$` sigil (`$sum`, `$wordsize`, `$this`, ...), // and the schemas now require `~`. Until solc emits `~`, the solc tests @@ -274,7 +244,7 @@ describe("@ethdebug/conformance", () => { }); const result = await validateStaticConformance( - withSolcTildeVocabulary(withSolcResourcesStamp(artifact)), + withSolcTildeVocabulary(artifact), ); expect(result.issues).toEqual([]); expect(result.ok).toBe(true); @@ -327,7 +297,7 @@ describe("@ethdebug/conformance", () => { ], }); const result = await validateStaticConformance( - withSolcTildeVocabulary(withSolcResourcesStamp(artifact)), + withSolcTildeVocabulary(artifact), ); expect(result.issues).toEqual([]); expect(result.ok).toBe(true);