Skip to content

build: upgrade go directive in go.mod to 1.17 #2674

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

Merged
merged 1 commit into from
Dec 8, 2021
Merged

build: upgrade go directive in go.mod to 1.17 #2674

merged 1 commit into from
Dec 8, 2021

Conversation

Juneezee
Copy link
Contributor

Description

This PR upgrades the go directive in go.mod file by running go mod tidy -go=1.17 to enable module graph pruning and lazy module loading supported by Go 1.17 or higher.

Note 1: This does not prevent users with earlier Go versions from successfully building packages from this module.
Note 2: The additional require directive is used to record indirect dependencies by Go 1.17 or higher, see https://go.dev/ref/mod#go-mod-file-go.

Type of change

Please mark options that are relevant:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to
    not work as expected)
  • This change requires a documentation update
  • Build related change

How Has This Been Tested?

Manually tested by running make test.

Checklist:

  • My code follows the CONTRIBUTION guidelines of
    this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged

@vmwclabot
Copy link

@Juneezee, you must sign our contributor license agreement before your changes are merged. Click here to sign the agreement. If you are a VMware employee, read this for further instruction.

This commit enables support for module graph pruning and lazy module
loading for projects that are at Go 1.17 or higher.

Reference: https://go.dev/ref/mod#go-mod-file-go
Reference: https://go.dev/ref/mod#graph-pruning
Reference: https://go.dev/ref/mod#lazy-loading
Signed-off-by: Eng Zer Jun <[email protected]>
@Juneezee
Copy link
Contributor Author

@akutz Hi, I have moved the go directive under the module directive. Please take a look again. Thank you.

@Juneezee Juneezee requested a review from akutz November 30, 2021 15:21
@embano1
Copy link
Contributor

embano1 commented Dec 1, 2021

I did a quick test with these changes and bumped the Go versions used in the various workflows to include ["1.15","1.16","1.17"] - all runs passed (one memory panic on TestMultiSwitchMembers which I could not reproduce in a second run).

@embano1
Copy link
Contributor

embano1 commented Dec 8, 2021

@dougm we got +1 from @akutz and myself, if you're good with this build-related change I will merge and create a follow-up PR to update the workflows to use go versions ["1.16","1.17"] in the build matrix.

Copy link
Member

@dougm dougm left a comment

Choose a reason for hiding this comment

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

lgtm, thanks @Juneezee

@embano1 embano1 merged commit afc67f5 into vmware:master Dec 8, 2021
@vmwclabot
Copy link

@Juneezee, VMware has approved your signed contributor license agreement.

embano1 pushed a commit to embano1/govmomi that referenced this pull request Dec 10, 2021
Uses Go 1.17 for build-related steps and matrix 1.16 and 1.17 for tests
(see vmware#2674)

Closes: vmware#2679
Signed-off-by: Michael Gasch <[email protected]>
@embano1 embano1 mentioned this pull request Dec 10, 2021
12 tasks
yuyin002 pushed a commit to yuyin002/govmomi that referenced this pull request Jan 12, 2022
Uses Go 1.17 for build-related steps and matrix 1.16 and 1.17 for tests
(see vmware#2674)

Closes: vmware#2679
Signed-off-by: Michael Gasch <[email protected]>
yuyin002 pushed a commit to yuyin002/govmomi that referenced this pull request Jan 12, 2022
Uses Go 1.17 for build-related steps and matrix 1.16 and 1.17 for tests
(see vmware#2674)

Closes: vmware#2679
Signed-off-by: Michael Gasch <[email protected]>
yuyin002 pushed a commit to yuyin002/govmomi that referenced this pull request Jan 15, 2022
Uses Go 1.17 for build-related steps and matrix 1.16 and 1.17 for tests
(see vmware#2674)

Closes: vmware#2679
Signed-off-by: Michael Gasch <[email protected]>
pradeep288 pushed a commit to pradeep288/govmomi that referenced this pull request Jan 17, 2022
Uses Go 1.17 for build-related steps and matrix 1.16 and 1.17 for tests
(see vmware#2674)

Closes: vmware#2679
Signed-off-by: Michael Gasch <[email protected]>
Copy link
Contributor

I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants