-
Notifications
You must be signed in to change notification settings - Fork 29
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
missing go.sum entry error #72
Comments
This issue appears to be because the --- a/get.go
+++ b/get.go
@@ -580,6 +580,10 @@ func install(runnable runner.Runnable, name string, link bool, pkg *bingo.Packag
return errors.Wrap(err, pkg.String())
}
+ if err := runnable.Download(runner.NoUpdatePolicy); err != nil {
+ return err
+ }
+
// Check if path is pointing to non-buildable package. Fail it is non-buildable. Hacky!
if listOutput, err := runnable.List(runner.NoUpdatePolicy, "-f={{.Name}}", pkg.Path()); err != nil {
return err --- a/pkg/runner/runner.go
+++ b/pkg/runner/runner.go
@@ -80,6 +80,7 @@ var cmdsSupportingModFileArg = map[string]struct{}{
"install": {},
"list": {},
"build": {},
+ "download": {},
}
func (r *Runner) execGo(ctx context.Context, output io.Writer, cd string, modFile string, args ...string) error {
@@ -121,6 +122,7 @@ func (r *Runner) exec(ctx context.Context, output io.Writer, cd string, command
}
type Runnable interface {
+ Download(update GetUpdatePolicy, args ...string) error
List(update GetUpdatePolicy, args ...string) (string, error)
GetD(update GetUpdatePolicy, packages ...string) (string, error)
Build(pkg, out string) error
@@ -176,6 +178,19 @@ func (r *runnable) List(update GetUpdatePolicy, args ...string) (string, error)
return strings.Trim(out.String(), "\n"), nil
}
+// List runs `go list` against separate go modules files if any.
+func (r *runnable) Download(update GetUpdatePolicy, args ...string) error {
+ a := []string{"mod", "download"}
+ if update != NoUpdatePolicy {
+ a = append(a, string(update))
+ }
+ out := &bytes.Buffer{}
+ if err := r.r.execGo(r.ctx, out, r.dir, r.modFile, append(a, args...)...); err != nil {
+ return errors.Wrap(err, out.String())
+ }
+ return nil
+}
+
// GoEnv runs `go env` with given args.
func (r *runnable) GoEnv(args ...string) (string, error) {
out := &bytes.Buffer{}
|
Hi we fixed this in recent release, please check 🤗 https://github.com/bwplotka/bingo/releases/tag/v0.4.0 Your suggested changes would work, but there are some edge cases that had to be fixed too. Thanks! |
I'm getting the same result as before with 0.4.0.
|
However, if I cp from the installed location to where bingo is expecting it to be then it works.
|
Thanks, will add your info to new issue #88 to track it (: |
It should be now resolved, including the documentation update to add |
The text was updated successfully, but these errors were encountered: