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

Upgrade to time 0.3.2 #1444

Closed
wants to merge 1 commit into from
Closed

Upgrade to time 0.3.2 #1444

wants to merge 1 commit into from

Conversation

tyhi
Copy link
Contributor

@tyhi tyhi commented Sep 19, 2021

Type tests for both postgres and mysql completed without any errors.

Feedback is very much appreciated.

Closes #1277

Copy link
Contributor

@paolobarbolini paolobarbolini left a comment

Choose a reason for hiding this comment

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

Looks good, just a few minor tweaks

sqlx-core/src/mysql/types/time.rs Outdated Show resolved Hide resolved
sqlx-core/src/mysql/types/time.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@abonander abonander left a comment

Choose a reason for hiding this comment

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

I would prefer to keep support for time 0.2 as an optional feature, since it usually takes the whole ecosystem a while to upgrade with these kinds of things. We can use the renaming scheme as shown here so we can have both versions available to users: #1277 (comment)

Now the question becomes, which version keeps the name time and which gets renamed to time-02/time-03? I guess it makes more sense to have the old version be time-02 and the current version be time, but what happens when time upgrades to 0.4? Do we just do this whole dance all over again?

I think if we have both time-02 and time-03 then there's no ambiguity and we can add time-04 backwards-compatibly later on, and drop support for old versions as the ecosystem catches up.

When time drops a 1.0, I think that'll be the safe time to drop the version suffix.

Wouldn't mind having @mehcode weigh in here though.

@abonander
Copy link
Collaborator

abonander commented Sep 21, 2021

Conferred a bit with @mehcode and @danielakhterov and we think we want to do this:

  • Keep time = "0.2" but rename to time-02
  • Add time = "0.3" as time-03
  • Keep the time feature and have it enable the time-02 feature:
[dependencies]
time-02 = { package = "time", version = "0.2", optional = true }
time-03 = { package = "time", version = "0.3", optional = true, features = ["macros", "parsing"] }

[features]
# NOTE: deprecated; use `time-02` instead
time = ["time-02"]

And ideally, somehow add a deprecated warning if the time feature is enabled.

Then drop the unsuffixed form as a feature in sqlx 0.6, to be brought back iff time releases a 1.0 with a guarantee to support it for some time like with Tokio 1.0, because I don't want to have to do this again if we foresee having to concurrently support time = "1.0" and time = "2.0"; if that's the case then we'll probably just do time-1 and time-2 or something.

@abonander
Copy link
Collaborator

@tyhi did you want to make those changes in this PR? I saw you gave my comment a 👍 and then force pushed your branch but I don't see anything significantly different than before.

@tyhi
Copy link
Contributor Author

tyhi commented Sep 22, 2021

I had force pushed to get ready to hard reset my pr and apply time-03 over it however I was getting some cargo errors once I had introduced the time-03 feature along with some import errors with macros and others. I looked into it for a little but haven't had time recently.

I agree with what you said above and looking at the crate.io numbers it would look like there's barely any use in 0.3 currently, and it may just end up being annoying at the least to maintain now and possibly in the future if something like this happens again like you stated.

I think it may be best to close this PR since I'm not sure when I'll be able to finish this currently, among other things.

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.

time dependency out of date
3 participants