Skip to content

Preserve Solidity source units across nested imports - #121

Merged
markeljan merged 1 commit into
mainfrom
codex/preserve-solidity-source-units
Nov 15, 2026
Merged

markeljan merged 1 commit into
mainfrom
codex/preserve-solidity-source-units

Conversation

@markeljan

Copy link
Copy Markdown
Owner

Summary

  • Resolve each Solidity import to its source unit before rewriting the path literal. Nested files with the same basename no longer overwrite each other.
  • Keep ordinary local paths. Assign deterministic archive-safe names to remote sources and local paths that would conflict in the source bundle. Both deploy paths use those same names in the standard JSON sent for verification.
  • Preserve alias syntax, the entry point, remote allowlist, fallbacks, and the shared fetch budget.

Verification

  • The new regression runs the actual compile path with bundled solc 0.8.38. On ae47647 the optimizer emitted a return value of 202. The patch emits 102, matching the reference contract after removing CBOR metadata.
  • Additional coverage checks relative and direct source names, all import forms, URL-keyed local overrides, npm and GitHub resolution, fallback behavior, path conflicts, and the shared remote fetch limit.
  • Bun 1.4.2 typecheck, all 317 tests, and changed-file lint passed. Full local lint flagged an existing condition in app/chat/[id]/page.tsx. Hosted CI runs the frozen install and full lint.
  • Verification was offline with bundled solc and fixture imports. Live deployment and explorer verification are outside this compiler check.

Keep distinct resolved imports in the compiler and artifact source maps so nested files sharing a basename cannot overwrite each other.
@vercel

vercel Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
web3gpt Ready Ready Preview Nov 15, 2026 3:30pm UTC

Request Review

@markeljan
markeljan marked this pull request as ready for review November 15, 2026 15:34
@markeljan
markeljan merged commit 586cfb2 into main Nov 15, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Preview — 7bd195a7 Deployed Nov 15, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant