-
Notifications
You must be signed in to change notification settings - Fork 32
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
Go 1.11 module support #39
Conversation
cd35826
to
7b0dba9
Compare
For the record, |
I think this is important. Is there any way we can make this project compatible with modules without bumping to v4? |
Unfortunately I can work on a different approach but that may reduce compatibility. Is that a preferred tradeoff? |
😬 wow that's a collision of intents for sure. I always assumed that |
The main concern I have with doing that (or my preference -- flattening the directory structure), is breaking existing users. I would be less concerned if there had been releases/tagging. What's the purpose of this pattern? Is it really needed? This client does not utilize variants, so it's always the official supported API "latest GA". Does Heroku (or has it ever) supported multiple GA versions of its platform API? |
Before merging any module system changes, let's definitely please 🙏 make a release containing the current "pre-go-modules" client. I'm happy to go ahead with that, call it |
Any update on this? Also, any recommended way of importing the package (as it currently is) into a go mod project? Right now, the only way I can get working is to |
@fgblomqvist I'm waiting to here back from the team... @alindeman @cyberdelia any thoughts? Happy to make changes to this PR if there's a preferred approach. |
I created our first release 🙀 v1.0.0. We'll move forward with this likely breaking PR soon. |
Hey @talbright ,
(See revision to plan in next comment.) Does anything else need to happen to resolve the problem using this as a Go Module? Let me know if you have time to work on this, or if it would be helpful for me to take it from here 😇 |
Apparently I have not read enough Go Module documentation. (Thanks to friendly collaborators pointing this out.) According to "Go Modules: Semantic Import Versioning" docs we don't have an option:
The current version will actually need to be tagged |
I will review that doc again (its been a few months.) From what I recall though, if we aren't worried about breaking backwards compatibility we do have the option of dropping
In the future if Heroku truly needs to maintain two separate versions of the API (the original reason the |
Sounds great @talbright |
e819a6c
to
501330d
Compare
@mars ready for review |
Nice @talbright! 🙌😄 I'll review and test how it works with the Terraform Provider next week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your patience as I finally got to this. Just a few comments in-line.
Also, I opened a PR on the Terraform Provider that uses this branch:
- validated that this Provider branch works correctly with Terraform, applying & destroying a simple configuration
- currently running the full Provider test suite locally (will report back, but it's all success so far)
@@ -1 +1,7 @@ | |||
language: go | |||
|
|||
go: | |||
- "1.9" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are Go Modules backward-compatible? These CI versions might need some pruning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not exactly no. But vendoring is the magic that makes this work. Please see https://github.com/golang/go/wiki/Modules#how-do-i-use-vendoring-with-modules-is-vendoring-going-away for more details. Also note the matrix is building all these versions just fine so things seem to line up.
Co-Authored-By: talbright <[email protected]>
No worries, this PR is just taking its time to germinate. We will get there.
Awesome, thanks for doing this. |
✅ Hashicorp CI passed for the Terraform Provider on this branch. |
w00t! BTW I don't have perms to merge... |
I'm releasing |
MODULE SUPPORT
This PR drops the
v3
path. For detailed discussion see comments in this PR.This PR continues support for vendoring for older versions of GO (https://github.com/golang/go/wiki/Modules#how-do-i-use-vendoring-with-modules-is-vendoring-going-away)
TODO
go test
and include appropriate checks such as gofmt⭐️ After merging be sure to create a github release
⭐️ Use semver and github releases moving forward
Addresses #37