cmd/dep: always ensure that gps.SolveParameters are validated - #981
Conversation
daaffa7 to
186b556
Compare
|
would it be easy to add some basic regression tests for this, just via the test harness? |
| } | ||
| return errors.Wrap(err, "validateParams") | ||
| } | ||
|
|
There was a problem hiding this comment.
Any reason for repeating and not sharing the code with a common function?
There was a problem hiding this comment.
I'll update this PR. 👍
carolynvs
left a comment
There was a problem hiding this comment.
I'm good with this, but agree with @darkowlzz that I'd prefer the validation to be a shared function.
Signed-off-by: Ibrahim AshShohail <ibra.sho@gmail.com>
186b556 to
56d7909
Compare
|
@carolynvs, @darkowlzz : I've added a method in |
| } | ||
|
|
||
| return errors.Wrap(err, "validateParams") | ||
| } |
There was a problem hiding this comment.
Since all the parts involved in this are gps related, maybe adding it to gps/solver.go would be better, like ValidateParamsWithLogs() or some better name? Just a suggestion.
There was a problem hiding this comment.
I'm open for suggestions.
The only reason I had to put it in dep.Ctx was that it's about logging the errors since the real logic is in gps.
There was a problem hiding this comment.
let's stick with this for now, at least. i know we're continuing to add more logging directly in gps elsewhere, but i still want to try to do that as little as possible, until i have time for some proper design think on how to do it generally.
Same as #697
Ensure that we validate
gps.SolveParametersindep init,dep statusand the new modes indep ensure.