这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@foxcpp
Copy link
Collaborator

@foxcpp foxcpp commented Mar 4, 2020

This change is backward compatible with v1.

go-imap-unselect needs an update to avoid 'leaking' mailboxes, I propose to merge it into go-imap along the way per #322.

Closes #337.

@foxcpp foxcpp added the server label Mar 4, 2020
@codecov
Copy link

codecov bot commented Mar 4, 2020

Codecov Report

Merging #341 into master will increase coverage by 0.02%.
The diff coverage is 72.72%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #341      +/-   ##
==========================================
+ Coverage   73.55%   73.58%   +0.02%     
==========================================
  Files          32       32              
  Lines        3524     3528       +4     
==========================================
+ Hits         2592     2596       +4     
  Misses        643      643              
  Partials      289      289              
Impacted Files Coverage Δ
server/cmd_auth.go 80.15% <72.72%> (+0.62%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 89df427...9973129. Read the comment docs.

@foxcpp foxcpp mentioned this pull request Mar 4, 2020
8 tasks
@emersion
Copy link
Owner

Honestly I'm not a big fan of this change. This doesn't fit well with the v1 interfaces. I'd prefer to start working on a v2 branch to address this issue (by adding a mandatory Mailbox.Close method and making ListMailboxes return MailboxInfo structs directly).

@foxcpp
Copy link
Collaborator Author

foxcpp commented Apr 15, 2020

Alright, I will update this PR this weekend (hopefully, soju :\ ).

@foxcpp
Copy link
Collaborator Author

foxcpp commented Apr 15, 2020

I guess, https://github.com/foxcpp/go-imap-maildir will be built along with go-imap v2 then :)

@foxcpp foxcpp changed the title server: Close mailboxes if they implement io.Closer server: Add Mailbox.Close, make ListMailboxes return MailboxInfo Apr 26, 2020
@foxcpp foxcpp added this to the v2 milestone Apr 26, 2020
@foxcpp foxcpp added the breaking Backward-incompatible changes needed label Apr 26, 2020
@foxcpp foxcpp requested a review from emersion April 26, 2020 17:03
@foxcpp foxcpp changed the base branch from master to dev April 29, 2020 07:28
}
defer mbox.Close()

return mbox.SetSubscribed(true)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should be a User method instead, so that a mailbox is only opened on SELECT?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. I think I even mentioned that somewhere but this is out-of-scope of this PR.

@emersion
Copy link
Owner

emersion commented May 11, 2020

Overall looks good. We could discuss/address the comment in another issue/PR if you prefer.

Copy link
Owner

@emersion emersion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@emersion emersion merged commit 271ea91 into emersion:dev May 11, 2020
@foxcpp foxcpp deleted the mailbox-close branch May 11, 2020 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Backward-incompatible changes needed server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Mailbox.Close

2 participants