Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭
#778 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
55/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃

调研方向

从 docs/how-to/bundles/examples.rst 和公开的 //:docs_bundle 定义开始,然后使用 external-bundle 配置和 bazel run //:docs 重现该失败。跟踪哪些示例文件被导出到 docs/ 之外。完成的标准是 standalone 和 external-bundle 构建都能成功,且不会出现路径约束错误。

由索引模型根据 Issue 内容生成。

描述

bug

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:

../../../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:

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

Run:

bazel run //:docs

Observed result:

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.

主要语言
Python
星标
11
派生
33
平均合并
22 小时 43 分钟
30 天内合并 PR
65

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

eclipse-score/docs-as-code 的其他 Issue

查看 eclipse-score/docs-as-code 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。