wbond / package_control

The Sublime Text package manager
https://packagecontrol.io
4.77k stars 816 forks source link

PC 4.0 not able to resolve compatible libraries for version of ST #1651

Closed benfrain closed 10 months ago

benfrain commented 10 months ago

Using PC v4 beta 8

Noticed that a number of installed packages were not working as expected. ST console showed this:

Package Control: Installing 16 libraries...
Package Control: The library "wcwidth" is not available for Python 3.3
Package Control: The library "pathlib" is not available for Python 3.3
Package Control: The library "python-markdown" is not available for Python 3.3
Package Control: The library "backrefs" is not available for Python 3.3
Package Control: The library "ptyprocess" is not available for Python 3.3
Package Control: The library "pymdownx" is not available for Python 3.3
Package Control: The library "sublime_lib" is not available for Python 3.3
Package Control: The library "python-jinja2" is not available for Python 3.3
Package Control: The library "bracex" is not available for Python 3.3
Package Control: The library "pyte" is not available for Python 3.3
Package Control: The library "pyyaml" is not available for Python 3.3
Package Control: The library "pygments" is not available for Python 3.3
Package Control: The library "lsp_utils" is not available for Python 3.3
Package Control: The library "markupsafe" is not available for Python 3.3
Package Control: The library "mdpopups" is not available for Python 3.3
Package Control: The library "wcmatch" is not available for Python 3.3

Here is the debug info from the console:

Package Control: Fetching list of available packages and libraries
  Platform: osx-x64
  Sublime Text Version: 4154
  Package Control Version: 4.0.0-beta8
Package Control: Download Debug
  URL: https://ourinternalserver.com/Team/--Design-Resources/Approved-Software/Sublime%20Text/designdev-sublime-channel.json
  Timeout: 30
  Resolved IP: 81.94.216.234
  Resolved IPv6: ::ffff:81.94.216.234
Package Control: Urllib Debug Proxy
  http_proxy: 
  https_proxy: 
  proxy_username: 
  proxy_password: 
Package Control: Found previously exported CA bundle at /Users/benfrain/Library/Caches/Sublime Text/Cache/Package Control/oscrypto-ca-bundle.crt (251822 bytes)
Package Control: Urllib HTTPS Debug General
  Connecting to ourinternalserver.com on port 443
Package Control: Urllib HTTPS Debug General
  Upgrading connection to SSL using CA certs file at /Users/benfrain/Library/Caches/Sublime Text/Cache/Package Control/merged-ca-bundle.crt
  Using hostname "ourinternalserver.com" for TLS SNI extension
  Successfully upgraded connection to ourinternalserver.com:443 with SSL Using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256
  Server SSL certificate:
    subject: CN=www.ourinternalserver.com,O=ourcomp Group Limited,L=Somewhere,C=GB
    subject alt name: www.ourinternalserver.com, ourinternalserver.com
    expire date: Feb 27 23:59:59 2024 GMT
  Certificate validated for ourinternalserver.com
Package Control: Urllib HTTPS Debug Write
  GET /Team/--Design-Resources/Approved-Software/Sublime%20Text/designdev-sublime-channel.json HTTP/1.1
  Host: ourinternalserver.com
  Accept-Encoding: bzip2,gzip,deflate
  User-Agent: Package Control v4.0.0-beta8
  If-None-Match: W/"bc-189f873e71f"
  If-Modified-Since: Tue, 15 Aug 2023 09:08:12 GMT
  Connection: Keep-Alive
Package Control: Urllib HTTPS Debug Read
  HTTP/1.1 304 Not Modified
  X-Powered-By: Express
  Access-Control-Allow-Origin: *
  x-timestamp: 1692204304486
  Accept-Ranges: bytes
  Cache-Control: public, max-age=0
  Last-Modified: Tue, 15 Aug 2023 09:08:12 GMT
  ETag: W/"bc-189f873e71f"
  Date: Wed, 16 Aug 2023 16:45:04 GMT
  Connection: keep-alive
Package Control: Using cached content for https://ourinternalserver.com/Team/--Design-Resources/Approved-Software/Sublime%20Text/designdev-sublime-channel.json from /Users/benfrain/Library/Caches/Sublime Text/Cache/Package Control/http_cache/2e51dc9ba8e269de197afc9c331b5472
Package Control: Download Debug
  URL: https://ourinternalserver.com/Team/--Design-Resources/Approved-Software/Sublime%20Text/designdev-sublime-repository.json
  Timeout: 30
  Resolved IP: 81.94.216.234
  Resolved IPv6: ::ffff:81.94.216.234
Package Control: Urllib HTTPS Debug General
  Re-using connection to ourinternalserver.com on port 443 for request #2
Package Control: Urllib HTTPS Debug Write
  GET /Team/--Design-Resources/Approved-Software/Sublime%20Text/designdev-sublime-repository.json HTTP/1.1
  Host: ourinternalserver.com
  Accept-Encoding: bzip2,gzip,deflate
  User-Agent: Package Control v4.0.0-beta8
  If-None-Match: W/"195b-189fedaa3db"
  If-Modified-Since: Wed, 16 Aug 2023 14:58:08 GMT
  Connection: Keep-Alive
Package Control: Urllib HTTPS Debug Read
  HTTP/1.1 304 Not Modified
  X-Powered-By: Express
  Access-Control-Allow-Origin: *
  x-timestamp: 1692204304534
  Accept-Ranges: bytes
  Cache-Control: public, max-age=0
  Last-Modified: Wed, 16 Aug 2023 14:58:08 GMT
  ETag: W/"195b-189fedaa3db"
  Date: Wed, 16 Aug 2023 16:45:04 GMT
  Connection: keep-alive
Package Control: Using cached content for https://ourinternalserver.com/Team/--Design-Resources/Approved-Software/Sublime%20Text/designdev-sublime-repository.json from /Users/benfrain/Library/Caches/Sublime Text/Cache/Package Control/http_cache/758ad0b2f93e246e47c2c65566cefba0
Package Control: Installing 16 libraries...
Package Control: The library "markupsafe" is not available for Python 3.3
Package Control: The library "mdpopups" is not available for Python 3.3
Package Control: The library "wcwidth" is not available for Python 3.3
Package Control: The library "pathlib" is not available for Python 3.3
Package Control: The library "ptyprocess" is not available for Python 3.3
Package Control: The library "pyte" is not available for Python 3.3
Package Control: The library "lsp_utils" is not available for Python 3.3
Package Control: The library "python-jinja2" is not available for Python 3.3
Package Control: The library "backrefs" is not available for Python 3.3
Package Control: The library "wcmatch" is not available for Python 3.3
Package Control: The library "bracex" is not available for Python 3.3
Package Control: The library "pyyaml" is not available for Python 3.3
Package Control: The library "sublime_lib" is not available for Python 3.3
Package Control: The library "python-markdown" is not available for Python 3.3
Package Control: The library "pymdownx" is not available for Python 3.3
Package Control: The library "pygments" is not available for Python 3.3
Package Control: Urllib HTTPS Debug General
  Closing connection to ourinternalserver.com on port 443 after 2 requests
deathaxe commented 10 months ago

Your private channel misses entries for available dependencies/libraries.

Default channel provides them via https://github.com/wbond/package_control_channel/blob/master/repository/dependencies.json.

I'd however not recommend to include this file directly, as without an upstream crawler, each ST instance would need to crawl github repos manually, which can take a lot of time and may be aborted due to rate limitations of Github API calls.

Entries with resolved/fixed releases using url key don't suffer this issue.

You could download https://packagecontrol.io/channel_v3.json and extract resolved links from dependencies_cache: {} or just copy the whole key to your channel.json to get a current list of releases.

benfrain commented 10 months ago

ah, ok, thanks. Sorry, I'm a little confused just by the last sentence. Are you saying, I can just grab the dependencies_cache section from channel_v3.json that begins...

"dependencies_cache": {"https://packagecontrol.io/repository.json": [{"name": "arrow", "load_order": "01", "authors": ["douglas-vaz"], "description": "Python arrow module - https://github.com/crsmithdev/arrow", "issues": "https://github.com/douglas-vaz/arrow/issues", "releases": [{"platforms": ["*"], "sublime_text": "*", "version": "0.0.2", "url": "https://codeload.github.com/douglas-vaz/arrow/zip/v0.0.2"}]}, {"name": "backports_lzma", "load_order": "50", "authors": ["dvhh"], "description": "lzma modules for sublime text 2 and 3", "issues": "https://github.com/dvhh/sublime-backports.lzma/issues", "releases": [{"platforms": ["windows"], "sublime_text": "*", "version": "1.0.0", "url": "https://codeload.github.com/dvhh/sublime-backports.lzma/zip/1.0.0"}]}, {"name": "backrefs", "load_order": "50", "authors": ["facelessuser"], "description": "Backrefs regular expression wrapper.", "issues": "https://github.com/facelessuser/sublime-backrefs/issues", "releases": [{"platforms": ["*"], "sublime_text": ">=3000", "version": "1.9.0", "url": "https://codeload.github.com/facelessuser/sublime-backrefs/zip/1.9.0"}]}, {"name": "better_settings", "load_order": "01", "authors": ["KuttKatrea"], "description": "Easily implement OS, Host and OS/Host-level settings aside the normal user-level settings for any plugin.", "issues": "https://github.com/KuttKatrea/sublime-better-settings/issues", "releases": [{"platforms": ["*"], "sublime_text": ">=3000", "version": "1.0.0", "url": "https://codeload.github.com/KuttKatrea/sublime-better-settings/zip/1.0.0"}]}, {"name": "boto3", "load_order": "02", "authors": ["revmischa"], "description": "Python boto3 module for Amazon Web Services", "issues": "https://github.com/revmischa/sublime-boto3/issues", "releases": [{"platforms": ["*"], "sublime_text": "*", "version": "2.0.0", "url": "https://codeload.github.com/revmischa/sublime-boto3/zip/v2.0.0"}]}, {"name": "bracex", "load_order": "50", "authors": ["facelessuser"], "description": "Bracex creates arbitrary strings via brace expansion much like Bash's.", "issues": "https://github.com/facelessuser/sublime-bracex/issues", "releases": [{"platforms": ["*"], "sublime_text": ">=3000", "version": "2.1.1", "url": "https://codeload.github.com/facelessuser/sublime-bracex/zip/2.1.1"}]},

And paste that into my channel.json file?

deathaxe commented 10 months ago

Yes, that's what I was saying.

packagecontrol.io graps repositories from "package_control_channel", crawls code hosters for latest releases and fills the result to those packages_cache and dependencies_cache entries, so Package Control client doesn't need to reach out to those code hosters to get the latest release information.

benfrain commented 10 months ago

Thanks @deathaxe that fixed that issue, I just had to change the https://packagecontrol.io/repository.json in the first section to the URL of our own repository.json file.

No more errors in the console. Only problem now is that it doesn't list the available packages when I do the install packages... command.

Could that possibly be related? Was I wrong to do that?

deathaxe commented 10 months ago

Hard to say without the json files. If the structure looks like that from official channel, packages should be listed. No packages being found indicates no valid release being resolved. Maybe a typo or missing key?