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
// Only expand directories: dependency paths can also point at non-default-named config files (e.g. another-name.hcl), which the stack-file parser would otherwise reject as "not a directory".
// MalformedDependencyError indicates a dependency block in an autoinclude file is malformed. Wrapped optionally carries the original HCL diagnostics so callers can extract position info via errors.As/Is.
137
+
// MalformedDependencyError indicates a dependency block in an autoinclude file is malformed. Err optionally carries the original HCL diagnostics so callers can extract position info via errors.As/Is.
138
138
typeMalformedDependencyErrorstruct {
139
-
Wrappederror
139
+
Errerror
140
140
FilePathstring
141
141
Namestring
142
142
Reasonstring
@@ -147,5 +147,5 @@ func (e MalformedDependencyError) Error() string {
// recordAutoIncludeSources adds entries to srcByAutoInclude mapping each AutoInclude pointer in stackFile to src. Called once for the root stack file and once per included file so each block knows which file it was parsed from.
337
+
// recordAutoIncludeSources maps each AutoInclude pointer in stackFile to the bytes of the file it was parsed from.
338
+
//
339
+
// Pointer-keying invariant: every *AutoIncludeHCL in the slice trees must be a unique allocation that is never copied into a value receiver, since the lookup at resolution time uses pointer identity. gohcl.DecodeBody satisfies this because it allocates a fresh struct for each block; only direct construction by callers would risk duplicate keys.
// Discovery callers may pass an arbitrary dependency path that is itself a regular file (e.g. another-name.hcl); ENOTDIR must be treated like a missing stack file, not a hard error.
// ParseStackFileFromPath is strict: passing a regular file produces an error. Callers that may receive non-directory paths (e.g. discovery) must filter them upstream.
0 commit comments