-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreWG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility modulecmdlets in the Microsoft.PowerShell.Utility module
Description
The current way to deal with circular references is the Depth parameter. Its default value is too low and increasing it doesn't address a usual use case where the object is deep and doesn't contain any circular reference.
Add a CircularDetection switch parameter.
Once a circular reference is detected, throw an exception. If the switch is not present, cap the object by the depth limit.
Currently no exception is thrown when the depth limit is reached. This easily propagates the error and may remain undetected until the collected data is evaluated. One option to consider is to make the detection default. The switch can be changed to -DisableCircularDetection which enables the current behavior. This is a breaking change for some users.
Unaffected groups of users:
- Those who use the
Depthparameter. - Those who use shallow objects falling bellow the depth limit.
- Those who use deep objects without circular references, but are not aware of or affected by the silent error.
Affected groups of users:
- Those who use objects with circular references while the very low depth limit doesn't affect them.
Metadata
Metadata
Assignees
Labels
Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreWG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility modulecmdlets in the Microsoft.PowerShell.Utility module