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
[FEATURE REQUEST] Build only the selected modules for golang #1995
Comments
sounds like their thing is broken, not ours |
@asottile can you re-open this issue, please. It's not an upstream bug, more a side-effect of how pre-commit tries to install modules. Using Ideally, the hook author needs a way to specify a build target (in this case, A current workaround is to define a local hook with
I fully agree with your previous comments about trying to guess the path. I won't bother suggesting A quick win could be to install This would allow authors to do this: entry: actionlint
additional_dependencies: [./cmd/actionlint] For the edge case where Does this sound reasonable? |
I don't think your solution works -- we don't know what "the executable" is (yes you could say the first part of pre-commit repos are heavily convention driven -- if something is not buildable then I don't think there's anything that can be done |
Ah. I'd lost sight of the flexibility Thanks for the quick reply! |
Recursive submodule build is supported at #1788 .
This is a very useful feature and I appreciate it. However, in certain use cases, this will cause errors.
For example, the repository https://github.com/pddg/actionlint contains the following two main packages (this repository is forked from https://github.com/rhysd/actionlint ).
github.com/pddg/actionlint/cmd/actionlint
github.com/pddg/actionlint/playground
GOOS=js
andGOARCH=wasm
I added .pre-commit-hooks.yaml as follows.
https://github.com/pddg/actionlint/blob/pddg/pre-commit-hooks/.pre-commit-hooks.yaml#L1-L9
I want to build only the former, but both builds run and the latter fails.
This is an example of including modules that will fail to build, but there may be other cases where you want to select modules to build in order to reduce build time.
Could you please consider building only selected modules?
Or, is there any workaround?
The text was updated successfully, but these errors were encountered: