Skip to content

Commit

Permalink
Adding identify minimum version requirement (#1301)
Browse files Browse the repository at this point in the history
I ran into an issue with clang-format not being able to run due to the version of identify I had installed.
```
$ pre-commit 
An error has occurred: InvalidManifestError: 
==> At Hook(id='clang-format')
==> At key: types_or
==> At index 9
=====> Type tag 'textproto' is not recognized.  Try upgrading identify and pre-commit?
```
This led me to find out that pre-commit only requires version 1, but we require a newer version to work with clang-format. We don't specify that version anywhere, so I tracked down the minimum requirement and added it in our dependencies.yaml and ran pre-commit to update the conda environment files.

I verified that version [2.5.19](https://github.com/pre-commit/identify/blob/v2.5.19/identify/extensions.py#L226) did not have textproto, but [2.5.20](https://github.com/pre-commit/identify/blob/v2.5.20/identify/extensions.py#L226) did have it and that is why 2.5.20 is the minimum required version.

Authors:
  - Mike Wilson (https://github.com/hyperbolic2346)
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - Vyas Ramasubramani (https://github.com/vyasr)
  - Ray Douglass (https://github.com/raydouglass)

URL: #1301
  • Loading branch information
hyperbolic2346 authored Jul 18, 2023
1 parent 4ec6bc6 commit 0a5b86c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dependencies:
- cython>=0.29,<0.30
- fmt>=9.1.0,<10
- gcovr>=5.0
- identify>=2.5.20
- ninja
- numba>=0.57
- numpy>=1.21
Expand Down
1 change: 1 addition & 0 deletions conda/environments/all_cuda-120_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dependencies:
- cython>=0.29,<0.30
- fmt>=9.1.0,<10
- gcovr>=5.0
- identify>=2.5.20
- ninja
- numba>=0.57
- numpy>=1.21
Expand Down
3 changes: 3 additions & 0 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ dependencies:
- output_types: [conda, requirements]
packages:
- pre-commit
# pre-commit requires identify minimum version 1.0, but clang-format requires textproto support and that was
# added in 2.5.20, so we need to call out the minimum version needed for our plugins
- identify>=2.5.20
cudatoolkit:
specific:
- output_types: conda
Expand Down

0 comments on commit 0a5b86c

Please sign in to comment.