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 ghodss/yaml package contains a bug that I tripped on when converting our AST data structures over to using pointers in their maps instead of values. (This was required to avoid making copies of nodes which caused problems elsewhere.) Unfortunately, this bug seems to be known: there is an outstanding PR ghodss/yaml#7 and at least one open issue pertaining to this.
For now, I have forked the library to joeduffy/yaml, and fixed the bug. This is obviously not a great long-term strategy. I also didn't work to narrow down the root cause to a minimal repo, since I really don't understand much of why that reflection fu is in there to begin with.
I was tempted to navigate away from this library and towards go-yaml/yaml, however, then I read the original motivation for ghodss's approach: http://ghodss.com/2014/the-right-way-to-handle-yaml-in-golang/. I agree with the overall spirit (though worry about the performance). And even a 1 minute thought exercise of the annotation bloat that would result made my stomach ache.
So for now, I've gone the quick-and-dirty route. We likely need to revisit our choices here anyway as soon as we tackle #4, so I didn't want to invest too much time right now.
The text was updated successfully, but these errors were encountered:
The ghodss/yaml package contains a bug that I tripped on when converting our AST data structures over to using pointers in their maps instead of values. (This was required to avoid making copies of nodes which caused problems elsewhere.) Unfortunately, this bug seems to be known: there is an outstanding PR ghodss/yaml#7 and at least one open issue pertaining to this.
For now, I have forked the library to joeduffy/yaml, and fixed the bug. This is obviously not a great long-term strategy. I also didn't work to narrow down the root cause to a minimal repo, since I really don't understand much of why that reflection fu is in there to begin with.
I was tempted to navigate away from this library and towards go-yaml/yaml, however, then I read the original motivation for ghodss's approach: http://ghodss.com/2014/the-right-way-to-handle-yaml-in-golang/. I agree with the overall spirit (though worry about the performance). And even a 1 minute thought exercise of the annotation bloat that would result made my stomach ache.
So for now, I've gone the quick-and-dirty route. We likely need to revisit our choices here anyway as soon as we tackle #4, so I didn't want to invest too much time right now.
The text was updated successfully, but these errors were encountered: