You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I opened PR #2561 and you closed it due to not wanting to guess the path to the go module which I agree with. It was a naive approach.
I understand your concern. However, could we try and work towards a solution? It would be really helpful if pre-commit could support this scenario. Otherwise precommit cannot support any go library that has a major version higher than v1. A solution from my end would be forking the Go module repo, rewrite it so all is in the root. But you can imagine this is very cumbersome.
An approach: If we would have information about the revision of the hook repository in the install_environment step we can extract the proper major version and exactly determine the location of go.mod.
the subdirs thing doesn't need to happen that way, you can just as easily put the v2 into the repository name
yeah, but it does and golang'ers do it this way
but I'm hearing an unwillingness to do anything about it from your side so I'll drop the issue. We'll have a look then at another pre-commit like solution
I opened PR #2561 and you closed it due to not wanting to guess the path to the go module which I agree with. It was a naive approach.
I understand your concern. However, could we try and work towards a solution? It would be really helpful if pre-commit could support this scenario. Otherwise precommit cannot support any go library that has a major version higher than v1. A solution from my end would be forking the Go module repo, rewrite it so all is in the root. But you can imagine this is very cumbersome.
An approach: If we would have information about the revision of the hook repository in the
install_environment
step we can extract the proper major version and exactly determine the location of go.mod.Proof of concept here:
arjenjb/pre-commit@main...feature/pass-rev-to-install-env
Thoughts?
The text was updated successfully, but these errors were encountered: