SublimeText / UnitTesting

Testing Sublime Text Packages
MIT License
112 stars 32 forks source link

TypeError logging missing library #265

Closed ehuss closed 6 months ago

ehuss commented 7 months ago

Starting on 2024-04-24, my GitHub Actions workflow has started to fail with this message:

Terminated Sublime Text
Package Control: Installing 3 libraries...
Package Control: The library "coverage" is not available for Python 3.3
Package Control: Installed library "shellenv" 1.4.2 for Python 3.3
Package Control: Installed library "coverage" 7.5.0 for Python 3.8
Package Control

Sublime Text needs to be restarted for installed or updated libraries to take effect. Otherwise some packages may not work properly..
missing libraries:
Traceback (most recent call last):
  File "/Users/runner/Library/Application Support/Sublime Text/Packages/0_install_package_control_helper/install_package_control_helper.py", line 70, in check_libraries
    log.write(" ".join(sorted(missing_libraries)) + "\n")
TypeError: sequence item 0: expected str instance, Library found
Package Control: The library "coverage" is not available for Python 3.3
missing libraries:
Traceback (most recent call last):
  File "/Users/runner/Library/Application Support/Sublime Text/Packages/0_install_package_control_helper/install_package_control_helper.py", line 70, in check_libraries
    log.write(" ".join(sorted(missing_libraries)) + "\n")
TypeError: sequence item 0: expected str instance, Library found
Package Control: The library "coverage" is not available for Python 3.3
missing libraries:
Traceback (most recent call last):
  File "/Users/runner/Library/Application Support/Sublime Text/Packages/0_install_package_control_helper/install_package_control_helper.py", line 70, in check_libraries
    log.write(" ".join(sorted(missing_libraries)) + "\n")
TypeError: sequence item 0: expected str instance, Library found
Timeout: Fail to install Package Control.

I'm not sure what recently changed to cause this.

deathaxe commented 6 months ago

Despite an error within error logging function causing the exceptions, the primary issue is Package Control not being able to resolve "coverage" dependency.

I'd expect all MacOS users being affected by this, even though I don't have any explenation for it happening currently.

Currently channel_v4 on https://packagecontrol.github.io/channel/channel_v4.json ships proper "coverage" 4.5.4 release for osx-x64 platform. I have no idea why Package Control wouldn't want to specificly not find this one.

deathaxe commented 6 months ago

Oh wait, appears Github uses MacOS arm64 by default.

Downloading Package Control.sublime-package
Creating Package Control.sublime-settings
Starting Sublime Text
/Users/runner/work/_actions/SublimeText/UnitTesting/fix/ci-timeouts/actions/setup/install_package_control.sh: line 70:  3732 Terminated: 15          subl
......
Terminated Sublime Text
Package Control: Prevented Package Control from removing itself.
Package Control: Fetching list of available packages and libraries
  Platform: osx-arm64
  Sublime Text Version: 4169
  Package Control Version: 4.0.6

In that case we must fail, because there are no arm64 wheels available for python 3.3

ehuss commented 6 months ago

Oh, thanks!

I don't use coverage, is there some way to disable it so it doesn't try to install?

deathaxe commented 6 months ago

Unittesting 1.8.1 excludes it from python 3.3 on arm platform. Things should be back on normal.