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

mysql.NewConnector not exposed without build tags #1013

Closed
neetle opened this issue Oct 18, 2019 · 8 comments
Closed

mysql.NewConnector not exposed without build tags #1013

neetle opened this issue Oct 18, 2019 · 8 comments

Comments

@neetle
Copy link
Contributor

neetle commented Oct 18, 2019

It looks like mysql.NewConnector is only exposed when built with the build tag go1.10. Is there any chance you can remove the build constraint from it?

I'm happy to submit a PR if it's easier that way.

@methane
Copy link
Member

methane commented Oct 18, 2019

Why do you want to remove the build tag?

@neetle
Copy link
Contributor Author

neetle commented Oct 18, 2019

Mostly so the library I'm building doesn't force everyone that leverages it to use a build tag. I feel that enforcing some constraints on the consumer's build process due to implementation details on my end would make for a poor API.

Is there any reason that it has a build tag, given that the only supported versions are 1.13, 1.12 and 1.11 from what I can tell?

@methane
Copy link
Member

methane commented Oct 18, 2019

Do you mean you need to do something to use build tag???

@methane
Copy link
Member

methane commented Oct 19, 2019

I feel that enforcing some constraints on the consumer's build process....

What "enforcing some constraints" means?
Do you know "go1.10" build tag is automatically enabled?

Is there any reason that it has a build tag, given that the only supported versions are 1.13, 1.12 and 1.11 from what I can tell?

Because we supported Go 1.9 (for legacy GAE/Go). But it just removes some binary size.
I'm OK to remove the build tag.

@neetle
Copy link
Contributor Author

neetle commented Oct 20, 2019

Do you know "go1.10" build tag is automatically enabled?

Huh, must be an issue with my setup. I'll have to look into it on my end 😅

I'll submit a PR in the next few days - thanks!

@neetle
Copy link
Contributor Author

neetle commented Oct 21, 2019

FYI - implementing in #1016.

From what I can tell, merging it would be a BC break as you'd be dropping support for 1.9. Please let me know whether or not I should go ahead with the changes.

@methane
Copy link
Member

methane commented Oct 21, 2019

Huh, must be an issue with my setup. I'll have to look into it on my end 😅

Maybe, you are using tagged version (1.4) which doesn't have connector.
Many features in master branch are not released yet. You need to use master
branch explicitly.

From what I can tell, merging it would be a BC break as you'd be dropping support for 1.9.

Why is it breaking change? While database/sql in Go 1.9 doesn't support the API,
it doesn't break anything as far as I know.

@neetle
Copy link
Contributor Author

neetle commented Oct 21, 2019

I managed to isolate it to being an issue with my IDE. It's not great, but I can work around it.

IIRC, go 1.9 doesn't contain the driver.Connector interface, so it won't compile. Check the Travis build in #1016

@methane methane closed this as completed Oct 21, 2019
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

No branches or pull requests

2 participants