Skip to content

Commit 4e0bc93

Browse files
committed
no-mistakes(document): Docs: publish requirements opt-in, inherit key in port pages
1 parent e8bd869 commit 4e0bc93

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

‎docs/ports/csharp.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ A model published from another repository is declared under `dependencies` in
114114
reads both, at every rung of the source ladder, and never writes them: a snapshot that no longer
115115
matches the lock fails with `ERR_DEPENDENCY_SNAPSHOT_STALE`. The snapshot loads first, so your
116116
own metadata can `extends`, overlay or reference its nodes, but an imported node is not generated
117-
(and is not counted by the requirement gate) unless `scope.include` names its package. What C#
117+
unless `scope.include` names its package, and an imported requirement is not counted by the
118+
requirement gate unless `requirements.inherit` names it. What C#
118119
does and does not do is in
119120
[Metadata dependencies](../features/metadata-dependencies.md).
120121

@@ -305,7 +306,8 @@ new SharedModelGenerator
305306
`<Version>` (from the project file, else the nearest `Directory.Build.props`). It writes nothing and
306307
names the option to change when the selection is empty, is not closed over `extends` and reference
307308
attributes, or needs vocabulary outside the library's. Give `OutDir` a directory that holds nothing
308-
else. `requirement.*` and `template.*` nodes are never published. `dotnet meta eject shared-model`
309+
else. `requirement.*` nodes are published only when `Requirements` is set (`requirements: true`, default
310+
off); `template.*` nodes are never published. `dotnet meta eject shared-model`
309311
copies the generator into your project; the artifact bytes stay in the package, because a copy that
310312
changed them would publish a model a consumer's sync refuses. The consumer runs the Node `meta deps
311313
sync`, which stays the only writer of the lock and the snapshot.

‎docs/ports/java.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,8 @@ directory). `meta deps sync` (Node) is the only writer of the snapshot and `deps
202202
the Maven build reads them offline and refuses a stale or hand-edited snapshot with
203203
`ERR_DEPENDENCY_SNAPSHOT_STALE`. Your own entities can `extends` and reference the imported
204204
ones; the generators emit nothing for an imported object unless `scope.include` names its
205-
package, and a new top-level node declared into a package a dependency owns fails with
205+
package, an imported requirement counts toward the gate only when `requirements.inherit` names
206+
its package, and a new top-level node declared into a package a dependency owns fails with
206207
`ERR_DEPENDENCY_PACKAGE_NOT_OWNED`. Kotlin builds inherit all of this. See
207208
[`metadata-dependencies.md`](../features/metadata-dependencies.md).
208209

@@ -802,7 +803,8 @@ Wire it like any generator:
802803

803804
It writes the artifact and the manifest with the same bytes as the TypeScript `sharedModelFile()`:
804805
the shared corpus (`fixtures/shared-model-conformance/`) is the gate. The version comes from the
805-
module's `<version>` unless you pass `version`. Requirement and template nodes are never published.
806+
module's `<version>` unless you pass `version`. `requirement.*` nodes are published only when you pass
807+
`<requirements>true</requirements>` (default off); `template.*` nodes are never published.
806808
Moving the artifact into a registry, and recording a consumer's snapshot and lock, is the Node
807809
`meta deps sync`'s job; this generator only produces the files.
808810

0 commit comments

Comments
 (0)