Skip to content

Reject compiler dry-run plans for a different explicitly requested target #165

Closed

Description

@LunaStev

Audited against merged master 13289d7a74ad45561554bbb6673a189dbb192a27 (PR #161).

Problem and reproduction

Vex checks that an explicit target appears in the compiler's supported-target list, but does not compare that request with the returned dry-run plan's target.

Reproduced with a compiler fixture advertising both Linux and Windows targets while always returning a structurally valid Linux plan:

vex build --target=x86_64-pc-windows-msvc --dry-run

Observed: exit 0 and JSON with "target": "x86_64-unknown-linux-gnu". This can conceal a compiler/adapter target-selection error.

Scope and acceptance

  • Validate an explicit supported target against the returned plan before accepting or executing it.
  • If the compiler uses documented equivalent aliases, compare their canonical target identity; the Linux-versus-Windows case must be rejected.
  • Report requested and returned targets as a compiler-contract error (exit 4).
  • Test mismatching and matching plans, both CLI target syntaxes, and an invocation without an explicit target.
  • Reuse the check in doctor where it validates an explicitly targeted plan. Do not redesign target discovery or infer a target merely from the host's Rust triple.

Use fake compiler fixtures so the negative case needs no cross compiler.

Starting points

This is a bounded follow-up suitable for a first contribution; no broader feature redesign is requested.

Activity

  1. added
    bug
    good first issue
    build
    wave compatibility
    on Oct 18, 2026
  2. self-assigned this
    on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugbuildgood first issuewave compatibility

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions