Skip to content

Commit 905f446

Browse files
committed
DYN-9702: Log when shared definitions folder is missing
Add a Trace.TraceWarning in PathManager.DefinitionDirectories when the common "definitions" folder (containing Curve_Validate.dyf, copied by DynamoCore.csproj at build time) is not found at commonDataDir. This is diagnostic-only -- the returned directory list is unchanged, and we deliberately do not auto-create the folder (that approach was tried and reverted). Previously this case failed completely silently, which caused a hard-to-diagnose CI regression. PathManager has no injected logger, so this follows the existing Trace-based diagnostic convention used elsewhere in the codebase for logger-less, non-fatal issues rather than adding a new logging dependency.
1 parent 1875d20 commit 905f446

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/DynamoCore/Configuration/PathManager.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,17 @@ public IEnumerable<string> DefinitionDirectories
225225
{
226226
definitionDirectories.Add(commonDefinitionsDirectory);
227227
}
228+
else if (!Directory.Exists(commonDefinitionsDirectory))
229+
{
230+
// Diagnostic only: the shared "definitions" folder (e.g. Curve_Validate.dyf)
231+
// is expected to be copied next to DynamoCore.dll at build time (see the
232+
// Copy targets in DynamoCore.csproj). If it's missing, do not fabricate or
233+
// add the path here -- just make the omission visible so this doesn't fail
234+
// silently again (DYN-9702). PathManager has no injected logger, so this
235+
// follows the existing low-level Trace-based diagnostic convention used
236+
// elsewhere in DynamoCore instead of adding a new logging dependency.
237+
Trace.TraceWarning("Expected shared definitions folder not found at: " + commonDefinitionsDirectory);
238+
}
228239

229240
return definitionDirectories;
230241
}

0 commit comments

Comments
 (0)