Failed to go build -o wsk using README.md instructions due to older client-go version
- Vorherrschende Sprache
- Go
- Sterne
- 109
- Forks
- 98
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
I cannot get the wsk CLI to build, following the README.md instructions page.
The `go build -o wsk` command fails with the following error -
```
go build -o wsk
# github.com/apache/incubator-openwhisk-cli/commands
commands/action.go:911:10: limits.Concurrency undefined (type *"github.com/apache/incubator-openwhisk-cli/vendor/github.com/apache/incubator-openwhisk-client-go/whisk".Limits has no field or method Concurrency)
commands/project.go:40:20: cannot use cobraCMD (type *"github.com/apache/incubator-openwhisk-cli/vendor/github.com/spf13/cobra".Command) as type *"github.com/spf13/cobra".Command in argument to cmd.Deploy
commands/project.go:51:22: cannot use cobraCMD (type *"github.com/apache/incubator-openwhisk-cli/vendor/github.com/spf13/cobra".Command) as type *"github.com/spf13/cobra".Command in argument to cmd.Undeploy
commands/project.go:63:20: cannot use cobraCMD (type *"github.com/apache/incubator-openwhisk-cli/vendor/github.com/spf13/cobra".Command) as type *"github.com/spf13/cobra".Command in argument to cmd.Deploy
commands/project.go:74:26: cannot use cobraCMD (type *"github.com/apache/incubator-openwhisk-cli/vendor/github.com/spf13/cobra".Command) as type *"github.com/spf13/cobra".Command in argument to cmd.ExportCmdImp
```
I can resolve the `cobra` errors by deleting the package from the vendor dir (not ideal), but the other issue,
```
go build -o wsk
# github.com/apache/incubator-openwhisk-cli/commands
commands/action.go:911:10: limits.Concurrency undefined (type *"github.com/apache/incubator-openwhisk-cli/vendor/github.com/apache/incubator-openwhisk-client-go/whisk".Limits has no field or method Concurrency)
```
, seems to be stemming from a mismatched client-go version.
I can see the master branch for github.com/apache/incubator-openwhisk-client-go/ now has the `Concurrency` field added to the `Limits` struct (https://github.com/apache/incubator-openwhisk-client-go/blob/master/whisk/shared.go#L100), but `go get` seems to fetch an older commit of the client-go library causing the build to fail.
Beitragsleitfaden
Rechercherichtung
Beginnen Sie mit den Build-Anweisungen in README.md und führen Sie `go build -o wsk` aus, um die Fehler zu reproduzieren. Untersuchen Sie commands/action.go, commands/project.go sowie die vendored-Pakete client-go und cobra, um die referenzierten APIs und Abhängigkeitsversionen zu vergleichen. Als erledigt gilt die Aufgabe, wenn der dokumentierte Build abgeschlossen wird, ohne Pakete aus vendor zu löschen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- go
- Bereich
- build-system, cli
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 42/100