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

Discussion: Make 'client' an optional feature? #163

Closed
wants to merge 1 commit into from

Conversation

FauxFaux
Copy link
Contributor

This PR enables using just the irc::proto part of the crate, without building the irc::client part.

This allows dropping >70% of the deps, including native-tls which fails horribly to build on anything fun.

The changes are noisy, but there are zero logic changes:

  • conditional use of the entire client module
  • conditional use of any imported library
  • stub implementation of errors, examples and doctests, with () payloads or just that print "nah".

.travis.yml is already configured to check --no-default-features, and it passes.

I did not make the code warning-clean with test --no-default-features, this would (simply!) involve adding more cfg( everywhere. In my opinion, it is unlikely that it would be possible to move more stuff into the "client" module, to reduce the size of this change. Perhaps the lineproto stuff? Not super relevant.

(I'm writing a server-like-thing, if that wasn't obvious.)

Are you willing to carry this feature?

@aatxe
Copy link
Owner

aatxe commented Oct 27, 2018

Thanks for the pull request!

I'm not sure that I want to merge this given that the 0.14 branch has already split the protocol parts into its own crate (which I think is a more appropriate way of dealing with this). The irc-proto crate even has a tokio feature for enabling or disabling those parts of the code.

@FauxFaux
Copy link
Contributor Author

Right. I totally failed to understand that development was proceeding like that. I was thinking of making an irc-proto crate myself. I am happy with the alternative crate. Let's try it.

@FauxFaux
Copy link
Contributor Author

That seems to do exactly what I want, bar fixes that are in develop but not in 0.14. Guess I should look at getting 0.14 released.

@FauxFaux FauxFaux closed this Oct 27, 2018
@aatxe
Copy link
Owner

aatxe commented Oct 27, 2018

The main blocker is fewer-allocations which I was working on in the hopes of finally closing #32, but I'm not convinced that we necessarily need that urgently (or that it wouldn't make the APIs too cumbersome). The other notable thing is restoring some of the stuff that got accidentally wiped out on the 0.14 branch due to a messed up merge (e.g. as noted here).

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

Successfully merging this pull request may close these issues.

2 participants