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
The problem config used import several times where the same snippet was imported and caused a conflict error. However while the snippet name was the source of conflict, the contents of the snippet was identical (same import source too), thus it's not really a conflict.
This would also occur without import (which I understand is effectively equivalent to copy/paste), by declaring the same snippet twice in a single Caddyfile.
Solution proposed was for such an error to compare the two snippets via a content hash. If they're the exact same snippet then instead of an error, the subsequent imports could be ignored (or if the error happens at a later stage of validation, deduped).
Workaround suggested was to avoid the named snippet syntax and just use import on individual files without the snippet syntax wrapping it.
The text was updated successfully, but these errors were encountered:
Raising an issue from this community discussion.
The problem config used
import
several times where the same snippet was imported and caused a conflict error. However while the snippet name was the source of conflict, the contents of the snippet was identical (same import source too), thus it's not really a conflict.This would also occur without
import
(which I understand is effectively equivalent to copy/paste), by declaring the same snippet twice in a single Caddyfile.Solution proposed was for such an error to compare the two snippets via a content hash. If they're the exact same snippet then instead of an error, the subsequent imports could be ignored (or if the error happens at a later stage of validation, deduped).
Workaround suggested was to avoid the named snippet syntax and just use
import
on individual files without the snippet syntax wrapping it.The text was updated successfully, but these errors were encountered: