Remove river.JobState* aliases in favor of using rivertype directly - #300
Merged
Conversation
brandur
force-pushed
the
brandur-unambiguous-job-state
branch
from
April 15, 2024 02:13
ab71ec6 to
5850172
Compare
bgentry
approved these changes
Apr 15, 2024
bgentry
left a comment
Contributor
There was a problem hiding this comment.
I wish we didn't end up having to put these in a sub-package to begin with, but since we did, this is the right call.
Do you think there are any website or other doc fixes required for this?
Contributor
Author
Nah, I think we're okay there (also no example tests needed to be updated). |
brandur
force-pushed
the
brandur-unambiguous-job-state
branch
from
April 16, 2024 01:41
5850172 to
933002c
Compare
One of the accidental API misdesigns I forgot to address on the initial version of River was that type aliases for `JobState*` had been left in the top-level `river` namespace. Having them in `river` may make use slightly more convenient, but makes "jump to definition" worse because it requires an additional redirect, and the decision to use `river` or `rivertype` ambiguous in that there's no canonically correct answer. The aliases also make adding a new state a little more risky because the alias may be forgotten. I wouldn't normally make this change post-ship, but given we're doing a couple breaking changes all at once, it's our last, best opportunity to fix the (mild) problem.
brandur
force-pushed
the
brandur-unambiguous-job-state
branch
from
April 19, 2024 02:06
933002c to
c9ab5f5
Compare
Contributor
Author
|
With #304 in, going to start merging these other changes prior to release. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One of the accidental API misdesigns I forgot to address on the initial
version of River was that type aliases for
JobState*had been left inthe top-level
rivernamespace.Having them in
rivermay make use slightly more convenient, but makes"jump to definition" worse because it requires an additional redirect,
and the decision to use
riverorrivertypeambiguous in that there'sno canonically correct answer. The aliases also make adding a new state
a little more risky because the alias may be forgotten.
I wouldn't normally make this change post-ship, but given we're doing a
couple breaking changes all at once, it's our last, best opportunity to
fix the (mild) problem.