Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes for v4 #78

Closed
belak opened this issue May 3, 2020 · 7 comments
Closed

Changes for v4 #78

belak opened this issue May 3, 2020 · 7 comments

Comments

@belak
Copy link
Member

belak commented May 3, 2020

Hello all!

I've been looking at releasing v4 of this library, mostly as a slightly simpler version and splitting some utilities I keep having to make out into a separate ircx package. I wanted to run all these past people before I just go ahead and do them though.

  • Move client out to ircx - the idea is to keep the base package to only protocol-related tools like reading and writing messages, numerics, etc.
  • Change the import path to gopkg.in/go-irc/irc.v4 - this will allow us to also have gopkg.in/go-irc/ircx.v0 rather than gopkg.in/irc.v4 and the longer form for ircx
  • Taking a look at better context support for Conn. Potentially seeing if there's a good way to handle a Write with a timeout.

Additional tools meant for ircx:

  • Client - I have some ideas for better Context support
  • ISupport parsing/tools
  • Some form of tracker which allows you to track which channels you're in, what their topics are, and what nicks are in each channel. I could potentially add user mode tracking as well.

Does anyone have any thoughts?

@danopia
Copy link
Contributor

danopia commented May 7, 2020

As long as the original 'building block' base is available at some path, that should be generally agreeable, the subpath doesn't seem troublesome. It makes sense to have a 'reference implementation' of sorts for people wanting somewhat more work done for them.

One thing I'd love to see in a new major version is either first-class SASL support, or at least the necessary reworkings to allow hooking the registration flow so we can perform the SASL dance ourselves (#57 (comment)). Not having support for 'properly' logging into servers has been a papercut for my general use client.

For prior art—another go client which supports both PLAIN and EXTERNAL (certfp) SASL has a SASLMech interface with two default types, you can just slot one instance into the connection configuration. Not sure if that level of support would be more irc or ircx under your v4 blueprint.

@belak
Copy link
Member Author

belak commented May 7, 2020

Yep, I plan on leaving Conn, Reader, Writer, Event, and Prefix mostly untouched. SASL would fit in the ircx package. I'll have to check out that implementation and see if I can come up with anything.

@belak
Copy link
Member Author

belak commented May 29, 2020

I had a bit of time so I started work on this.

Unfortunately, it doesn't look like gopkg.in handles alpha versions, so I'm temporarily moving this library back to the github namespace until it actually gets merged in. At that point, it will most likely go back to gopkg.in. For now the import paths are as follows:

  • github.com/go-irc/irc/v4
  • github.com/go-irc/ircx

Things that have been done so far:

  • ircx package has been created
  • The semi-hacky API for Conn.WriteCallback has been made public so the Client can live in another package
  • Client has been moved into ircx
  • ISupportTracker has been ported from another project of mine
  • Basic channel tracker has been ported from another project of mine
  • Some simple tweaks to Conn to add a Close method, so if you're wrapping it, it's a little easier - I may back out of this one since it seems a little weird to require a ReadWriteCloser just to export a Close method when a ReadWriter will do

And this is where I semi-rant about Go package management... I really wish that suffix wasn't required. It's really frustrating needing to add /v4 for v2+ but not for v0 and v1. It's a small, but fairly frustrating thing. I know the problem it's trying to solve... and I get it... but man, I really don't like those import paths.

@belak
Copy link
Member Author

belak commented May 29, 2020

Things left to do:

  • SASL
  • Tests for ISupport
  • Tests for Tracker
  • Context support
  • Fixing CI - we seem to be running into https://github.com/actions-contrib/golangci-lint/issues/11 - I may look at tweaking it a bit and using a custom version so we can get the github-actions output, but we'll have to see... I'd expect that stuff to make it upstream eventually.

@belak
Copy link
Member Author

belak commented Sep 22, 2021

I'm actually re-thinking this - I'm in the progress of moving Client back from ircx, and adding Tracker/ISupport under a new release. If/when breaking changes happen (like improved context support) I will do a major version bump.

@belak
Copy link
Member Author

belak commented Sep 11, 2022

I don't have the time to work on improved Context support at the moment, so I'm going to leave that for v5.

@belak
Copy link
Member Author

belak commented Sep 11, 2022

v4.0.0 was merged and tagged!

@belak belak closed this as completed Sep 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants