Skip to content

Commit 2fbddc6

Browse files
committed
Add option M
1 parent df9d58c commit 2fbddc6

1 file changed

Lines changed: 54 additions & 6 deletions

File tree

β€Ždocs/design_decisions/DR-008-infra.rstβ€Ž

Lines changed: 54 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ is available but does not cover live preview either.
6868
We want dashboards generated automatically to be included in the documentation.
6969
See `infrastructure discussion 2026-05-18 <https://github.com/orgs/eclipse-score/discussions/236#discussioncomment-16906461>`_.
7070

71+
Cross-repository composed builds via ``:docs_combo`` must keep working for integrator repositories.
72+
7173
Goals
7274
^^^^^
7375

@@ -193,20 +195,66 @@ Speed πŸ’š: No slowdown.
193195

194196
UX 😑: Live-preview UX is unchanged, but risk of downstream breaks.
195197

198+
Option M: Mount external source bundles via ``sphinx-mounts``
199+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
200+
201+
In short: keep source files where they are and mount them into the Sphinx project
202+
using ``[[mounts]]`` entries written to ``ubproject.toml``.
203+
204+
This option has been explored as a proof of concept in
205+
`docs-as-code PR #554 <https://github.com/eclipse-score/docs-as-code/pull/554>`_.
206+
It uses the external `sphinx-mounts <https://sphinx-mounts.useblocks.com/>`_ extension.
207+
The PoC adds a ``mounts`` attribute to ``docs()``
208+
and wires it through all relevant paths,
209+
including ``:docs_combo`` / ``:docs_sources`` and sandboxed builds.
210+
211+
TODO:
212+
Apparently ``:docs_combo`` composes external ``:docs_sources`` trees,
213+
but does not define a clear cross-repository aggregation mechanism for mount metadata declared by upstream repositories.
214+
Therefore, Option M does not satisfy all requirements and is not a valid option at this time.
215+
216+
.. mermaid::
217+
218+
graph LR
219+
docs@{ shape: docs, label: "docs/" }
220+
bundle@{ shape: docs, label: "src/docs/ or generated dir" }
221+
mounts@{ label: "[[mounts]]" }
222+
docs --> :docs
223+
bundle --> mounts --> :docs
224+
225+
The approach avoids copying/symlinking documentation trees into ``docs/``
226+
and aims to keep IDE tooling aligned by reading the same ``ubproject.toml`` as Sphinx.
227+
228+
Known constraints from the PoC:
229+
230+
* Each mount currently expects a directory-shaped Bazel output
231+
(e.g. via a helper like ``files_to_dir``).
232+
* Per-bundle ``ubproject.toml`` generation is workspace-only (``bazel run``),
233+
while sandboxed ``bazel build`` skips those workspace writes by design.
234+
* Nested mounts are not supported.
235+
236+
Effort πŸ’›: Similar order of magnitude as Option B prototype work.
237+
238+
Flexibility 😑: Fails strict cross-repository ``:docs_combo`` requirement in current form.
239+
240+
Speed πŸ’›: Comparable iterative speed; initial setup and mount resolution add some overhead.
241+
242+
UX 😑: Not acceptable while strict cross-repository composition behavior remains unclear/unmet.
243+
196244

197245
Evaluation
198246
----------
199247

200248
In order of importance, most important first.
201249

202250
.. csv-table::
203-
:header: Goals, Option N, Option B, Option D
204-
:widths: 2, 1, 1, 1
251+
:header: Goals, Option N, Option B, Option D, Option M
252+
:widths: 2, 1, 1, 1, 1
205253

206-
Flexibility, 😑, πŸ’š, 😑
207-
Effort, πŸ’š, πŸ’›, 😑
208-
Speed, πŸ’š, πŸ’›, πŸ’š
209-
UX, πŸ’š, 😑, 😑
254+
Flexibility, 😑, πŸ’š, 😑, 😑
255+
Effort, πŸ’š, πŸ’›, 😑, πŸ’›
256+
Speed, πŸ’š, πŸ’›, πŸ’š, πŸ’›
257+
UX, πŸ’š, 😑, 😑, 😑
210258

211259
**Decision: Option B** because Option N loses wrt flexibility. Option D has no advantage over B.
212260

0 commit comments

Comments
Β (0)