Skip to main content

add-workspace-member

Add or remove an explicit Cargo workspace member in Torrust Tracker. Use when editing the root workspace members list, adding a developer-tool crate, registering a new standalone workspace package, or deciding whether a package is tested inside the container image.

소스 정보

저장소
torrust/torrust-tracker
최근 소스 활동
2026년 9월 30일 11:45
감지된 SKILL.md 언어
영어
스타
536
포크
58

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
add-workspace-member
description
Add or remove an explicit Cargo workspace member in Torrust Tracker. Use when editing the root workspace members list, adding a developer-tool crate, registering a new standalone workspace package, or deciding whether a package is tested inside the container image.
metadata
{"author":"torrust","version":"2.0"}
semantic-links
{"related-artifacts":["Cargo.toml","Containerfile",".dockerignore",".github/skills/dev/maintenance/add-rust-dependency/SKILL.md","docs/adrs/20260929183441_build_container_from_positive_lists_with_external_only_dependency_cache.md"]}
# Add a Cargo Workspace Member Use this workflow when changing the root `Cargo.toml` `[workspace]` section. Every in-repo crate is listed explicitly in `members`, including crates reachable as path dependencies, because the cargo-chef `--external-only` skeleton strips path dependencies and would otherwise lose them. The container build derives packages and targets from Cargo (see the [positive-list container build ADR](../../../../../docs/adrs/20260929183441_build_container_from_positive_lists_with_external_only_dependency_cache.md)). Do not edit the `Containerfile` for a package change; it contains no per-package lists. ## Required Review 1. Add or remove the crate path in root `Cargo.toml` `[workspace].members`. 2. Decide whether the crate is tested inside the container image and update `[workspace].default-members` accordingly. This is the only positive list for container test archives; `cargo nextest archive` runs without `--workspace` in the `Containerfile`. - Product crates (root crate and `packages/*` that are part of the tracker or its tests) are default members. - Tracker verification tools (CLI clients, benchmarks, host-only E2E runners) and AI-harness tools are members but **not** default members. 3. Make the crate reachable in the Docker build context. `.dockerignore` is a default-deny allow-list; `cargo chef prepare` runs `cargo metadata`, which aborts if any member's manifest or declared target file is missing. - Crates under `packages/`, `console/`, `src/`, or `tests/` are already admitted. - A crate anywhere else (for example `contrib/dev-tools/…`) needs its own `!/path/to/crate/` line in the interim AI-harness block. Remove the line when the crate leaves the workspace. - Never add a broad negation; admit the crate directory only. 4. Removing a member: delete it from `members`, from `default-members` if present, and its `.dockerignore` line if it had one. ## Verification Run the narrow validation appropriate to the change before the normal repository gate: ```bash cargo metadata --no-deps --format-version 1 > /dev/null docker build --target recipe --file Containerfile . ``` For a changed `default-members` entry, also run: ```bash docker build --target test_debug --file Containerfile . ``` Then run `linter all`, `cargo test --doc --workspace`, and the mandatory pre-commit workflow. ## Related Skills - [`add-rust-dependency`](../add-rust-dependency/SKILL.md) — add an external dependency.
GitHub에서 보기