hashicorp / hashicorp/go-bexpr

Implement support of cyclical data structures.

Open
#3 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
123
Forks
17
Avg merge
7h 36m
Merged PRs (30d)
3

Description

Right now if we try to generate field configurations on a cyclical data structure the reflection logic will generate a stack overflow due to recursing too many times.

One way I have been thinking about fixing this is to keep a map of types to field configurations during the generation phase. If we encounter a type a second time we just reuses the memoized field configuration and do not recurse. I hacked this in there and it seemed to work but I probably should do it in a little cleaner way.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.