Skip to content

pre-commit with stylua-github fails to build for v0.14.0 #496

@gegoune

Description

@gegoune

Hi, I just tried updating my pre-commit hook to use latest version

repos:
  - repo: https://github.com/johnnymorganz/stylua
    rev: v0.14.0
    hooks:
      - id: stylua-github

but got a failure from pip while running pre-commit

version information

pre-commit version: 2.20.0
git --version: git version 2.37.0
sys.version:
    3.10.5 (main, Jun 23 2022, 17:15:25) [Clang 13.1.6 (clang-1316.0.21.2.5)]
sys.executable: /usr/local/Cellar/pre-commit/2.20.0/libexec/bin/python3.10
os.name: posix
sys.platform: darwin

error information

An unexpected error has occurred: CalledProcessError: command: ('/Users/gegoune/.cache/pre-commit/repod4o1de3z/py_env-python3.10/bin/python', '-mpip', 'install', '.')
return code: 1
expected return code: 0
stdout:
    Processing /Users/gegoune/.cache/pre-commit/repod4o1de3z
      Installing build dependencies: started
      Installing build dependencies: finished with status 'done'
      Getting requirements to build wheel: started
      Getting requirements to build wheel: finished with status 'done'
      Preparing metadata (pyproject.toml): started
      Preparing metadata (pyproject.toml): finished with status 'done'
    Building wheels for collected packages: pseudo
      Building wheel for pseudo (pyproject.toml): started
      Building wheel for pseudo (pyproject.toml): finished with status 'error'
    Failed to build pseudo
    
stderr:
      error: subprocess-exited-with-error
      
      × Building wheel for pseudo (pyproject.toml) did not run successfully.
      │ exit code: 1
      ╰─> [16 lines of output]
          Traceback (most recent call last):
            File "/Users/gegoune/.cache/pre-commit/repod4o1de3z/py_env-python3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
              main()
            File "/Users/gegoune/.cache/pre-commit/repod4o1de3z/py_env-python3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
              json_out['return_val'] = hook(**hook_input['kwargs'])
            File "/Users/gegoune/.cache/pre-commit/repod4o1de3z/py_env-python3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 261, in build_wheel
              return _build_backend().build_wheel(wheel_directory, config_settings,
            File "/private/var/folders/zm/t9yhs_ts7fzcyvm64l5zyk1w0000gn/T/pip-build-env-laywb0gg/overlay/lib/python3.10/site-packages/pseudo_builder.py", line 133, in build_wheel
              files = download(metadata)
            File "/private/var/folders/zm/t9yhs_ts7fzcyvm64l5zyk1w0000gn/T/pip-build-env-laywb0gg/overlay/lib/python3.10/site-packages/pseudo_builder.py", line 33, in download
              files = rg.download_asset(asset, extract_files=config.extract_files)
            File "/private/var/folders/zm/t9yhs_ts7fzcyvm64l5zyk1w0000gn/T/pip-build-env-laywb0gg/overlay/lib/python3.10/site-packages/release_gitter.py", line 354, in download_asset
              package = PackageAdapter(content_type, result)
            File "/private/var/folders/zm/t9yhs_ts7fzcyvm64l5zyk1w0000gn/T/pip-build-env-laywb0gg/overlay/lib/python3.10/site-packages/release_gitter.py", line 284, in __init__
              raise ValueError(f"Unknown or unsupported content type {content_type}")
          ValueError: Unknown or unsupported content type application/octet-stream
          [end of output]
      
      note: This error originates from a subprocess, and is likely not a problem with pip.
      ERROR: Failed building wheel for pseudo
    ERROR: Could not build wheels for pseudo, which is required to install pyproject.toml-based projects
    

I am not entirely sure whether it is due something not working on my system or affecting more people.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions