deps: migrate shellescape to al.essio.dev/pkg/shellescape - #1443
Merged
Conversation
The shellescape module was renamed to al.essio.dev/pkg/shellescape in
v1.5.0. Keeping the old github.com/alessio/shellescape import works for
lefthook itself (the graph is pinned to v1.4.1), but it breaks downstream
projects that resolve lefthook as a tool dependency and end up selecting
a post-rename version of the old path, which fails with:
module declares its path as: al.essio.dev/pkg/shellescape
but was required as: github.com/alessio/shellescape
Switch the three import sites to the new canonical path and bump the
dependency to v1.6.0. Same package name, no code changes needed.
See also kubernetes-sigs/kind#3840 for the same migration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title: deps: migrate shellescape to al.essio.dev/pkg/shellescape
Why
The
shellescapemodule was renamed fromgithub.com/alessio/shellescapetoal.essio.dev/pkg/shellescapestarting with v1.5.0 (see https://github.com/alessio/shellescape/releases).Lefthook itself builds fine because its graph pins the old path at v1.4.1. However, downstream projects that pull lefthook in as a Go tool dependency and resolve a fresh module graph can end up selecting a post-rename version of the old path, which fails with:
Other projects hit the same issue with this dependency, e.g. kubernetes-sigs/kind#3840.
What
build_command.go,build_script.go,replacer/replacer.go) to the new canonical pathgo.mod/go.sumPackage name is unchanged (
shellescape), so no code changes are needed.go mod tidy,go build ./...andgo test ./...pass locally.