diff options
| author | William Boman <william@redwill.se> | 2022-11-08 13:32:13 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-08 13:32:13 +0100 |
| commit | 45714c54fb61a61c74724f64ca3f728c30ae01d2 (patch) | |
| tree | 5db1566524bba8beef194282fad846946ffbfd2e | |
| parent | chore: update generated code (#645) (diff) | |
| download | mason-45714c54fb61a61c74724f64ca3f728c30ae01d2.tar mason-45714c54fb61a61c74724f64ca3f728c30ae01d2.tar.gz mason-45714c54fb61a61c74724f64ca3f728c30ae01d2.tar.bz2 mason-45714c54fb61a61c74724f64ca3f728c30ae01d2.tar.lz mason-45714c54fb61a61c74724f64ca3f728c30ae01d2.tar.xz mason-45714c54fb61a61c74724f64ca3f728c30ae01d2.tar.zst mason-45714c54fb61a61c74724f64ca3f728c30ae01d2.zip | |
docs: update mason-errors help section (#646)
| -rw-r--r-- | doc/mason.txt | 29 | ||||
| -rw-r--r-- | lua/mason-core/managers/github/init.lua | 2 |
2 files changed, 19 insertions, 12 deletions
diff --git a/doc/mason.txt b/doc/mason.txt index 3a3a9ac6..d16dbc40 100644 --- a/doc/mason.txt +++ b/doc/mason.txt @@ -313,18 +313,25 @@ GITHUB MIRROR *mason-download-mirror-github* ============================================================================== INSTALLATION ERRORS *mason-errors* - *mason-errors-github-api* -For some installers, the GitHub API is used to fetch information about -releases. This API imposes a rate limit that may be triggered, causing -installations to fail. The reasons why a rate limit is triggered are many, for -example being behind a public API, or using other software that also send -requests to the GitHub API. + *mason-provider-errors* +By default, Mason uses the api.mason-registry.dev API to resolve package +metadata. Calling this service may result in network errors on some networks +(e.g., SSL issues on corporate VPNs). If resolving the SSL error is not an +option, you will have to change the provider implementation. Mason provides a +client provider which calls underlying 3rd party service APIs directly, which +you can enable like so: -To circumvent this, mason will utilize the GitHub CLI when -available, leading to API requests being subject to a much higher rate limit -threshold when authenticated. Should you run into errors with communicating -with GitHub's API, it's recommended to install, and authenticate, the GitHub -CLI: https://cli.github.com/. + require("mason").setup { + providers = { + "mason.providers.client", + "mason.providers.registry-api", + } + } + + Note: ~ + The client provider have less overall coverage and may come with + additional performance penalties (spawning slow commands, network & + parsing overheads, etc.). ============================================================================== DEBUGGING *mason-debugging* diff --git a/lua/mason-core/managers/github/init.lua b/lua/mason-core/managers/github/init.lua index 5f1df1ec..e9e4ec67 100644 --- a/lua/mason-core/managers/github/init.lua +++ b/lua/mason-core/managers/github/init.lua @@ -56,7 +56,7 @@ function M.release_version(opts) return client .fetch_latest_release(opts.repo) :map(_.prop "tag_name") - :get_or_throw "Failed to fetch latest release from GitHub API. Refer to :h mason-errors-github-api for more information." + :get_or_throw "Failed to fetch latest release from GitHub API. Refer to :h mason-provider-errors for more information." end) return { |
