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

feat!: alternative API to allow Make(Int) #24

Merged
merged 1 commit into from
Oct 31, 2023
Merged

feat!: alternative API to allow Make(Int) #24

merged 1 commit into from
Oct 31, 2023

Conversation

favonia
Copy link
Contributor

@favonia favonia commented Oct 31, 2023

This breaking change is to allow code like these:

module S = Algaeff.State.Make (Int)
module R = Algaeff.Reader.Make (Int)
module S = Algaeff.Sequencer.Make (Int)
module U = Algaeff.UniqueID.Make (Int)

I don't feel the convenience is worth the trouble (which includes manually adding version upper bounds to released forester/asai/yuujinchou), but also why not. I am on the fence about this PR.

Copy link

@jonsterling jonsterling left a comment

Choose a reason for hiding this comment

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

I think this is a good convenience...

@jonsterling
Copy link

But can we try to coordinate the releases of (e.g.) all these packages, including forester? Maybe we delay this until we are ready to do it all at once? Currently forester doesn't have any upper bounds, but this means that it is easy to break it from another package. This might have been a mistake on my part 😆

@favonia
Copy link
Contributor Author

favonia commented Oct 31, 2023

@jonsterling I don't get the benefit of coordination---no matter a release is delayed or not, we should update what's already in the OPAM repository with upper bounds, and with all upper bounds in the OPAM repository in place, I don't feel anything could (easily) go wrong? The next release of algaeff will be 2.0.0 due to the breaking change, so you can already add < 2.0.0 now before you use the new algaeff, and for this, maybe it's better to put algaeff 2.0.0 in OPAM first?

On the other hand, I'm of course not against coordination, though I'm not sure how to achieve that (I treat opam publish as a blackbox so that I'm not editing OPAM files directly). The other option is to use Algaeff2 just like QCheck2, but I prefer not to do this when it's still possible to manually update every package using algaeff.

@favonia
Copy link
Contributor Author

favonia commented Oct 31, 2023

My imagined plan:

  1. Release the new algeaff as 2.0.0 AND add upper bounds to yuujinchou, asai, and forester in OPAM. This should keep everything working.
  2. Release new yuujinchou 5.2.0 and asai 0.3.0 that use algaeff 2.0.0.
  3. Release new forester

@favonia
Copy link
Contributor Author

favonia commented Oct 31, 2023

But maybe we should merge this PR and continue this discussion in a different issue...

@favonia favonia changed the title feat!: alternative API feat!: alternative API to allow Make(Int) Oct 31, 2023
@favonia favonia merged commit 79fd268 into main Oct 31, 2023
2 checks passed
@favonia favonia deleted the alternative-api branch October 31, 2023 13:01
@favonia favonia added this to the 2.0.0 milestone Oct 31, 2023
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