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

Remove requires from individual components #87

Merged
merged 2 commits into from Nov 3, 2020
Merged

Remove requires from individual components #87

merged 2 commits into from Nov 3, 2020

Conversation

Pontus4
Copy link
Contributor

@Pontus4 Pontus4 commented Nov 3, 2020

Close #85

Solves

> warning: instance variable @cancel not initialized
@walro
Copy link
Contributor

walro commented Nov 3, 2020

I noticed we moved json, we have bunny lurking around too:

$ ag "require \""  lib

# ...

lib/twingly/amqp/session.rb
1:require "bunny"

# ...

@Pontus4
Copy link
Contributor Author

Pontus4 commented Nov 3, 2020

I noticed we moved json, we have bunny lurking around too

Same thing there, bunny is only used in session, but json was required in three different files.
But it's maybe cleaner to require everything in amqp?

@walro
Copy link
Contributor

walro commented Nov 3, 2020

But it's maybe cleaner to require everything in amqp?

Good question, I think we should pick one way at least. Might be simpler to move everything into the "main file" as I think that will give a clearer signal on what to do when adding a new dependency.

@Pontus4
Copy link
Contributor Author

Pontus4 commented Nov 3, 2020

Might be simpler to move everything into the "main file" as I think that will give a clearer signal on what to do when adding a new dependency.

Sure! Both options seem ok to me :)

Solves the warning below that appears in projects that only require individual components of twingly-amqp.

> warning: loading in progress, circular require considered harmful

To avoid the warning this feature is removed and users will have to require the complete twingly-amqp.
Copy link
Contributor

@walro walro left a comment

Choose a reason for hiding this comment

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

LGTM!

@Pontus4 Pontus4 merged commit bb1b0cd into master Nov 3, 2020
@Pontus4 Pontus4 deleted the fix-warnings branch November 3, 2020 14:24
@Pontus4 Pontus4 mentioned this pull request Nov 3, 2020
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.

Various warnings
2 participants