Skip to content

Pin tree-sitter-m to release wheels (Track C2 / Tier 3)#6

Merged
rafael5 merged 1 commit into
mainfrom
feat/track-c2-wheel-pin
May 9, 2026
Merged

Pin tree-sitter-m to release wheels (Track C2 / Tier 3)#6
rafael5 merged 1 commit into
mainfrom
feat/track-c2-wheel-pin

Conversation

@rafael5
Copy link
Copy Markdown
Collaborator

@rafael5 rafael5 commented May 9, 2026

Summary

  • Replace [tool.uv.sources] tree-sitter-m = { path = "../tree-sitter-m", editable = true } with four per-platform release-wheel URLs from tree-sitter-m@v0.1.1, routed by sys_platform / platform_machine markers.
  • Add [tool.uv] environments = [...] restricting the universal lock to the four supported platforms (linux x64/arm64, macos arm64, windows x64) so uv doesn't fail on Linux i686 / Intel macOS / ARM Windows / etc.
  • Refresh uv.lock accordingly.

Closes Track C / step C2 in m-dev-tools-todo.md. Fresh-clone of m-cli on a Docker-equipped machine no longer needs a sibling tree-sitter-m/ checkout to install — the "self-contained" sprint bar (Tracks A + B + C) is now fully cleared.

Why

Track C of the org self-containment sprint replaced the path-dep on a sibling tree-sitter-m checkout with URL pins to GitHub-Release wheels. C1 (cibuildwheel job in prebuilds.yml) shipped earlier today; v0.1.1 is the first release whose attach-to-release produced and uploaded all platform wheels. This PR is the consumer-side flip.

Verification (local)

  • uv sync --frozen --extra dev — 0 source changes; lockfile reproduces with no resolver invocations.
  • uv sync --extra dev — installs tree-sitter-m==0.1.1 from the GitHub release wheel URL, not the sibling editable checkout.
  • ✅ Parser smoke test — Parser(Language(tree_sitter_m.language())) parses TEST ;sample / S X=1 / W X,! / Q cleanly (root.type='source_file', root.has_error=False).
  • make test — 1310 pass / 1 skip / 1 fail. The single failure (test_lint_profiles.py::TestPedanticSplit::test_default_no_longer_aliases_xindex) reproduces with the editable path-dep too — pre-existing on main, unrelated to this PR.

Notes

  • Each inline-table entry is on a single line. TOML spec forbids newlines inside { ... } and stdlib tomllib (used by setuptools at editable-build time) rejects the multi-line form even though uv's lenient parser accepts it.
  • The longer manylinux compat-tag filename (manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl for Linux x86_64) is what cibuildwheel actually emits; the tree-sitter-m/RELEASE.md §5.5 template understated it.
  • musl Linux (Alpine) is not pinned. Alpine devs would need a separate override or build from source. Not a regression vs. the previous path-dep.

Test plan

  • CI green (or pre-existing-only failures) on this PR.
  • Merge.
  • Optional cross-platform sanity: confirm one teammate or CI on macos-arm64 / windows-x64 successfully uv syncs after pulling main.

🤖 Generated with Claude Code

Replaces the sibling-checkout path-dep with a per-platform
[tool.uv.sources] block pointing at the cp310-abi3 wheels attached
to tree-sitter-m's v0.1.1 GitHub Release. Four URLs cover the
tree-sitter-m wheel matrix (linux x64/arm64, macos arm64, windows
x64) routed by sys_platform / platform_machine markers.

Adds [tool.uv].environments restricting universal lock resolution
to those four platforms — without it, uv tries to resolve for
Linux i686/ppc64le/s390x/Intel-macOS/ARM-Windows/etc and fails
because no URL covers them.

Each inline-table entry stays on a single line: TOML spec forbids
newlines inside `{ ... }` and stdlib tomllib (used by setuptools
during the editable build) rejects the multi-line form even though
uv's lenient parser accepts it.

Verification:
- `uv sync --frozen --extra dev` — 0 source changes, 35 packages.
- `uv sync --extra dev` reports `tree-sitter-m==0.1.1 from
  https://github.com/m-dev-tools/.../tree_sitter_m-...whl` (not
  the sibling editable install).
- Parser smoke test (Parser(Language(tree_sitter_m.language()))
  parses 'TEST ;sample / S X=1 / W X,! / Q') returns
  root.type='source_file', root.has_error=False.
- `make test`: 1310 pass, 1 pre-existing fail (test_lint_profiles
  TestPedanticSplit::test_default_no_longer_aliases_xindex —
  reproduces with the editable path-dep too, unrelated to this
  change), 1 skip.

Closes Track C / step C2 in m-dev-tools-todo.md. Fresh-clone of
m-cli on a Docker-equipped machine no longer needs a sibling
tree-sitter-m checkout to install — the "self-contained" sprint
bar is now fully cleared.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rafael5 rafael5 merged commit 9a04995 into main May 9, 2026
1 check failed
rafael5 added a commit that referenced this pull request May 11, 2026
m-standard merged the docs/integrated/ → integrated/ relocation
(m-standard PR #6), so the `("", "docs")` compatibility walk in
_find_m_standard() is dead code against any fresh m-standard checkout.

Simplification — three lines net:
- one-loop walk over repo candidates
- direct `repo / "integrated"` probe
- docstring trimmed of the layout-shift rationale

Verified with the keyword + doctor + LSP symbol tests (46 passed).
rafael5 added a commit that referenced this pull request May 11, 2026
Closes followup #14 (runtime YDB-version drift) and stages 4b.1+4b.2
of the m-engine plan. Coordinated with m-test-engine commit 1e7a4cc
(Phase 4a: docker/mte introspection script).

* engine_driver.py
  - `DockerDriver.mte_status()` — shells out to `docker exec <container>
    mte status --json`; returns parsed dict or None (graceful on
    non-zero rc, garbage output, container down).
  - `EngineStatus.mte: dict | None` (default None). `to_dict()`
    serialises it.
  - `DockerDriver.status(*, verbose=False)` — verbose=True populates
    `mte` and adds `runtime_ydb_version_drift` to mismatches when
    `mte["release"]` != `manifest.ydb_version`. De-duped against the
    static-label `ydb_version_drift` from Phase 3b.
  - Protocol grew `mte_status()` and the `verbose` kwarg on `status()`.

* engine_cli.py
  - `m engine status --verbose / -v` flag wired; text output gains an
    "inside container (mte):" block with release/uptime/globals/
    routines/mounted_repos. `--json` output gets the mte block via
    EngineStatus.to_dict().
  - `m engine watch` (new) — long-running poll of `mte_status()`;
    emits one JSON-lines record per poll with `ts` wall-clock
    timestamp. `--interval` (default 5s, min 0.1) controls cadence;
    `--count N` caps the loop (`0` = until SIGINT). KeyboardInterrupt
    → clean exit rc 0.
  - `m engine capabilities` payload advertises `watch` as
    read_only:true.

* tests/test_engine_driver.py — 8 new tests for mte_status() (parse /
  None on bad rc / None on garbage), status verbose folding, drift
  detection, non-verbose skip, container-down skip.

* tests/test_engine_cli.py — 5 new tests for --verbose pass-through,
  text/JSON rendering, watch JSON-lines + error-line behaviour.

* tests/test_doctor.py — single drive-by fix to
  `test_doctor_cli_exits_one_when_any_fail`: monkeypatch
  `docker_available` → False so the existing demote-when-engine-OK
  path (a separate prior addition implementing followup #6) doesn't
  override the test's expected `ydb_dist=FAIL` on hosts where docker
  is healthy. Preserves the test's original intent without depending
  on the local environment.

Full suite 1471 passing / 1 skipped (was 1453); ruff + mypy clean.
Live `m engine status --verbose` on this host correctly detected
`runtime_ydb_version_drift` because the running image is V7.1-002
(yottadb-base:latest-master tip) while the manifest declares
`ydb_version: "r2.02"`. `m engine watch --interval 0.2 --count 2`
emitted 2 valid JSON-lines records.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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