Shared Nuke build-component policy for the ANcpLua
OpenTelemetry semantic-conventions toolchain. This package does not generate or
emit anything itself — it ships two INukeBuild component interfaces and one
helper class that two sibling repositories implement to keep their generation
and API surfaces in lockstep.
Not an official OpenTelemetry artifact. The conventions themselves come from the upstream
open-telemetry/semantic-conventionsrepository; this package only defines the build policy used to mirror them.
open-telemetry/semantic-conventions@v{SemconvVersion}
|
v
+---------------------------------------+
| ANcpLua/typespec-otel-semconv |
| implements IUpstreamConventions |
| publishes @ancplua/typespec-otel- |
| semconv@{SemconvVersion}-{n} |
+---------------------------------------+
|
npm (GitHub Packages)
|
v
+---------------------------------------+
| O-ANcppLua/ANcpLua.OtelConventions.Api|
| implements IDomainConventionsApi |
| publishes @o-ancpplua/otel- |
| conventions-api |
+---------------------------------------+
Both repositories take a PackageReference on this package and implement
their respective interface. Interface targets are declared here so a change to
the lockstep policy (a new verification gate, a renamed target, an added
parameter) lands in one place.
| Interface | Consumer repository | npm package published |
|---|---|---|
IUpstreamConventions |
ANcpLua/typespec-otel-semconv |
@ancplua/typespec-otel-semconv@{semconv}-{n} |
IDomainConventionsApi |
O-ANcppLua/ANcpLua.OtelConventions.Api |
@o-ancpplua/otel-conventions-api |
<ItemGroup>
<PackageReference Include="Nuke.OpenTelemetry.Conventions" Version="0.1.0" />
</ItemGroup>using Nuke.Common;
using Nuke.OpenTelemetry.Conventions;
class Build : NukeBuild, IUpstreamConventions
{
public static int Main() =>
Execute<Build>(x => ((IUpstreamConventions)x).PublishTypeSpecLibrary);
}Targets the consumer overrides (typical):
RestoreWeaver,FetchSemconvModel,GenerateOtelKeysVerifyOtelKeysReproducible,VerifyOtelKeysScriptParity,VerifyOtelKeysCompile,RunSmokeTests,VerifyCleanPackTypeSpecLibrary,PublishTypeSpecLibrary
using Nuke.Common;
using Nuke.OpenTelemetry.Conventions;
class Build : NukeBuild, IDomainConventionsApi
{
public static int Main() =>
Execute<Build>(x => ((IDomainConventionsApi)x).PublishApiPackage);
}Targets the consumer overrides (typical):
RestoreTypeSpecDeps,VerifyKeysLockstep,CompileDomainSpecEmitCSharp,EmitDuckDb,EmitTsTypes,LintConventions,EmitAllVerifyEmitDeterministic,BuildCSharpEmit,VerifyNoManualEditsToGeneratedPackApiPackage,PublishApiPackage
The upstream npm package version is {semconv-version}-{n} where semconv-version
mirrors the pinned open-telemetry/semantic-conventions release tag (e.g.
1.41.0) and n is a monotonic generator-revision counter starting at 1.
The downstream package must pin an exact {semconv}-{n} version in
package-lock.json and verify that the keys file shipped by the upstream
package matches its own generated/otel-keys.gen.tsp byte-for-byte. This is
what IDomainConventionsApi.VerifyKeysLockstep enforces.
LockstepPolicy.ParseSemconvSuffixVersion("1.41.0-3") returns ("1.41.0", 3)
and is the canonical parser shared by both builds.
- Targets
net10.0(Nuke.Common 10.x ships only a net10.0 assembly). - Built against
Nuke.Common10.1.0. - SDK pinned via
global.jsonto .NET 10.
Apache-2.0. Copyright 2026 Alexander Nachtmann.