-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#fix : update patch.go to call PatchValue correctly #397
base: _dev
Are you sure you want to change the base?
Conversation
PatchValue accepts (patch, val, ...), but was receiving (val, patch). this is predicated on `orig` being the data getting patched, and `patch` being the patch plan, (as if generated by diff).
wrapped in golang stdlib context and moved to channel event handler pattern to hopefully submit a better base for this module. two process management channels for watching completeness and error via wait groups. unsure if `ret` defaults are what we want, but put them in there for succinctness. single config extraction function instead of ferr
What's with the Not opposed, can you add a bit about what those changes are for or improve? |
|
||
ferr := func() error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didn't like this style tbh. i'm more of a clear, linear, conditional function dispatch kinda guy. despite some of my code sometimes not looking like that.
} | ||
|
||
// fill exit code / successful |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm like 99% sure this use of ProcessState
before checking if it was available was causing a segmentation fault for me. i'm kinda passed it so i forgot the reproduction. i was moving fast so i just re-wrote it with some ai help in all honesty. i've read a decent amount of the codebase and had to hand stitch this together since claude didn't exactly do well. it mainly just helped with what i would imagine a cookie cutter implementation for a nice threaded approach might look like with room for tracking multiple channels. i'm no goru but it works so far :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i can put it on my list to reproduce, but it might be a couple hundred thousand minutes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i show probably review the things i submit and provide more context. @verdverm
return ret, nil | ||
} | ||
|
||
func extractExecConfig(v cue.Value) ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"clean, linear, function dispatch"
issue
PatchValue accepts (patch, val, ...), but was receiving (val, patch).
this is predicated on
orig
being the data getting patched, andpatch
being the patch plan, (as if generated by diff).test