-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
build(deps): bump github.com/dependabot/gomodules-extracted from 1.3.0 to 1.4.1 in /go_modules/helpers #4157
Conversation
Bumps [github.com/dependabot/gomodules-extracted](https://github.com/dependabot/gomodules-extracted) from 1.3.0 to 1.4.1. - [Release notes](https://github.com/dependabot/gomodules-extracted/releases) - [Commits](dependabot/gomodules-extracted@v1.3.0...v1.4.1) --- updated-dependencies: - dependency-name: github.com/dependabot/gomodules-extracted dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
- Acknowledge we aren't using the return value - Disable writes to go.mod which is a new go 1.17 behavior dependabot/gomodules-extracted#12 (comment)
@@ -29,7 +29,8 @@ func GetVersions(args *Args) (interface{}, error) { | |||
|
|||
currentVersion := args.Dependency.Version | |||
|
|||
modload.LoadModFile(context.Background()) | |||
modload.DisallowWriteGoMod() | |||
_ = modload.LoadModFile(context.Background()) |
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.
This adapts to the signature change mentioned in dependabot/gomodules-extracted#12 (comment)
I added a call modload.DisallowWriteGoMod()
to keep the go 1.16 behavior of not writing back to the go.mod
file. This doesn't really matter since we are only looking for new versions of a module here and not performing any updates yet. This runs with it's own copy of go.mod
in a temp directory so any writes would get discarded:
dependabot-core/go_modules/lib/dependabot/go_modules/update_checker/latest_version_finder.rb
Lines 74 to 75 in b5cfb49
SharedHelpers.in_a_temporary_directory do | |
SharedHelpers.with_git_configured(credentials: credentials) do |
The new return value of modload.LoadModFile(context.Background())
didn't seem particularly useful so I adjusted the call to show we don't care about it.
re: dependabot/gomodules-extracted#12 (comment)
I haven't found a reason to switch to modload.LoadModGraph
here yet. It seems like it would do more work which wouldn't be relevant to the goal of checking for versions of the requested dependency.
I would like to revisit #3630 now that go 1.17 is out to see if it resolved the performance concerns we saw before. Switching to go list
would remove the need to keep poking around with these go mod internal libs.
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.
/cc @jeffwidman Would appreciate your thoughts here as well!
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.
I added a call modload.DisallowWriteGoMod() to keep the go 1.16 behavior of not writing back to the go.mod file.
👍 makes sense to me.
The new return value of
modload.LoadModFile(context.Background())
didn't seem particularly useful so I adjusted the call to show we don't care about it.
👍
I would like to revisit #3630 now that go 1.17 is out to see if it resolved the performance concerns we saw before. Switching to go list would remove the need to keep poking around with these go mod internal libs.
Completely agree. Everything I wrote in #3630 (comment) still stands. It's been a few months since I looked deeply into the guts of go
1.17
's new design for handling transitive deps, so I don't recall whether "in theory" it will now work or not. But what matters is "in practice" and that should be easy to test. Maybe re-open that #3630 PR so that there's a floating todo to look at it more?
🤞 it works, as it would simplify life greatly.
Bumps github.com/dependabot/gomodules-extracted from 1.3.0 to 1.4.1.
Release notes
Sourced from github.com/dependabot/gomodules-extracted's releases.
Commits
17a5018
Merge pull request #13 from dependabot/mctofu/cleanup4df06ac
Clean working and target dirs to prevent stale files5aeb4e0
Cleanup removed filesbeea2ae
Merge pull request #12 from jeffwidman/bump-to-golang-1.17.0b4b5aa5
Merge pull request #11 from jeffwidman/bump-to-golang-1.16.76722181
Bump to go 1.17.0d23b93a
Bump togo
1.16.7
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)