fix(ablegacy): stamp health from the injectable Clock; drop the redundant per-project TreatWarningsAsErrors (lmxopcua#768)
AbLegacyDriver stamped LastSuccessfulRead (init, read, write), the read's sample timestamps and host-state change times from raw DateTime.UtcNow; only the backoff path read the injectable Clock. All of them now read Clock(), so NativePcccBridgeStatusHealthTests drives a manual clock (init at T0, read at T1) and asserts LastSuccessfulRead == T1 exactly instead of spin-waiting for the wall clock to pass the init stamp (#767). Without the driver change the 6 tests fail (init stamp is wall-clock, not T0). Directory.Build.props sets TreatWarningsAsErrors for every project since #766, so the 75 per-csproj copies (64 src + 11 tests) are removed and the props comment says it is now the only place. tools/mem-probe keeps its explicit opt-out. Release build: 0 warnings, 0 errors; a planted CS0168 still fails the build in a src project and in a test project that used to carry its own copy. Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
This commit is contained in:
@@ -4,9 +4,9 @@
|
||||
|
||||
TreatWarningsAsErrors is ON for every project, src/ and tests alike (#766 ratchet). The solution builds with
|
||||
0 warnings since #725 (xUnit1051 etc. cleaned), so any new warning, including analyzer ones, now fails the
|
||||
build instead of accumulating. The 61 src/ projects also still set it in their own csproj (#606); that is
|
||||
redundant but harmless. A project that genuinely needs an exception should suppress the specific warning
|
||||
via NoWarn, not turn this off.
|
||||
build instead of accumulating. This is the ONLY place it is set: the per-project copies (#606) were removed
|
||||
(#768), so do not add it back to a csproj. A project that genuinely needs an exception should suppress the
|
||||
specific warning via NoWarn, not turn this off (only the throwaway tools/mem-probe probes opt out).
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
|
||||
Reference in New Issue
Block a user