Skip to content
This repository has been archived by the owner on Feb 13, 2022. It is now read-only.

Changes to go-imap API #49

Closed
galaxor opened this issue Jan 7, 2018 · 3 comments
Closed

Changes to go-imap API #49

galaxor opened this issue Jan 7, 2018 · 3 comments

Comments

@galaxor
Copy link
Contributor

galaxor commented Jan 7, 2018

It looks like the go-imap API has changed, and so "go get -u github.com/emersion/neutron" doesn't work anymore.

I started to try to fix it, but it looks like you (emersion) are the maintainer of go-imap, so you might be able to do it faster or more correctly than I am.

root@fb04f9e472e0:/go# go get -u github.com/emersion/neutron
# github.com/emersion/neutron/backend/imap
src/github.com/emersion/neutron/backend/imap/attachments.go:46:21: cannot use items (type []string) as type []imap.FetchItem in argument to c.Client.UidFetch
src/github.com/emersion/neutron/backend/imap/attachments.go:56:55: cannot use "BODY[" + partId + "]" (type string) as type *imap.BodySectionName in argument to data.GetBody
src/github.com/emersion/neutron/backend/imap/conn.go:105:13: invalid operation: c.Client.State & imap.ConnectedState (mismatched types func() imap.ConnState and imap.ConnState)
src/github.com/emersion/neutron/backend/imap/conn.go:154:34: c.Client.Mailbox.Name undefined (type func() *imap.MailboxStatus has no field or method Name)
src/github.com/emersion/neutron/backend/imap/conn.go:174:21: c.MailboxUpdates undefined (type *conn has no field or method MailboxUpdates)
src/github.com/emersion/neutron/backend/imap/conn.go:185:21: c.Expunges undefined (type *conn has no field or method Expunges)
src/github.com/emersion/neutron/backend/imap/conn.go:286:34: c.Client.Mailbox.Name undefined (type func() *imap.MailboxStatus has no field or method Name)
src/github.com/emersion/neutron/backend/imap/events.go:39:22: c.Client.Mailbox.Name undefined (type func() *imap.MailboxStatus has no field or method Name)
src/github.com/emersion/neutron/backend/imap/events.go:44:32: cannot use []string literal (type []string) as type []imap.FetchItem in argument to c.Client.Fetch
src/github.com/emersion/neutron/backend/imap/events.go:44:33: undefined: imap.UidMsgAttr
src/github.com/emersion/neutron/backend/imap/events.go:44:32: too many errors
@galaxor
Copy link
Contributor Author

galaxor commented Jan 7, 2018

Also: I'm not very familiar with go. Is there some way to tell it that neutron depends on a particular version or branch of go-imap? That seems like a more sustainable way to handle this in the future. Otherwise, it's just "can I install neutron today?"

@galaxor galaxor mentioned this issue Jan 7, 2018
@emersion
Copy link
Owner

emersion commented Jan 7, 2018

We should switch to dep to pin to dependencies commits.

@emersion
Copy link
Owner

emersion commented Jan 7, 2018

Fixed by #50.

@emersion emersion closed this as completed Jan 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants