Skip to content

v3: make V3 the default compiler on macOS and expand compatibility - #28007

Merged
medvednikov merged 101 commits into
masterfrom
agent/v3-default-macos-progress
Aug 3, 2026
Merged

v3: make V3 the default compiler on macOS and expand compatibility#28007
medvednikov merged 101 commits into
masterfrom
agent/v3-default-macos-progress

Conversation

@medvednikov

Copy link
Copy Markdown
Member

Summary

  • make the V3 compiler in vlib/v3 the default for macOS user compilation and test commands
  • keep -old-compiler as the explicit V1 escape hatch and remove automatic fallback after V3 errors
  • expand V3 parser, checker, transformer, mark-used, driver, C codegen, and WASM compatibility
  • add regression coverage for arrays, constants, generics, interfaces, sum types, pointers, closures, diagnostics, test execution, and CLI behavior
  • integrate the current master V3 changes and checker split

Why

The macOS default can only move to V3 if ordinary programs are handled by V3 directly and failures are reported without silently retrying with V1. This branch advances the V3 passing manifest and fills compatibility gaps found while compiling the existing V test suite.

Impact

On macOS, supported user builds and tests now use V3 by default. Users can still select V1 explicitly with -old-compiler. Compiler failures stay within V3 and preserve V3 diagnostics.

This is a progress PR and is intentionally left as a draft.

Validation

Passed locally on macOS:

  • rebuilt ./vnew from the merged compiler sources with the old compiler bootstrap path
  • git diff --check
  • ./vnew -nocache cmd/v/macos_v3_test.v
  • ./vnew -nocache vlib/v3/tests/aoc_compat_codegen_test.v
  • ./vnew -nocache vlib/v/tests/failing_tests_test.v
  • ./vnew -nocache vlib/v/tests/consts/const_referencing_each_other_inside_anon_fns_test.v
  • ./vnew -nocache vlib/v/tests/consts/const_array_fixed_test.v
  • ./vnew -nocache vlib/v/tests/consts/const_fixed_array_containing_references_to_itself_test.v

Known incomplete validation/compatibility:

  • the 3,016-entry V3 passing manifest has only been exercised through entry 1,616 so far
  • vlib/v3/tests/mut_param_reassign_codegen_test.v still fails because mutable string parameters are rejected
  • runtime integer division/modulo-by-zero diagnostics and comptime enum function calls still need compatibility work
  • the full compiler error, vlib/v/, inout, and C output suites have not yet been completed on this branch

Loading
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