Closed hanzei closed 4 years ago
I would like to work on this issue!
Awesome, thanks @AugustasV :tada:
Couldn't successfully run make dist command:
namai@solydx:~/mattermost/mattermost-plugin-agenda$ make dist./build/bin/manifest apply mkdir -p server/dist; cd server && env GOOS=linux GOARCH=amd64 /usr/local/go/bin/go build -o dist/plugin-linux-amd64; ../../../go/pkg/mod/github.com/mattermost/mattermost-server@v5.11.1+incompatible/plugin/hclog_adapter.go:86:2: cannot use h (type *hclogAdapter) as type hclog.Logger in return argument: *hclogAdapter does not implement hclog.Logger (missing ImpliedArgs method) ../../../go/pkg/mod/github.com/mattermost/mattermost-server@v5.11.1+incompatible/plugin/hclog_adapter.go:90:2: cannot use h (type *hclogAdapter) as type hclog.Logger in return argument: *hclogAdapter does not implement hclog.Logger (missing ImpliedArgs method) ../../../go/pkg/mod/github.com/mattermost/mattermost-server@v5.11.1+incompatible/plugin/hclog_adapter.go:94:2: cannot use h (type *hclogAdapter) as type hclog.Logger in return argument: *hclogAdapter does not implement hclog.Logger (missing ImpliedArgs method) ../../../go/pkg/mod/github.com/mattermost/mattermost-server@v5.11.1+incompatible/plugin/supervisor.go:62:3: cannot use hclogAdaptedLogger (type *hclogAdapter) as type hclog.Logger in field value: *hclogAdapter does not implement hclog.Logger (missing ImpliedArgs method) make: *** [Makefile:58: server] Error 2
How could I solve this issue? on mattermost-plugin-google-calendar repo everything worked fine.
@AugustasV Is it possible that you are not using the latest master
of this plugin?
@hanzei it's not the case, merged latest master but problem still persist.
Could you please push a WIP PR so I can take a look?
Made pull request, but now this error:
./command.go:141:32: p.MattermostPlugin.API.SearchPostsInTeamForUser undefined (type "github.com/mattermost/mattermost-server/v5/plugin".API has no field or method SearchPostsInTeamForUser) make: *** [Makefile:58: server] Error 2
If I try same steps on fresh cloned repo, I got npm build errors:
ERROR in ./src/index.js Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: Cannot find module '@babel/compat-data/corejs3-shipped-proposals' Require stack:
Hey @AugustasV, thanks for reaching out! Please see my comment in the PR: https://github.com/mattermost/mattermost-plugin-agenda/pull/48#issuecomment-652261791
Mattermost is currently in the process of using
golangci-lint
as the default linter for all go projects. https://github.com/mattermost/mattermost-plugin-autolink/pull/108 serves as an example of how the migration should look like:.golangci.yml
from https://github.com/mattermost/mattermost-plugin-autolink/ into this repository.Makefile
from https://github.com/mattermost/mattermost-plugin-autolink/ into this repository.build/
from https://github.com/mattermost/mattermost-plugin-autolink/ into this repository.go mod tidy
andmake dist
to ensure the build system works fine.linters-settings.goimports.local-prefixes
to the go module path i.e. togithub.com/mattermost/mattermost-plugin-aws-SNS
.make golangci-lint
and fix all issues that arise.Fixing an linter issue is sometimes trivial but can also be quite complicated. There might be cases, where ignoring an issue using
issues.exclude-rules
is needed. If you don't know how to resolve an error, please reach out to@hanzei
on the Mattermost Community Server or ask the question here.