Skip to content

fix: use target-bounded source validation compiler#4

Merged
banteg merged 2 commits into
masterfrom
feat/source-validation-compiler
Jul 1, 2026
Merged

fix: use target-bounded source validation compiler#4
banteg merged 2 commits into
masterfrom
feat/source-validation-compiler

Conversation

@banteg

@banteg banteg commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes #3.

Broad source pragmas now keep two separate concepts:

  • rule gating still uses the oldest satisfying compiler, so historical migrations remain enabled
  • source validation uses the newest known compiler satisfying the source pragma and no newer than the requested target

The per-file report now records the original source version spec and resolved source compiler, and human output labels source compilation with the resolved compiler when known.

Validation

  • uv run --locked ruff check src tests scripts/corpus.py scripts/release_notes.py
  • uv run --locked pytest
  • scripts/smoke-wheel.sh
  • Fetched vyperlang/vyper examples/tokens/ERC20.vy and ran uv run --locked vyupgrade --check /tmp/vyupgrade-ERC20.vy --report-json /tmp/vyupgrade-erc20-report.json

ERC20 result: only VY001, source compile used 0.4.3, target compile passed, ABI/method IDs/storage layout unchanged, and no diagnostics.

@banteg banteg marked this pull request as ready for review July 1, 2026 17:31
@banteg banteg merged commit b3090f2 into master Jul 1, 2026
3 checks passed
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.

Source-version inference picks too-old compiler for Vyper ERC20 example

1 participant