Skip to content

[mandrel-ops] upstream-mark: Infer --version from suite.py when not explicitly provided #527

Description

@zakkak

As noted in #520 (comment), the --version flag in upstream-mark could be inferred from the local repository's suite.py files.

At the point upstream-mark runs, suite.py already contains the target version (with release: False) — the command only flips release to True. So the version string is already available locally without needing the user to pass it.

There is already a version-extraction pattern in SuiteOpsUtils.inferOpenMilestone() (using VERSION_PATTERN against compiler/mx.compiler/suite.py) that could be reused.

Proposed change:

  • Make --version optional in upstream-mark
  • When omitted, read the version from compiler/mx.compiler/suite.py in --dir and print it (e.g., "Auto-inferred version from suite.py: 23.1.11")
  • Fail with a clear error if the version cannot be determined and --version was not provided

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions