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

Make TestMustGetParsedDuration backwards compatible #63

Merged
merged 2 commits into from Feb 23, 2022

Conversation

maage
Copy link
Contributor

@maage maage commented Feb 22, 2022

Fails:

% go version
go version go1.18beta2 linux/amd64

As per:

https://go.dev/doc/devel/release#policy

Supported versions are today 1.16 and 1.17, so we can drop this brittle check.

Fails:

% go version
go version go1.18beta2 linux/amd64

As per:

	https://go.dev/doc/devel/release#policy

Supported versions are today 1.16 and 1.17, so we can drop this brittle check.
@magiconair
Copy link
Owner

I know. A part of me somehow feels somewhat sentimental and proud of the fact that this library has been around since go1.3 (actually go1.2) and is still tested with that version - even though nobody uses it anymore.

go1.2: 2013-12-01
go1.3: 2014-06-18

=> 8 years... 😲

So other than that this test is a bit quirky does it hurt anybody to leave it in there for my own little personal satisfaction?

@magiconair
Copy link
Owner

But thank you @maage for caring enough about this! This means a lot to me.

@magiconair
Copy link
Owner

I could probably rewrite this test with a build constraint to make it more stable and keep the backwards testing.

@maage
Copy link
Contributor Author

maage commented Feb 22, 2022

Something like this:

-               minor, _ = strconv.Atoi(ver[1])
+               wo_beta := strings.Split(ver[1], "beta")
+               minor, _ = strconv.Atoi(wo_beta[0])

@magiconair
Copy link
Owner

@maage would that work? Tested with go1.14.15, go1.17.7 and go1.18beta2

@magiconair
Copy link
Owner

Need to find the gpg key to sign this.

@magiconair magiconair merged commit 869a559 into magiconair:main Feb 23, 2022
@magiconair magiconair added this to the v1.8.6 milestone Feb 23, 2022
@magiconair magiconair changed the title TestMustGetParsedDuration: drop version tests Make TestMustGetParsedDuration backwards compatible Feb 23, 2022
@maage maage deleted the beta-1 branch April 29, 2022 18:35
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.

None yet

2 participants