From 5e1db68da9c31137dcb36297eb1a4f7043155638 Mon Sep 17 00:00:00 2001 From: John Lambert Date: Fri, 6 Nov 2026 17:01:29 -0500 Subject: [PATCH 1/2] ADR 0034: SIL.TextEditing moves into Motif as a sealed folder that can be pulled out again Owner decisions 2026-11-06: fresh copy into motif/textediting (no subtree history); its own build environment and both Avalonia lines; one shared-settings import; SIL packages track Motif's SilVersions.props; its own Windows CI job and solution; its own ADRs and glossary; issues transferred and the repo archived. Amends ADRs 0002 and 0016. Co-Authored-By: Claude Haiku 5.5 --- GLOSSARY.md | 16 +++++++ .../0002-writing-systems-from-libpalaso.md | 3 ++ docs/adr/0016-lcmodel-adapter-package.md | 3 ++ ...034-moves-into-motif-as-a-sealed-folder.md | 46 +++++++++++++++++++ 4 files changed, 68 insertions(+) create mode 100644 docs/adr/0034-moves-into-motif-as-a-sealed-folder.md diff --git a/GLOSSARY.md b/GLOSSARY.md index 0f7dff1..905efd6 100644 --- a/GLOSSARY.md +++ b/GLOSSARY.md @@ -130,3 +130,19 @@ _Avoid_: model (that is liblcm's), JSON Schema (that is what the record schema p **Body field**: The one rich field of a record kind written as the Markdown body below the front matter, such as a notebook record's description. A lexical entry has none. _Avoid_: main field, content + +## Repository + +**Sealed folder**: +`textediting/` in the Motif repository: SIL.TextEditing with its own build, solution, tests and documents. Motif +references into it; it references nothing outside itself except one shared-settings import (ADR 0034). +_Avoid_: subtree, submodule, vendored copy + +**Avalonia line**: +One of the two builds of every library: netstandard2.0 with Avalonia 11.3 (FieldWorks on .NET Framework 4.8), or +net10.0 with Avalonia 12 (Motif) (ADR 0009). +_Avoid_: flavour, variant + +**Pull out**: +Copy the sealed folder into another repository (its own again, or FieldWorks) and make it build there (ADR 0034). +_Avoid_: migrate back, extract diff --git a/docs/adr/0002-writing-systems-from-libpalaso.md b/docs/adr/0002-writing-systems-from-libpalaso.md index 9bdd2b1..20e3247 100644 --- a/docs/adr/0002-writing-systems-from-libpalaso.md +++ b/docs/adr/0002-writing-systems-from-libpalaso.md @@ -19,3 +19,6 @@ Owner decision, 2026-11-03. Amended 2026-11-04: the Markdown converter does not reference libpalaso. It identifies writing systems by language tag and takes each one's language, direction and font from the file's front matter (ADR 0028). + +Amended by ADR 0034 (2026-11-06): inside Motif, SIL package versions follow Motif's `SilVersions.props`, not FieldWorks' pins. The +netstandard2.0 / Avalonia 11.3 line is the compatibility promise to FieldWorks. diff --git a/docs/adr/0016-lcmodel-adapter-package.md b/docs/adr/0016-lcmodel-adapter-package.md index 32bc65b..0ec3769 100644 --- a/docs/adr/0016-lcmodel-adapter-package.md +++ b/docs/adr/0016-lcmodel-adapter-package.md @@ -30,3 +30,6 @@ Amended 2026-11-05 (issue 139): liblcm also refuses some values of properties it - Not refused: a colour out of range and a negative relative line height (read as its absolute value) load, changed. A `-1` variation with a `-1` value is a delete to the property builder, so nothing reaches liblcm. The writing system (1) and base writing system (16) depend on the host's handles and are not judged here. - The packed-value check (147, 156) asks liblcm to write, read and save the value through a permissive writing-system shim, where every handle names a writing system. It judges the shape of the record only. A real project's writing-system factory may refuse a writing system it does not know, so a packed value that passes here can still fail to load in a project that lacks that writing system; the adapter cannot know the project's writing systems. - `LiblcmRefusals` and `Refusal` are internal. The public surface is `TsStringConversion.IsRefusedByLiblcm` (the one number check), `DroppedProperty`, `DroppedReason` and the `OnDropped` callbacks. The sweep covers object-data type characters 0 to 255 and reports every mismatch. + +Amended by ADR 0034 (2026-11-06): inside Motif, SIL package versions follow Motif's `SilVersions.props`, not FieldWorks' pins. The +netstandard2.0 / Avalonia 11.3 line is the compatibility promise to FieldWorks. diff --git a/docs/adr/0034-moves-into-motif-as-a-sealed-folder.md b/docs/adr/0034-moves-into-motif-as-a-sealed-folder.md new file mode 100644 index 0000000..c36bf7b --- /dev/null +++ b/docs/adr/0034-moves-into-motif-as-a-sealed-folder.md @@ -0,0 +1,46 @@ +# SIL.TextEditing moves into Motif as a sealed folder that can be pulled out again + +SIL.TextEditing is copied into the Motif repository (`sillsdev/motif`) as one folder, `textediting/`, in a single import +commit. It keeps its own build and its two Avalonia lines, so that it can be pulled out again by copying the folder: +back into its own repository, or straight into FieldWorks. + +**The rules for `textediting/`:** + +- **Sealed, one way.** Motif projects may reference projects inside `textediting/`. Nothing inside it references a + file outside it, except the one shared-settings import below. A check (a test or CI step) fails on any other path + that leaves the folder. +- **Its own build environment.** `textediting/` has its own `Directory.Build.props`, `Directory.Packages.props`, + `SIL.TextEditing.sln`, tests, samples and conformance fixtures. MSBuild uses the nearest of these files, so Motif's + root build (one shared `bin`, a forced runtime identifier, single targeting, implicit usings) never reaches it. +- **Two Avalonia lines, as before (ADR 0009).** netstandard2.0 against Avalonia 11.3 for FieldWorks on .NET Framework + 4.8, and net10.0 against Avalonia 12 for Motif. These two pins stay in the folder's own `Directory.Packages.props`. +- **Shared settings, one import.** Motif splits the settings both sides want (language version, nullable, warnings as + errors, deterministic builds, licence and authors, analysers) into one common file. `textediting/Directory.Build.props` + imports it. Pulling the folder out replaces that import with the same few lines. +- **SIL packages track Motif.** libpalaso and liblcm versions come from Motif's `SilVersions.props`. FieldWorks can + raise SIL package versions easily. What it cannot do easily is move from .NET Framework 4.8 to .NET 10 or from + Avalonia 11 to 12, so the folder keeps the netstandard2.0 and Avalonia 11 line until FieldWorks makes that move. +- **Its own gate.** A Windows CI job, filtered to `textediting/**`, builds both lines and runs the net10.0 and net48 + tests of `SIL.TextEditing.sln`, as this repository's CI did. Motif's cross-platform matrix and `test.ps1` do not run + them. The workflow file is part of what moves out again. +- **Its own documents.** `textediting/docs/adr` keeps this numbering (0001 onwards), with `GLOSSARY.md`, `AGENTS.md` + and `docs/`. Motif records its side of the boundary in an ADR of its own. +- **Names do not change.** Projects, namespaces and package ids stay `SIL.TextEditing.*`, so FieldWorks code written + against them needs no change when the folder is pulled out. +- **Still MIT and clean-room (ADR 0010).** No FieldWorks code is copied into the folder. + +**Pulling it out again**, into its own repository or into FieldWorks: copy `textediting/`, replace the shared-settings +import, take the CI job along, and point SIL package versions at the destination's pins. History stays in Motif; the +import commit names the SIL.TextEditing commit it came from. + +**The old repository:** open issues move to `sillsdev/motif` (`gh issue transfer`, with a `textediting` label). The +repository gets a README pointing at `motif/textediting` and is archived, not deleted, so it can be unarchived if the +code moves back. + +**Consequences:** +- Amends ADR 0002 and ADR 0016: SIL package versions follow Motif, not FieldWorks' pins. The netstandard2.0 / Avalonia + 11.3 line is the compatibility promise to FieldWorks, not the package versions. +- ADR 0009, ADR 0010 and ADR 0031 stand. +- History before the move stays in the archived repository; there is no subtree history in Motif. + +Owner decision, 2026-11-06. From ce50269f488b97a44b392cd00ac4457e017f8aca Mon Sep 17 00:00:00 2001 From: John Lambert Date: Fri, 6 Nov 2026 17:04:14 -0500 Subject: [PATCH 2/2] ADR 0034: address review (two imports, ADR 0031 amended, stale pin wording) The folder imports two Motif-root files (shared settings and SilVersions.props) and the seal check allows exactly those. Names how SIL package properties map, the local-override gap, the AotCheck CI job, issue transfer details and a checklist of what changes at the move. ADRs 0002, 0016 and 0031 say their "FieldWorks' pin" wording holds until the move; ADR 0031's Q60 is not this move. Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 3 +- Directory.Packages.props | 4 +- GLOSSARY.md | 5 +- .../0002-writing-systems-from-libpalaso.md | 7 +- docs/adr/0016-lcmodel-adapter-package.md | 5 +- ...31-shared-editing-and-interchange-layer.md | 4 + ...034-moves-into-motif-as-a-sealed-folder.md | 90 ++++++++++++------- 7 files changed, 76 insertions(+), 42 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index af605b7..b247e79 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -12,7 +12,8 @@ - `src/SIL.TextEditing.Markdown` has no Avalonia, libpalaso or liblcm reference. - `src/SIL.TextEditing.LCModel` references liblcm and is not trimmable or AOT-compatible; keep it out of `tests/AotCheck`. - **One source tree, two Avalonia versions.** netstandard2.0 builds against Avalonia 11.3.17 (FieldWorks, net48); - net10.0 builds against Avalonia 12 (Motif). Versions live in `Directory.Packages.props` only. A per-target + net10.0 builds against Avalonia 12 (Motif). Versions live in `Directory.Packages.props` only (from the move into Motif, SIL package versions come from Motif's + `SilVersions.props`, ADR 0034). A per-target difference goes behind `#if NET10_0_OR_GREATER`, is small, and is listed in `docs/reference/avalonia-versions.md`. - **Packages.** Only SIL.WritingSystems (libpalaso, ADR 0002; referenced by the Avalonia and LCModel projects), Avalonia (and its Headless, Skia, Desktop, Themes.Fluent and Win32.Interoperability packages; Themes.Fluent and Win32.Interoperability are samples-only; Desktop is for samples and test projects that need a real window, never for a shipped library), SIL.LCModel.Core (FieldWorks' pin; referenced by `SIL.TextEditing.LCModel`, ADR 0016) and SIL.LCModel (FieldWorks' pin, hosts may float up; referenced by the planned `SIL.TextEditing.Project` only, ADR 0031), Markdig.Signed 0.37.0 (referenced by the `SIL.TextEditing.Markdown` project only, ADRs 0011 and 0028), YamlDotNet 18.1.0 (its parser layer only, never the reflection serializer; referenced by the `SIL.TextEditing.Markdown` project only, ADR 0032) and the xunit test stack. Ask before adding anything else. diff --git a/Directory.Packages.props b/Directory.Packages.props index 8fac8ed..7c1ee56 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -26,7 +26,7 @@ - + @@ -35,7 +35,7 @@ - + diff --git a/GLOSSARY.md b/GLOSSARY.md index 905efd6..8bdb9e5 100644 --- a/GLOSSARY.md +++ b/GLOSSARY.md @@ -134,8 +134,9 @@ _Avoid_: main field, content ## Repository **Sealed folder**: -`textediting/` in the Motif repository: SIL.TextEditing with its own build, solution, tests and documents. Motif -references into it; it references nothing outside itself except one shared-settings import (ADR 0034). +SIL.TextEditing as one folder inside a host repository (first `textediting/` in Motif), with its own build, solution, +tests and documents. The host references into it; it references nothing outside itself except the host's shared-settings +file and `SilVersions.props` (ADR 0034). _Avoid_: subtree, submodule, vendored copy **Avalonia line**: diff --git a/docs/adr/0002-writing-systems-from-libpalaso.md b/docs/adr/0002-writing-systems-from-libpalaso.md index 20e3247..b5edc4f 100644 --- a/docs/adr/0002-writing-systems-from-libpalaso.md +++ b/docs/adr/0002-writing-systems-from-libpalaso.md @@ -10,7 +10,8 @@ the wheel." **Consequences:** the package depends on libpalaso, and through it on ICU. Its versions must match what FieldWorks and Motif pin, and the net10.0 build must stay trimmable and AOT-compatible. -- The minimum version is FieldWorks' pin, 18.0.0-beta0042; hosts may float up. +- The minimum version is FieldWorks' pin, 18.0.0-beta0042; hosts may float up. From the move into Motif (ADR 0034), the + version comes from Motif's `SilVersions.props` instead. - A libpalaso trim or AOT warning is fixed upstream. libpalaso takes pull requests from us, through its normal review. - Until that fix is released, the warning is suppressed by its ID, with a comment that links the libpalaso pull request. - The suppression is removed when the minimum version is raised to the fixed release. @@ -20,5 +21,5 @@ Owner decision, 2026-11-03. Amended 2026-11-04: the Markdown converter does not reference libpalaso. It identifies writing systems by language tag and takes each one's language, direction and font from the file's front matter (ADR 0028). -Amended by ADR 0034 (2026-11-06): inside Motif, SIL package versions follow Motif's `SilVersions.props`, not FieldWorks' pins. The -netstandard2.0 / Avalonia 11.3 line is the compatibility promise to FieldWorks. +Amended by ADR 0034 (2026-11-06): from the move into Motif, SIL package versions follow Motif's `SilVersions.props`, not +FieldWorks' pins. The netstandard2.0 / Avalonia 11.3 line is the compatibility promise to FieldWorks. diff --git a/docs/adr/0016-lcmodel-adapter-package.md b/docs/adr/0016-lcmodel-adapter-package.md index 0ec3769..f1d3459 100644 --- a/docs/adr/0016-lcmodel-adapter-package.md +++ b/docs/adr/0016-lcmodel-adapter-package.md @@ -31,5 +31,6 @@ Amended 2026-11-05 (issue 139): liblcm also refuses some values of properties it - The packed-value check (147, 156) asks liblcm to write, read and save the value through a permissive writing-system shim, where every handle names a writing system. It judges the shape of the record only. A real project's writing-system factory may refuse a writing system it does not know, so a packed value that passes here can still fail to load in a project that lacks that writing system; the adapter cannot know the project's writing systems. - `LiblcmRefusals` and `Refusal` are internal. The public surface is `TsStringConversion.IsRefusedByLiblcm` (the one number check), `DroppedProperty`, `DroppedReason` and the `OnDropped` callbacks. The sweep covers object-data type characters 0 to 255 and reports every mismatch. -Amended by ADR 0034 (2026-11-06): inside Motif, SIL package versions follow Motif's `SilVersions.props`, not FieldWorks' pins. The -netstandard2.0 / Avalonia 11.3 line is the compatibility promise to FieldWorks. +Amended by ADR 0034 (2026-11-06): from the move into Motif, `SIL.LCModel.Core` and `SIL.LCModel` follow Motif's +`SilVersions.props`, not FieldWorks' pin, here and in the ADR 0031 amendment above. The netstandard2.0 / Avalonia 11.3 +line is the compatibility promise to FieldWorks. diff --git a/docs/adr/0031-shared-editing-and-interchange-layer.md b/docs/adr/0031-shared-editing-and-interchange-layer.md index 051b9e1..8227abe 100644 --- a/docs/adr/0031-shared-editing-and-interchange-layer.md +++ b/docs/adr/0031-shared-editing-and-interchange-layer.md @@ -56,3 +56,7 @@ Motif it is Proposals, MCP, the GDR template and checker, and the AI-authoring p the text. Design pending in research report 19. Owner decision, 2026-11-05. + +Amended by ADR 0034 (2026-11-06): from the move into Motif, `SIL.LCModel` (R-1 and the consequences above) follows Motif's +`SilVersions.props`, not FieldWorks' pin. Motif is MIT, so that move is not the "repositories merge" of Q60: the library +stays MIT and clean-room (ADR 0010). diff --git a/docs/adr/0034-moves-into-motif-as-a-sealed-folder.md b/docs/adr/0034-moves-into-motif-as-a-sealed-folder.md index c36bf7b..b2d9845 100644 --- a/docs/adr/0034-moves-into-motif-as-a-sealed-folder.md +++ b/docs/adr/0034-moves-into-motif-as-a-sealed-folder.md @@ -1,46 +1,72 @@ # SIL.TextEditing moves into Motif as a sealed folder that can be pulled out again SIL.TextEditing is copied into the Motif repository (`sillsdev/motif`) as one folder, `textediting/`, in a single import -commit. It keeps its own build and its two Avalonia lines, so that it can be pulled out again by copying the folder: -back into its own repository, or straight into FieldWorks. +commit. It keeps its own build and its two Avalonia lines. It can then be pulled out again by copying the folder, either +back into its own repository or straight into FieldWorks. **The rules for `textediting/`:** -- **Sealed, one way.** Motif projects may reference projects inside `textediting/`. Nothing inside it references a - file outside it, except the one shared-settings import below. A check (a test or CI step) fails on any other path - that leaves the folder. +- **Sealed, one way.** Motif projects may reference projects inside `textediting/`. Nothing inside it references a file + outside it, with two exceptions: the shared-settings file and Motif's `SilVersions.props`, both at the Motif root. A + check (a test or a CI step) allows exactly those two and fails on any other path that leaves the folder. - **Its own build environment.** `textediting/` has its own `Directory.Build.props`, `Directory.Packages.props`, - `SIL.TextEditing.sln`, tests, samples and conformance fixtures. MSBuild uses the nearest of these files, so Motif's - root build (one shared `bin`, a forced runtime identifier, single targeting, implicit usings) never reaches it. -- **Two Avalonia lines, as before (ADR 0009).** netstandard2.0 against Avalonia 11.3 for FieldWorks on .NET Framework - 4.8, and net10.0 against Avalonia 12 for Motif. These two pins stay in the folder's own `Directory.Packages.props`. -- **Shared settings, one import.** Motif splits the settings both sides want (language version, nullable, warnings as - errors, deterministic builds, licence and authors, analysers) into one common file. `textediting/Directory.Build.props` - imports it. Pulling the folder out replaces that import with the same few lines. -- **SIL packages track Motif.** libpalaso and liblcm versions come from Motif's `SilVersions.props`. FieldWorks can - raise SIL package versions easily. What it cannot do easily is move from .NET Framework 4.8 to .NET 10 or from - Avalonia 11 to 12, so the folder keeps the netstandard2.0 and Avalonia 11 line until FieldWorks makes that move. -- **Its own gate.** A Windows CI job, filtered to `textediting/**`, builds both lines and runs the net10.0 and net48 - tests of `SIL.TextEditing.sln`, as this repository's CI did. Motif's cross-platform matrix and `test.ps1` do not run - them. The workflow file is part of what moves out again. -- **Its own documents.** `textediting/docs/adr` keeps this numbering (0001 onwards), with `GLOSSARY.md`, `AGENTS.md` - and `docs/`. Motif records its side of the boundary in an ADR of its own. -- **Names do not change.** Projects, namespaces and package ids stay `SIL.TextEditing.*`, so FieldWorks code written + `SIL.TextEditing.sln`, tests, samples and conformance fixtures. MSBuild uses the nearest of these files. Motif's root + build therefore never reaches the folder. That build has one shared `bin` folder, a forced runtime identifier, + implicit usings, a dependency-injection package on every project and `Product=Motif`. +- **Two Avalonia lines, as before (ADR 0009).** netstandard2.0 builds against Avalonia 11.3 for FieldWorks on .NET + Framework 4.8. net10.0 builds against Avalonia 12 for Motif. Both Avalonia versions stay in the folder's own + `Directory.Packages.props`. +- **Shared settings.** Motif moves the settings both sides want into one common file: language version, nullable, + warnings as errors and deterministic builds. `textediting/Directory.Build.props` imports it. Implicit usings, + `Product` and the output layout stay out of the common file. +- **SIL packages track Motif.** FieldWorks can raise SIL package versions easily. What it cannot do easily is move from + .NET Framework 4.8 to .NET 10, or from Avalonia 11 to 12. So the folder keeps the netstandard2.0 and Avalonia 11 line + until FieldWorks moves. Its SIL package versions, however, come from Motif's `SilVersions.props`: + - `textediting/Directory.Packages.props` imports `SilVersions.props`. + - It maps `SilLibPalasoVersion` to `SIL.WritingSystems`, and `SilLCModelPackageVersion` to `SIL.LCModel.Core` and + `SIL.LCModel`. + - The local override `-p:SilLcmVersion` gives way to Motif's `LOCAL_NUGET_REPO` mechanism. The folder needs its own + copy of that, because it lives in Motif's root `Directory.Build.props`. + - At the move, a build checks that those versions restore for netstandard2.0 and net48. +- **Its own gate.** A Windows CI job, filtered to `textediting/**`, does what this repository's CI does: + - builds both lines; + - runs the net10.0 and net48 tests of `SIL.TextEditing.sln`; + - publishes `tests/AotCheck` with native AOT. + + Motif's cross-platform matrix and `test.ps1` do not run these. The workflow file moves out with the folder. +- **Its own documents.** `textediting/docs/adr` keeps this numbering, from 0001, along with `GLOSSARY.md`, `AGENTS.md` + and `docs/`. Motif records its side of the boundary in an ADR of its own, in the first Motif pull request of the move. +- **Names do not change.** Projects, namespaces and package ids stay `SIL.TextEditing.*`. FieldWorks code written against them needs no change when the folder is pulled out. -- **Still MIT and clean-room (ADR 0010).** No FieldWorks code is copied into the folder. +- **Still MIT and clean-room (ADR 0010).** No FieldWorks code is copied into the folder. Motif is MIT, so this move is + not the "repositories merge" that ADR 0031 and its Q60 mention. + +**Pulling it out again**, into its own repository or into FieldWorks: +1. Copy `textediting/`. +2. Replace both imports with the same few lines, inline. +3. Take the CI job along. +4. Point the SIL package versions at the destination's own pins. + +History stays in Motif. The import commit names the SIL.TextEditing commit it came from. -**Pulling it out again**, into its own repository or into FieldWorks: copy `textediting/`, replace the shared-settings -import, take the CI job along, and point SIL package versions at the destination's pins. History stays in Motif; the -import commit names the SIL.TextEditing commit it came from. +**The old repository:** +- Open issues move to `sillsdev/motif` with `gh issue transfer`. A `textediting` label is created there first. +- Transferred issues get new numbers. GitHub redirects the old links, so the issue numbers cited in these documents + still resolve. +- Open pull requests cannot be transferred. They are merged or closed before the copy. +- The repository gets a README that points at `motif/textediting`. It is archived, not deleted, so it can be unarchived + if the code moves back. -**The old repository:** open issues move to `sillsdev/motif` (`gh issue transfer`, with a `textediting` label). The -repository gets a README pointing at `motif/textediting` and is archived, not deleted, so it can be unarchived if the -code moves back. +**At the move**, these change from "FieldWorks' pin" to "Motif's `SilVersions.props`": +- `AGENTS.md`: the layering and package bullets. +- the pin comments in `Directory.Packages.props`; +- ADR 0002; +- ADR 0016; +- ADR 0031, at R-1 and in its consequences. **Consequences:** -- Amends ADR 0002 and ADR 0016: SIL package versions follow Motif, not FieldWorks' pins. The netstandard2.0 / Avalonia - 11.3 line is the compatibility promise to FieldWorks, not the package versions. -- ADR 0009, ADR 0010 and ADR 0031 stand. -- History before the move stays in the archived repository; there is no subtree history in Motif. +- Amends ADR 0002, ADR 0016 and ADR 0031 from the move onwards. Their "FieldWorks' pin" wording holds until then. +- ADR 0009 and ADR 0010 stand. +- History from before the move stays in the archived repository. Motif has no subtree history. Owner decision, 2026-11-06.