diff --git a/CLAUDE.md b/CLAUDE.md index 425a424..34aaec7 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -124,8 +124,8 @@ one per property hanging off it. An entity id is a number and so is a texture id, and `SchemaSemanticType` is how the schema says they are different things. A *mass* is a different problem: the vocabulary for it already exists. -`ktsu.Semantics.Quantities` declares 212 physical quantities, `ktsu.Semantics.Cpp` emits the same -212 as C++ classes, and both are things a target already has. So the `Quantity` type names one +`ktsu.Semantics.Quantities` declares 220 physical quantities, `ktsu.Semantics.Cpp` emits the same +220 as C++ classes, and both are things a target already has. So the `Quantity` type names one rather than asking for a copy of it - `Quantity(Mass)`, `Quantity(Velocity3D)`, `Quantity(Ratio)` - and nothing is generated for it. That is the whole difference from `Semantic`, and both are wanted: a semantic type is the schema's own, a quantity is everybody's. @@ -141,8 +141,8 @@ the five `IVectorN` interfaces, and the arity of that interface says how many co has. Its dimension takes three routes, in order: a magnitude declares one through `IPhysicalQuantity`; a vector form does not, so its dimension is what `Magnitude()` answers with; and a *named overload* of a vector form answers neither, so what is followed is the implicit -widening onto what it is an overload of. Six of the 212 are reachable only by that third route, and -212 is not a number chosen here - it is what the C++ projection emits, so the two counts agreeing +widening onto what it is an overload of. Six of the 220 are reachable only by that third route, and +220 is not a number chosen here - it is what the C++ projection emits, so the two counts agreeing is what says a schema can name every quantity a C++ target has. The ten it leaves out are the logarithmic scales and two hand-written audio types. A decibel does @@ -155,7 +155,7 @@ Three things follow from a quantity knowing its own dimension. - **A unit on one has to agree with it.** The check the semantic type could never make: a unit is text and `Kilograms` was a name, so the two had no way to disagree. The *exponents* are compared - rather than the names, because 72 of the vocabulary's dimensions share 63 exponent vectors - a + rather than the names, because 75 of the vocabulary's dimensions share 64 exponent vectors - a joule and a newton metre are the same eight numbers, and refusing what the physics allows is worse than not checking. - **The reflection table asks the type first.** The eight exponents used to come from the member's @@ -183,7 +183,7 @@ off the closed type - **the one thing generated C# carries that needs no attribu it is**. Everything else does, because a sequential struct or a record struct over a float is a shape a hand-written type may have for its own reasons; a `Mass` is not something a target happened to write, it is the quantity. C++ spells it wherever the target's vocabulary went, which -`CppGeneratorOptions.Quantities` says in one entry for all 212 - the target named none of them, it +`CppGeneratorOptions.Quantities` says in one entry for all 220 - the target named none of them, it ran the generator. That entry also says what the vocabulary is stored in, because a C++ quantity is a class rather than a template and the storage was fixed when it was generated: a member the schema keeps in a double is refused on a float target rather than emitted as two languages quietly @@ -525,7 +525,7 @@ as the property initialiser as well, so a generated instance starts at it. - `Schema/Models/Types/BaseType.cs` - Abstract base with `[JsonDerivedType]` attributes for polymorphic serialization - `Schema/Models/SchemaClass.cs` - Class definitions containing `SchemaMember` collections - `Schema/Models/ClrTypeImporter.cs` - Reads a .NET type into a schema; the exact inverse of the C# generator -- `Schema/Models/Metadata/QuantityRegistry.cs` - The 212 quantities a schema may name, read out of the assembly that declares them rather than listed here +- `Schema/Models/Metadata/QuantityRegistry.cs` - The 220 quantities a schema may name, read out of the assembly that declares them rather than listed here - `Schema/Runtime/SchemaMetadataAttributes.cs` - What generated code carries that its C# types cannot say - `Schema.Editor/SchemaEditor.cs` - Main editor application using `ktsu.ImGui.App` - `Schema.Editor/MemberGridPanel.cs` - The grid of member rows: add, reorder, retype, remove, and the two folds each row opens diff --git a/Directory.Packages.props b/Directory.Packages.props index 6b586b8..88df3f5 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -5,29 +5,29 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - + diff --git a/Schema.Cpp.Test/LegacySampleCppTests.cs b/Schema.Cpp.Test/LegacySampleCppTests.cs index dfdf563..cba1e07 100644 --- a/Schema.Cpp.Test/LegacySampleCppTests.cs +++ b/Schema.Cpp.Test/LegacySampleCppTests.cs @@ -123,7 +123,7 @@ public void EveryElementGetsItsOwnHeader() /// this at all. /// /// The four quantities are here for the same reason and stand in for the same thing a real - /// target would have: ktsu.Semantics.Cpp emits all 212 of them, and a schema that names + /// target would have: ktsu.Semantics.Cpp emits all 220 of them, and a schema that names /// one is naming a class the program already has rather than asking for one. /// /// diff --git a/Schema.Cpp.Test/QuantityCppTests.cs b/Schema.Cpp.Test/QuantityCppTests.cs index 80fed5d..23ec0f0 100644 --- a/Schema.Cpp.Test/QuantityCppTests.cs +++ b/Schema.Cpp.Test/QuantityCppTests.cs @@ -19,7 +19,7 @@ namespace ktsu.Schema.Cpp.Test; /// /// The C++ side of a quantity is the side where it stops resembling a semantic type. A semantic /// type is a class this generator writes; a quantity is a class the target already has, because -/// ktsu.Semantics.Cpp emitted all 212 of them into the target's tree. So what a target says +/// ktsu.Semantics.Cpp emitted all 220 of them into the target's tree. So what a target says /// is where it put them - one entry for the whole vocabulary, since it named none of them. /// /// @@ -326,8 +326,8 @@ public void ADefaultIsConstructedTheWayTheVocabularyAcceptsIt() /// bytes for the whole value and checks one component while the other two go unexamined. /// /// All five arities the vocabulary has are pinned rather than the two that would carry the - /// argument. Every one of them is a real quantity - 148 magnitudes, 27 signed scalars, and 8, - /// 22 and 7 of two, three and four components - so none of these arms is defensive code, and + /// argument. Every one of them is a real quantity - 153 magnitudes, 29 signed scalars, and 8, + /// 23 and 7 of two, three and four components - so none of these arms is defensive code, and /// a reader of this test can see the whole rule instead of inferring it from a sample of it. /// /// diff --git a/Schema.Cpp/CppQuantitySpelling.cs b/Schema.Cpp/CppQuantitySpelling.cs index be9df2e..126c106 100644 --- a/Schema.Cpp/CppQuantitySpelling.cs +++ b/Schema.Cpp/CppQuantitySpelling.cs @@ -7,7 +7,7 @@ namespace ktsu.Schema.Cpp; /// /// /// -/// One entry for 212 types, which is what makes a quantity different from every other spelling +/// One entry for 220 types, which is what makes a quantity different from every other spelling /// this generator is handed. A names one type because the target /// wrote one type; the quantities are a vocabulary ktsu.Semantics.Cpp emits whole, so what /// a target has to say is where it put them, not what it called each one. It called each one what diff --git a/Schema.Cpp/README.md b/Schema.Cpp/README.md index b573514..ad82cef 100644 --- a/Schema.Cpp/README.md +++ b/Schema.Cpp/README.md @@ -71,7 +71,7 @@ ExistingTypes = new Dictionary(StringComparer.Ordinal) } ``` -`Quantities` is the third kind of answer, and the one that covers a whole vocabulary in a line. A schema member may hold one of `ktsu.Semantics.Quantities`' 212 physical quantities, and if your program ran `ktsu.Semantics.Cpp` it already has all of them - so what you say is where they went, not what each one is called. It called each one what the schema calls it: +`Quantities` is the third kind of answer, and the one that covers a whole vocabulary in a line. A schema member may hold one of `ktsu.Semantics.Quantities`' 220 physical quantities, and if your program ran `ktsu.Semantics.Cpp` it already has all of them - so what you say is where they went, not what each one is called. It called each one what the schema calls it: ```csharp Quantities = new CppQuantitySpelling("holo", ""), diff --git a/Schema.Cpp/Schema.Cpp.csproj b/Schema.Cpp/Schema.Cpp.csproj index 70523ec..61c00ff 100644 --- a/Schema.Cpp/Schema.Cpp.csproj +++ b/Schema.Cpp/Schema.Cpp.csproj @@ -26,6 +26,7 @@ + diff --git a/Schema.Editor/EditorShortcuts.cs b/Schema.Editor/EditorShortcuts.cs index 981a097..6f1fb19 100644 --- a/Schema.Editor/EditorShortcuts.cs +++ b/Schema.Editor/EditorShortcuts.cs @@ -22,7 +22,7 @@ namespace ktsu.Schema.Editor; /// renders the menu's text from the same binding that fires the command. /// /// -/// The matching itself is ktsu.Keybinding.Core's, which this project already referenced and +/// The matching itself is ktsu.Keybinding's, which this project already referenced and /// did not use. Its equality is insensitive to the order the modifiers are /// written in and to case, and renders a chord in the same spelling /// the menu used to hard-code - so adopting it leaves the menu reading exactly as it did. @@ -87,7 +87,7 @@ private static readonly (string CommandId, string Name, string Chord)[] Bindings private readonly KeybindingService keybindings; /// - /// The keys a chord can be built around, each named as ktsu.Keybinding.Core spells it. + /// The keys a chord can be built around, each named as ktsu.Keybinding spells it. /// Derived from so that adding a shortcut needs no second edit here. /// private readonly string[] primaryKeys; diff --git a/Schema.Editor/Schema.Editor.csproj b/Schema.Editor/Schema.Editor.csproj index 3d73bef..e02b24f 100644 --- a/Schema.Editor/Schema.Editor.csproj +++ b/Schema.Editor/Schema.Editor.csproj @@ -21,7 +21,7 @@ - + diff --git a/Schema.Editor/SchemaEditor.cs b/Schema.Editor/SchemaEditor.cs index 78610eb..282b435 100644 --- a/Schema.Editor/SchemaEditor.cs +++ b/Schema.Editor/SchemaEditor.cs @@ -225,7 +225,7 @@ private void ProcessKeyboardShortcuts() } /// - /// Whether the key ktsu.Keybinding.Core names was pressed on this frame. + /// Whether the key ktsu.Keybinding names was pressed on this frame. /// /// /// The library spells the keys a chord is built from ("N", "S") exactly as ImGui names them in diff --git a/Schema.Test/QuantityTypeTests.cs b/Schema.Test/QuantityTypeTests.cs index 727bdd1..a815f69 100644 --- a/Schema.Test/QuantityTypeTests.cs +++ b/Schema.Test/QuantityTypeTests.cs @@ -39,15 +39,15 @@ public sealed class QuantityTypeTests /// The whole vocabulary is nameable, and it is the vocabulary the C++ projection emits. /// /// - /// 212 is not a number this repository chose: it is what ktsu.Semantics.Cpp writes - - /// 148 magnitudes, 27 signed scalars and 37 vectors - and the two counts agreeing is what says - /// a schema can name every quantity a C++ target has. It was 206 while six named vector + /// 220 is not a number this repository chose: it is what ktsu.Semantics.Cpp writes - + /// 153 magnitudes, 29 signed scalars and 38 vectors - and the two counts agreeing is what says + /// a schema can name every quantity a C++ target has. It would be 214 if the six named vector /// overloads went unregistered, which is the case /// pins directly. /// [TestMethod] public void TheVocabularyIsTheOneBothGeneratorsHave() => - Assert.HasCount(212, QuantityRegistry.All); + Assert.HasCount(220, QuantityRegistry.All); /// /// A magnitude, a signed scalar and a vector each report their own shape. @@ -196,7 +196,7 @@ public void AUnitOfTheRightDimensionIsAccepted() /// Two names for one set of exponents are both good units for either. /// /// - /// 72 of the vocabulary's dimensions share 63 exponent vectors - Torque and + /// 75 of the vocabulary's dimensions share 64 exponent vectors - Torque and /// Energy are one vector between two names - so the check compares the exponents and /// not the names. A joule and a newton metre are the same eight numbers, and a schema holding /// a torque in joules is saying nothing the physics refuses. diff --git a/Schema/Models/Metadata/QuantityRegistry.cs b/Schema/Models/Metadata/QuantityRegistry.cs index b398404..032f353 100644 --- a/Schema/Models/Metadata/QuantityRegistry.cs +++ b/Schema/Models/Metadata/QuantityRegistry.cs @@ -161,7 +161,7 @@ private static ReadOnlyDictionary Build() /// Displacement3D under another name and the vocabulary gives it no Magnitude() /// of its own, so the thing to follow is the one relationship it does declare: an overload /// widens implicitly to what it is an overload of. Six of the vocabulary's vector forms are - /// reached only this way, which is the difference between 206 quantities and 212. + /// reached only this way, which is the difference between 214 quantities and 220. /// /// private static DimensionInfo? DimensionOf(Type definition) => DimensionOfClosed(definition.MakeGenericType(typeof(double)), 0); diff --git a/Schema/Models/Names/QuantityName.cs b/Schema/Models/Names/QuantityName.cs index 21809d6..316b70e 100644 --- a/Schema/Models/Names/QuantityName.cs +++ b/Schema/Models/Names/QuantityName.cs @@ -10,7 +10,7 @@ namespace ktsu.Schema.Models.Names; /// /// Not an ISchemaRootName, and that is the difference from every other name here: a /// quantity is not something the schema declares, so there is nothing in the document for the -/// name to be unique against. It names one of ktsu.Semantics.Quantities' 212 quantities, +/// name to be unique against. It names one of ktsu.Semantics.Quantities' 220 quantities, /// and QuantityRegistry is what resolves it. /// public sealed record class QuantityName : SemanticString { } diff --git a/Schema/Models/Schema.Validation.cs b/Schema/Models/Schema.Validation.cs index c1d2357..3d60667 100644 --- a/Schema/Models/Schema.Validation.cs +++ b/Schema/Models/Schema.Validation.cs @@ -993,7 +993,7 @@ carrier.Unit is null || /// Whether two dimensions are the same eight exponents. /// /// - /// The exponents rather than the name, because 72 of the vocabulary's dimensions share 63 + /// The exponents rather than the name, because 75 of the vocabulary's dimensions share 64 /// exponent vectors: Torque and Energy are one vector between two names, and a /// newton metre is as good a unit for either. Comparing names would refuse that, and refusing /// what the physics allows is worse than not checking. diff --git a/Schema/Models/Types/Quantity.cs b/Schema/Models/Types/Quantity.cs index 05bafca..46ca214 100644 --- a/Schema/Models/Types/Quantity.cs +++ b/Schema/Models/Types/Quantity.cs @@ -20,7 +20,7 @@ namespace ktsu.Schema.Models.Types; /// This is the difference from , and both are wanted. A semantic type is /// how a schema says that its own two numbers are different things - an entity id is not a texture /// id - and nothing outside the schema has heard of either. A quantity is the opposite: the -/// vocabulary is shared, 212 names that both generators already emit, so naming one here reaches +/// vocabulary is shared, 220 names that both generators already emit, so naming one here reaches /// a type the target already has rather than a copy this schema asked for. /// /// diff --git a/docs/schema-format.md b/docs/schema-format.md index ae5e7d6..e7d7e15 100644 --- a/docs/schema-format.md +++ b/docs/schema-format.md @@ -517,7 +517,7 @@ other than `Float` on one is refused. ``` The one named type here whose name is not resolved against this schema. `quantityName` must be one -of the 212 quantities `ktsu.Semantics.Quantities` declares — `Mass`, `Length`, `Speed`, `Ratio`, +of the 220 quantities `ktsu.Semantics.Quantities` declares — `Mass`, `Length`, `Speed`, `Ratio`, `Heading`, `Radius`, `Velocity3D`, `Force3D`, and the rest. Nothing in `semanticTypes` declares it and nothing is generated for it: both generators already emit the vocabulary, so naming one reaches a type the target already has. @@ -541,7 +541,7 @@ A `unit` on a quantity must **measure what the quantity measures**. This is the semantic type it replaces could never make: a unit is text resolved through `UnitRegistry` and a type called `Kilograms` is a name nothing reads, so the two had no way to disagree. A quantity knows its own eight exponents and so does the unit, so the contradiction is arithmetic. The -exponents are compared and not the names, because 72 of the vocabulary's dimensions share 63 +exponents are compared and not the names, because 75 of the vocabulary's dimensions share 64 exponent vectors — a joule and a newton metre are the same eight numbers, and a torque held in joules is not something the schema is entitled to refuse. diff --git a/global.json b/global.json index b884868..2368fa7 100644 --- a/global.json +++ b/global.json @@ -5,15 +5,15 @@ }, "msbuild-sdks": { "MSTest.Sdk": "4.4.1", - "ktsu.Sdk": "2.30.0", - "ktsu.Sdk.ConsoleApp": "2.30.0", - "ktsu.Sdk.Tool": "2.30.0", - "ktsu.Sdk.App": "2.30.0", - "ktsu.Sdk.Windows": "2.30.0", - "ktsu.Sdk.Linux": "2.30.0", - "ktsu.Sdk.macOS": "2.30.0", - "ktsu.Sdk.iOS": "2.30.0", - "ktsu.Sdk.Android": "2.30.0" + "ktsu.Sdk": "2.31.2", + "ktsu.Sdk.ConsoleApp": "2.31.2", + "ktsu.Sdk.Tool": "2.31.2", + "ktsu.Sdk.App": "2.31.2", + "ktsu.Sdk.Windows": "2.31.2", + "ktsu.Sdk.Linux": "2.31.2", + "ktsu.Sdk.macOS": "2.31.2", + "ktsu.Sdk.iOS": "2.31.2", + "ktsu.Sdk.Android": "2.31.2" }, "test": { "runner": "Microsoft.Testing.Platform" diff --git a/samples/README.md b/samples/README.md index 95299a3..4e9ce6d 100644 --- a/samples/README.md +++ b/samples/README.md @@ -78,7 +78,7 @@ It is authored rather than derived — a mechanical rewrite could not decide tha **The two ways of saying "this number is not just a number" sit beside each other here**, which is the point of keeping `Coin`. A semantic type is the schema's own: nothing outside it has heard of a -coin, so the schema declares one and a generator emits it. A quantity is everybody's: 212 names +coin, so the schema declares one and a generator emits it. A quantity is everybody's: 220 names `ktsu.Semantics` already declares in both languages, so naming one reaches a type the target already has.