diff --git a/.gitignore b/.gitignore index dc0470af..e043c9f7 100644 --- a/.gitignore +++ b/.gitignore @@ -203,6 +203,11 @@ PublishScripts/ **/[Pp]ackages/* # except build/, which is used as an MSBuild target. !**/[Pp]ackages/build/ +# and except a Unity project's Packages/, which is source: Unity's package manifest and its +# resolved lock file are both meant to be committed, and a NuGet restore folder never contains +# a file by either name. +!**/[Pp]ackages/manifest.json +!**/[Pp]ackages/packages-lock.json # Uncomment if necessary however generally it will be regenerated when needed #!**/[Pp]ackages/repositories.config # NuGet v3's project.json files produces more ignorable files @@ -651,3 +656,16 @@ Temporary Items # ImGui.ini files imgui.ini + +# Game engine projects +# +# Godot: the import cache, and the mono/temp bin+obj a C# build writes. +.godot/ + +# Unity: .meta files are source, not the Visual Studio C++ build artifact that the `*.meta` rule +# further up targets. Unity generates one per asset and it carries the GUID that scenes, prefabs +# and serialized references point at, so ignoring them gives every clone fresh GUIDs and silently +# breaks those references - including for a plug-in whose .dll is itself a build output. This +# negation has to come after that rule to win, and is scoped to the asset tree so the Visual +# Studio artifact stays ignored everywhere else. +!**/[Aa]ssets/**/*.meta diff --git a/CLAUDE.md b/CLAUDE.md index 69a8af75..87f4da21 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -250,7 +250,7 @@ forms as well, and matching it is a change to every form at once rather than par ### Can the quantities be generated for languages other than C# and C++? -`SevenTargetProjectionTests` is the probe that answers it, and the answer so far is **six of +`SevenTargetProjectionTests` is the probe that answers it, and the answer is now **seven of seven**. It builds one quantity — the magnitude form of `Length`, read from the real `dimensions.json` — as a language-agnostic `ktsu.Coder` AST and writes it in all seven of that library's targets. The neutral shape is the whole of what a generated magnitude is: a record struct @@ -260,21 +260,22 @@ C# comes out as exactly what `QuantitiesGenerator` writes today, which is the re the AST is expressive enough for the quantities, so what the other six do is a question about those languages rather than about the model. -**One target writes source its own toolchain refuses**, recorded upstream and not fixable here: - -| Target | What comes out | Why | -|---|---|---| -| Go | `type Length struct` with no parameters, then `func LengthFromMeter(value T) Length[T]` | ktsu-dev/Coder#63 — a generic type is deliberately written down rather than emitted, and the constructor was not given the same treatment. `go vet` says `undefined: T`. | - -The test **pins** it rather than skipping it, so the day it is fixed upstream the test fails and is -updated to assert the fix. - -**Python was the second, and the pin is what caught the fix.** It wrote -`class Length(IVector0[Length[T], T])`, which raises `NameError` on import because Python evaluates -a base list eagerly. ktsu-dev/Coder#64 fixed that to the string forward reference -`IVector0["Length[T]", T]`, and the first build after the bump from ktsu.Coder 3.14.0 to 3.14.3 -failed here — which is the whole point of pinning rather than skipping, and is how the fix was -noticed at all. The test asserts the fix now, so a regression upstream fails the same way round. +**Two targets used to write source their own toolchain refuses**, both recorded upstream and both +since fixed there. Each was **pinned** rather than skipped, so the day it was fixed the test failed +and was updated to assert the fix — which is how both fixes were noticed at all. The tests assert +the fixes now, so a regression upstream fails the same way round. + +**Python was the first to be fixed.** It wrote `class Length(IVector0[Length[T], T])`, which raises +`NameError` on import because Python evaluates a base list eagerly. ktsu-dev/Coder#64 fixed that to +the string forward reference `IVector0["Length[T]", T]`, and the first build after the bump from +ktsu.Coder 3.14.0 to 3.14.3 failed here. + +**Go was the second.** A generic type is deliberately written down rather than emitted, and the +constructor was not given the same treatment: it wrote `type Length struct` with no parameters, then +`func LengthFromMeter(value T) Length[T]`, and `go vet` said `undefined: T`. ktsu-dev/Coder#63 wrote +everything over the parameter down too — the field is `Value any` and the constructor is +`func LengthFromMeter(value any) Length` — and the first build after the bump from ktsu.Coder 3.14.3 +to 3.18.12 failed here. The probe lives in `Semantics.Cpp.Test` because that is where the reader of `dimensions.json` is, and that is itself the finding about this repository: `QuantityMetadata` and `MetadataProjection` diff --git a/Directory.Packages.props b/Directory.Packages.props index e5aabc7f..15fac46c 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -9,8 +9,8 @@ - - + + @@ -25,11 +25,11 @@ - + - - - + + +