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
{{ message }}
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.
This seems brittle, particularly for tests executed in parallel. Is there a compelling reason to leave this global variable as is? Or would it be worth exploring alternatives, like injecting the function?
This variable and function are the sole members of package internal, which is a bit irregular in any case. Regardless of (1), should these be moved elsewhere? (up to gps if the nested internal is now redundant? or into a new sub-package?)
The text was updated successfully, but these errors were encountered:
This seems brittle, particularly for tests executed in parallel. Is there a compelling reason to leave this global variable as is? Or would it be worth exploring alternatives, like injecting the function?
Quite agreed - see the discussion in the PR that originally introduced it, sdboyer/gps#189. This was a "good enough for now" hack. If we can find a more elegant way of doing it, then great. (Honestly, the func itself is kind of a nasty hack IMO, but it's what the toolchain currently does, so...)
This variable and function are the sole members of package internal, which is a bit irregular in any case. Regardless of (1), should these be moved elsewhere? (up to gps if the nested internal is now redundant? or into a new sub-package?)
It's still out of scope for anything not in gps to be touching it, so let's keep it doubly-internal. But yeah, it's definitely wrong to have it directly in internal; a subpackage therein would be good.
internal/gps/internal/internal.go
contains a global function variableIsStdLib
, for swapping in alternative test implementations.This seems brittle, particularly for tests executed in parallel. Is there a compelling reason to leave this global variable as is? Or would it be worth exploring alternatives, like injecting the function?
This variable and function are the sole members of
package internal
, which is a bit irregular in any case. Regardless of (1), should these be moved elsewhere? (up togps
if the nestedinternal
is now redundant? or into a new sub-package?)The text was updated successfully, but these errors were encountered: