eclipse-score / eclipse-score/docs-as-code

Public docs_bundle is not self-contained because bundle examples include files outside docs/

オープン
#778 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
Python
スター
10
フォーク
32
平均マージ
23時間 52分
マージ済み PR(30日)
52

説明

## Problem

The public `//:docs_bundle` includes `docs/how-to/bundles/examples.rst` and the nested bundle example mounts. That page uses `literalinclude` paths such as:

```rst
../../../src/tests/docs_bzl/scenarios/nested_bundles/BUILD
../../../src/tests/docs_bzl/scenarios/data_files_runfiles/BUILD
../../../src/tests/docs_bzl/scenarios/external_bundle/BUILD
```

These files are outside the `docs/` source directory. The documentation builds successfully as the standalone `docs-as-code` project, but fails when its `docs_bundle` is consumed by another Sphinx project because `sphinx-mounts` enforces path confinement for mounted documents.

## Reproduction

Consume `@score_docs_as_code//:docs_bundle` from `eclipse-score/reference_integration` with `score_docs_as_code` 8.1.0:

```python
{
"bundle": "@score_docs_as_code//:docs_bundle",
"mount_at": "process_methods_tools/docs_as_code",
"attach_to": "process_methods_tools",
}
```

Run:

```text
bazel run //:docs
```

Observed result:

```text
sphinx-mounts: mounted doc process_methods_tools/docs_as_code/how-to/bundles/examples references a file outside its bundle root: .../score_docs_as_code+/src/tests/docs_bzl/scenarios/nested_bundles/BUILD is not under .../score_docs_as_code+/docs
```

A previous closed PR, #514, attempted to add support for `literalinclude` outside `docs/`; this is the same class of problem now exposed through the public external bundle and should be resolved either by packaging the included files into the bundle or by excluding these test-fixture examples from the exported bundle.

## Expected behavior

The public `docs_bundle` should be self-contained and mountable by another Sphinx project without path-confinement errors. The standalone documentation build and the external-bundle build should exercise the same contract.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Start with docs/how-to/bundles/examples.rst and the public //:docs_bundle definition, then reproduce the failure with the external-bundle configuration and bazel run //:docs. Trace which example files are exported outside docs/. Done means the standalone and external-bundle builds both succeed without path-confinement errors.

索引モデルが issue の本文から書いたものです。

評価

領域
build-system, documentation
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
55/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。