Skip to content

feat(tools): share package definitions across feature setup and Bazel - #201

Open
AlexanderLanin wants to merge 1 commit into
eclipse-score:mainfrom
etas-contrib:refactor/shared-provider-definitions
Open

AlexanderLanin wants to merge 1 commit into
eclipse-score:mainfrom
etas-contrib:refactor/shared-provider-definitions

Conversation

@AlexanderLanin

Copy link
Copy Markdown
Member

Why

Maintainers currently have to follow two feature-specific YAML files and a separate Python catalog to find package versions. Feature setup also downloads yq just to read those files. Keep Python/npm package definitions, APT policies and special setup metadata together in tools/providers.json, while retaining the existing native release lockfiles.

The feature scripts and their tests read quoted metadata through the existing Python installer. Bazel derives its Python package data from the same JSON and exposes basedpyright and pytest alongside pre-commit, using the existing pins. The current package choices and installation locations are retained.

🦬🪒 Yak shaving

  • Remove the replaced YAML/Python definitions, yq loader and obsolete YAML Renovate entries; native lockfile update rules remain.
  • Preserve Debian epochs in APT constraints while comparing executable versions without the epoch prefix.
  • Remove the unused macOS CodeQL checksum and unreachable macOS branch from Linux feature setup; Linux ARM64 continues to skip CodeQL.

Package-definition extraction from #198, based directly on main and independent of #200. Environment selections and the new installation lifecycle remain in #198. Part of #190; builds on #196.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the shared package-metadata consolidation.

No open issues 🎉

What changed in this PR

Consolidates package definitions in tools/providers.json so DevContainer features and Bazel share metadata while native releases retain their existing lockfiles. This extracts the package-definition work from #198 without introducing environment selections or the new installation lifecycle.

Changes:

  • Replace feature YAML files and the Python catalog with shared JSON, removing the yq loader.
  • Generate Bazel’s Python catalog from JSON and expose basedpyright and pytest alongside pre-commit.
  • Add metadata regression coverage, preserve APT epochs, and remove unreachable macOS CodeQL handling.
File Description
tools/​tests/​python_tool_runner_test.sh Compare generated Bazel metadata with shared JSON.
tools/​tests/​metadata_test.py Check metadata completeness and safe shell quoting.
tools/​tests/​catalog_test.py Adapt catalog validation tests to JSON.
tools/​README.md Add basedpyright and pytest to the tool table.
tools/​python_tool.bzl Create targets from the generated Python catalog.
tools/​providers.json Centralize package definitions and setup metadata.
tools/​lockfiles/​python_tools.bzl Remove the replaced Python catalog.
tools/​internal/​README.md Document shared definitions and delivery paths.
tools/​internal/​devcontainer/​load_feature_versions.sh Remove the yq-based metadata loader.
tools/​internal/​devcontainer/​install.py Export shell-quoted metadata from shared definitions.
tools/​internal/​catalog.py Read and validate provider definitions.
tools/​catalog_repository.bzl Generate loadable Starlark metadata from JSON.
tools/​BUILD.bazel Export definitions, expose Python tools, and wire test data.
src/​s-core-devcontainer/​.devcontainer/​s-core-local/​versions.yaml Remove migrated feature definitions.
src/​s-core-devcontainer/​.devcontainer/​s-core-local/​tests/​test_default.sh Use shared metadata and strip epochs in version checks.
src/​s-core-devcontainer/​.devcontainer/​s-core-local/​install.sh Use shared metadata and simplify Linux CodeQL handling.
src/​s-core-devcontainer/​.devcontainer/​bazel-feature/​versions.yaml Remove migrated Bazel feature definitions.
src/​s-core-devcontainer/​.devcontainer/​bazel-feature/​tests/​test_default.sh Read expected versions through the installer.
src/​s-core-devcontainer/​.devcontainer/​bazel-feature/​install.sh Replace YAML loading with shared metadata exports.
REUSE.toml Add license coverage for provider JSON.
MODULE.bazel Register the generated catalog repository.
.pre-commit-config.yaml Watch provider JSON for README regeneration.
.github/​renovate.json5 Remove obsolete YAML update rules.

Review effort: Balanced

@AlexanderLanin
AlexanderLanin marked this pull request as ready for review November 4, 2026 13:30
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.

2 participants