mattermost / mattermost-plugin-google-calendar

Mattermost Google Calendar Plugin
35 stars 35 forks source link

Make command failed #39

Closed DJIronic closed 1 year ago

DJIronic commented 2 years ago

I installed listed dependencies, then cloned the repository and run command make.

This is the error:

build/deploy/main.go:116:8: undeclared name: `archiver` (typecheck)
        err = archiver.Unarchive(bundlePath, targetPath)
              ^
build/deploy/main.go:12:2: "github.com/mholt/archiver/v3" imported but not used (typecheck)
        "github.com/mholt/archiver/v3"
        ^
server/utils.go:63:54: undeclared name: `calendar` (typecheck)
func (p *Plugin) getCalendarService(userID string) (*calendar.Service, error) {
                                                     ^
server/utils.go:141:73: undeclared name: `calendar` (typecheck)
func (p *Plugin) updateEventsInDatabase(userID string, changedEvents []*calendar.Event) {
                                                                        ^
server/utils.go:334:57: undeclared name: `calendar` (typecheck)
func (p *Plugin) printEventSummary(userID string, item *calendar.Event) string {
                                                        ^
server/api.go:53:14: p.API undefined (type *Plugin has no field or method API) (typecheck)
        if err := p.API.KVSet(state, []byte(state)); err != nil {
                    ^
server/api.go:89:27: p.API undefined (type *Plugin has no field or method API) (typecheck)
        storedState, apiErr := p.API.KVGet(state)
                                 ^
server/api.go:100:14: p.API undefined (type *Plugin has no field or method API) (typecheck)
        if err := p.API.KVDelete(state); err != nil {
                    ^
server/plugin.go:37:18: p.Helpers undefined (type *Plugin has no field or method Helpers) (typecheck)
        botID, err := p.Helpers.EnsureBot(&model.Bot{
                        ^
server/api.go:13:2: "google.golang.org/api/calendar/v3" imported but not used (typecheck)
        "google.golang.org/api/calendar/v3"
        ^
server/command_hooks.go:14:2: "google.golang.org/api/calendar/v3" imported but not used (typecheck)
        "google.golang.org/api/calendar/v3"
        ^
server/utils.go:19:2: "google.golang.org/api/calendar/v3" imported but not used (typecheck)
        "google.golang.org/api/calendar/v3"
        ^
../../../snap/golangci-lint/80/src/runtime/cgo/cgo.go:34:8: could not import C (cgo preprocessing failed) (typecheck)
import "C"
       ^
make: *** [Makefile:47: golangci-lint] Error 1
MioAtSwivel commented 2 years ago

Issue happening on Mac M1 also CleanShot 2022-09-20 at 14 02 38

hanzei commented 2 years ago

../../../snap/golangci-lint/80/src/runtime/cgo/cgo.go:34:8: could not import C (cgo preprocessing failed) (typecheck) import "C"

Do you have gcc installed?

MioAtSwivel commented 2 years ago

gcc is installed on my compiling machine CleanShot 2022-09-22 at 09 48 00

hanzei commented 1 year ago

Should be fixed with https://github.com/mattermost/mattermost-plugin-google-calendar/pull/40