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

Split methods for HikariTransactor constructed with two effects #1961

Merged
merged 2 commits into from
Jan 1, 2024

Conversation

jatcwang
Copy link
Collaborator

@jatcwang jatcwang commented Dec 18, 2023

Partially revert the change in #1939 so that existing code don't fail to compile. Methods which construct HikariTransactor in a different effect now has the suffix "...SeparateEffect". The original single-effect methods are now implemented in terms of the separate-effect methods.

Related: #1939

Partially revert the change in #1939 so that existing code don't fail to compile.
Methods which construct HikariTransactor in a different effect now has the suffix "...SeparateEffect". The original single-effect methods are now implemented in terms of the separate-effect methods.
@jatcwang
Copy link
Collaborator Author

@satorg @sideeffffect Feedback welcome especially the name..it's a bit long 😅

Copy link
Contributor

@sideeffffect sideeffffect left a comment

Choose a reason for hiding this comment

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

Maybe ...Generic instead of ...SeparateEffect, because that's veeery long?

@jatcwang
Copy link
Collaborator Author

Or maybe ...WithResEffect (With Resource Effect)? 🤔

@satorg
Copy link
Contributor

satorg commented Dec 19, 2023

@jatcwang thank you for taking on it!

I personally don't have a strict preference on the naming.
I could suggest though a conciser suffix ...M2 (e.g. fromConfigCustomEcM2). The idea behind such a suffix is the following:
...sometimes effectful methods are marked with the F suffix (because of F[_])
...doobie prefers M[_] and in this case introduces two M-s – M and M0, so the overall suffix could be M2.

But I totally realize that such a name could look cryptic and for me personally any of the suggested names above will work just as well.

@jatcwang
Copy link
Collaborator Author

For this case I don't mind it being a bit longer since it's often only written once in an application. I think ...WithResEffect is probably the clearest to me. ..Generic is short but doesn't feel too descriptive of what's happening

Copy link
Contributor

@sideeffffect sideeffffect left a comment

Choose a reason for hiding this comment

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

Let's get this merged

@jatcwang
Copy link
Collaborator Author

jatcwang commented Jan 1, 2024

Thanks all.

@jatcwang jatcwang merged commit a137e78 into main Jan 1, 2024
12 checks passed
@jatcwang jatcwang deleted the hikari_separate_effect_separate_method branch January 1, 2024 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants