You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -145,6 +145,7 @@ var converted = sourceString.As<SourceType, TargetType>();
145
145
- Edit `Semantics.SourceGenerators/Metadata/dimensions.json` to add a dimension, vector form, semantic overload, or relationship.
146
146
- Rebuild `Semantics.SourceGenerators` and the consuming `Semantics.Quantities` project; emitted files appear in `Semantics.Quantities/Generated/Semantics.SourceGenerators/<GeneratorName>/`.
147
147
- Treat generator output as committed source. Diff it before commit so accidental regressions are visible.
148
+
- Factory names are **plural by convention** (#49). Each entry in `units.json` carries a `factoryName` field — the generator emits `From{factoryName}` (e.g. `Length.FromMeters`, `Mass.FromKilograms`, `Speed.FromMetersPerSecond`, `Length.FromFeet`, `Frequency.FromHertz`). Set it explicitly on every new unit; the generator falls back to `name + "s"` if absent, which is wrong for irregulars and "Per" compounds.
148
149
- Generator diagnostics:
149
150
-**SEM001** — a relationship in `dimensions.json` references a dimension that does not exist (typo or rename). The operator is silently dropped.
150
151
-**SEM002** — schema-level validation issue (missing `name`/`symbol`, empty `availableUnits`, duplicate type names, no vector forms declared).
Copy file name to clipboardExpand all lines: Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/AbsorbedDose.g.cs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ public record AbsorbedDose<T> : PhysicalQuantity<AbsorbedDose<T>, T>, IVector0<A
23
23
/// <param name="value">The value in Gray.</param>
24
24
/// <returns>A new <see cref="AbsorbedDose{T}"/> instance.</returns>
25
25
/// <exception cref="System.ArgumentException">Thrown when the resulting magnitude would be negative.</exception>
Copy file name to clipboardExpand all lines: Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Altitude.g.cs
+11-11Lines changed: 11 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -24,77 +24,77 @@ public record Altitude<T> : PhysicalQuantity<Altitude<T>, T>, IVector0<Altitude<
24
24
/// <param name="value">The value in Meter.</param>
25
25
/// <returns>A new Altitude instance.</returns>
26
26
/// <exception cref="System.ArgumentException">Thrown when the resulting magnitude would be negative.</exception>
Copy file name to clipboardExpand all lines: Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/AmountOfSubstance.g.cs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ public record AmountOfSubstance<T> : PhysicalQuantity<AmountOfSubstance<T>, T>,
23
23
/// <param name="value">The value in Mole.</param>
24
24
/// <returns>A new <see cref="AmountOfSubstance{T}"/> instance.</returns>
25
25
/// <exception cref="System.ArgumentException">Thrown when the resulting magnitude would be negative.</exception>
Copy file name to clipboardExpand all lines: Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Angle.g.cs
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -23,14 +23,14 @@ public record Angle<T> : PhysicalQuantity<Angle<T>, T>, IVector0<Angle<T>, T>
23
23
/// <param name="value">The value in Radian.</param>
24
24
/// <returns>A new <see cref="Angle{T}"/> instance.</returns>
25
25
/// <exception cref="System.ArgumentException">Thrown when the resulting magnitude would be negative.</exception>
Copy file name to clipboardExpand all lines: Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/ApertureAngle.g.cs
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -24,14 +24,14 @@ public record ApertureAngle<T> : PhysicalQuantity<ApertureAngle<T>, T>, IVector0
24
24
/// <param name="value">The value in Radian.</param>
25
25
/// <returns>A new ApertureAngle instance.</returns>
26
26
/// <exception cref="System.ArgumentException">Thrown when the resulting magnitude would be negative.</exception>
Copy file name to clipboardExpand all lines: Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/Area.g.cs
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -23,21 +23,21 @@ public record Area<T> : PhysicalQuantity<Area<T>, T>, IVector0<Area<T>, T>
23
23
/// <param name="value">The value in SquareMeter.</param>
24
24
/// <returns>A new <see cref="Area{T}"/> instance.</returns>
25
25
/// <exception cref="System.ArgumentException">Thrown when the resulting magnitude would be negative.</exception>
Copy file name to clipboardExpand all lines: Semantics.Quantities/Generated/Semantics.SourceGenerators/Semantics.SourceGenerators.QuantitiesGenerator/AtmosphericPressure.g.cs
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -24,21 +24,21 @@ public record AtmosphericPressure<T> : PhysicalQuantity<AtmosphericPressure<T>,
24
24
/// <param name="value">The value in Pascal.</param>
25
25
/// <returns>A new AtmosphericPressure instance.</returns>
26
26
/// <exception cref="System.ArgumentException">Thrown when the resulting magnitude would be negative.</exception>
0 commit comments