Repository navigation
Commit 49dbb4b
authored
feat(csharp): hand emitters over on eject and make api-docs ejectable (#432)
* feat(csharp): eject hands over the emitters a generator writes through; api-docs is ejectable
An ejected C# generator used to be one file over packaged emitters, so a defect in
the enum, navigation, doc-comment or prompt-tier writers still waited for a release.
Eject now copies those emitters with the generator, into codegen/generators/ in the
same Codegen.Generators namespace: Fr019SharedEnum, XmlDocBuilder, M2MNavigation and
ReverseFinders with entity, db-context and routes as each calls them;
ExtractDelegateEmitter, Fr010FieldMapping and OutputFormatSpecEmitter with
output-parser, extractor and output-prompt. The list is each registry entry's
Companions. A file two generators share is copied once and never overwritten.
Naming and type-mapping tables, the model walks and the generator base stay in the
package as the engine.
api-docs is registered for C# and ejectable. The api reference is now a generator
(IDocsGenerator) that `dotnet meta docs` runs; `gen` and `verify --codegen` skip it
and say so. `docs` hands off to an owned codegen project once it owns api-docs, and
what the reference documents comes from the generators in that project's list
(GeneratorApplicability.From), so it describes an owned copy.
Moved to the engine so an owned copy needs no emitter: CSharpStringLiteral to
CSharpNaming, ValueObjectNames.ResolveValueObject out of RenderHelperGenerator.
EjectedGeneratorsAloneTests derives its list from the registry: each ejectable
generator is ejected alone, compiled against the public API, checked against a
written engine surface, and compared byte for byte with the packaged generator.
Packaged output is unchanged.
* no-mistakes(review): Fix C# eject review findings: engine guard, pin warning
* no-mistakes(review): Warn on skipped docs generator only when selected; fix pin wording
* docs(csharp): api-docs note says gen warns only when --generators names it
The registry Note shown by gen --list and the matching manifest note still said a
gen run that lists api-docs warns. After the gen change, an owned project that
lists it in codegen/Program.cs is silent; only a --generators selection naming it
warns. Text only.1 parent 0f8a14b commit 49dbb4b
42 files changed
Lines changed: 1843 additions & 378 deletions
File tree
- docs
- features
- ports
- fixtures/generator-registry-conformance
- server/csharp
- MetaObjects.Cli.Tests
- MetaObjects.Cli
- MetaObjects.Codegen.Tests
- MetaObjects.Codegen
- ApiDocs
- Generators
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
141 | 197 | | |
142 | 198 | | |
143 | 199 | | |
| |||
744 | 800 | | |
745 | 801 | | |
746 | 802 | | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
747 | 809 | | |
748 | 810 | | |
749 | 811 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1014 | 1014 | | |
1015 | 1015 | | |
1016 | 1016 | | |
1017 | | - | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
1018 | 1020 | | |
1019 | 1021 | | |
1020 | 1022 | | |
1021 | 1023 | | |
1022 | | - | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
1023 | 1029 | | |
1024 | 1030 | | |
1025 | 1031 | | |
| |||
1031 | 1037 | | |
1032 | 1038 | | |
1033 | 1039 | | |
1034 | | - | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
1035 | 1043 | | |
1036 | 1044 | | |
1037 | 1045 | | |
1038 | 1046 | | |
1039 | 1047 | | |
1040 | 1048 | | |
1041 | 1049 | | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
1042 | 1129 | | |
1043 | 1130 | | |
1044 | 1131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
94 | | - | |
| 93 | + | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
0 commit comments