v2.0.0-rc.2 #1884
williamboman
announced in
Announcements
v2.0.0-rc.2
#1884
Replies: 2 comments 2 replies
-
@williamboman Just wondering what would be the programmatical way to inject a custom repository? I have just switched to calling |
Beta Was this translation helpful? Give feedback.
2 replies
-
Small good news: rustaceanvim is already updated for compatibility with 2.0 as of 5.25.0 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
v2.0.0-rc.2 Release Notes
2025-03-03:
v2.0.0-rc.2
has been releasedThis release has been an ongoing effort for quite some time now and is getting ready to be released. Most users should not experience any breaking changes. If you use any of the Lua APIs that Mason provides you'll find an outline of the changes below, breaking changes are marked with
Breaking Change
. Note that this is a release candidate and not yet part of the stable branch - you may have to explicitly target thev2.0.0-rc.2
when downloading the plugin.Please provide feedback/issues within this discussion! The
v2.0.0-rc.2
release can be found in thev2.x
branch or thev2.0.0-rc.2
git tag.mason-lspconfig.nvim
has a correspondingv2.x
branch andv2.0.0-rc.1
git tag, if you use that plugin as well.Important
If you upgrade to
v2.0.0-rc.2
and later choose to downgrade mason.nvim you will experience issues with managing packages installed usingv2.0.0-rc.2
. It's therefore recommended to uninstall all packages before downgrading.Mason is looking for core registry maintainers
The core registry is used by a large amount of users and as of writing almost has 500 packages. The scope of the project has long outgrown the capacity of its maintainer (me). Mason is now looking for maintainers to help managing the registry as well as other repositories/projects. If you're interested, please head over to this discussion and reply!
Thanks to all sponsors who help finance monthly costs and all 181 contributors of mason.nvim and 214 contributors of the core registry!
New Features
:Mason
UI.Bug Fixes
Misc
Breaking Change
Minimum Neovim requirement changed from 0.7.0 to 0.10.0.Breaking Change
APIs related to custom packages written in Lua has been removed.require("mason-core.installer.managers")
modules have been removed.Event changes
Package
Breaking Change
install:success
now provides the receipt as payload argument.Breaking Change
install:failed
now provides the error as payload argument.Breaking Change
uninstall:success
now provides the receipt of the uninstalled package as payload argument.uninstall:failed
is now emitted when package uninstallation fails.Registry
Breaking Change
package:install:success
now provides the receipt as payload argument.Breaking Change
package:install:failed
now provides the error as payload argument.Breaking Change
package:uninstall:success
now provides the receipt of the uninstalled package as payload argument.package:uninstall:failed
is now emitted when package uninstallation fails.Breaking Change
update
is no longer emitted when registry is updated. It's replaced by the following events:update:start
when the registry starts updatingupdate:success
when the registry is successfully updatedupdate:failed
when the registry failed to updateupdate:progress
is emitted when the registry update process makes progress when multiple registries are usedPackage API changes
Package:get_install_path()
has been removed.Breaking Change
This method has been removed to prepare for future changes.
If you're using this method to access an executable, please consider simply using the canonical name of the executable as Mason adds these to your
PATH
by default. If you're using the method to access other files inside the package, please consider accessing the$MASON/share
directory instead.Example:
Clarification: The
$MASON
environment variable has been available since v1.0.0.Note
Why was this method removed? The contents of the package directory is not a stable interface and its structure may change without prior notice. The only stable interfaces on the file system are files available in
bin/
,share/
andopt/
- these directories are only subject to breaking changes done by the underlying package itself.Package:uninstall(opts, callback)
is now asynchronous.Breaking Change
This method now provides an asynchronous interface and accepts two new optional arguments
opts
andcallback
.opts
currently doesn't have any valid values other than an empty Lua table{}
.callback
is called when the package is uninstalled, successfully or not. While the uninstall mechanism under the hood remains synchronous for the time being it is not a guarantee going forward and users are recommended to always use the asynchronous version.Example:
Package:check_new_version()
has been removed.Breaking Change
Package:check_new_version()
is replaced byPackage:get_latest_version()
.Package:get_latest_version()
is a synchronous API.Note
Similarly to before, this function returns the package version provided by the currently installed registry version.
Example:
Package:get_installed_version()
is now synchronous.Breaking Change
This function no longer accepts a callback.
Example:
Package:install()
will now error if the package is currently being installed.Breaking Change
Use the new
Package:is_installing()
method to check whether an installation is already running.Package:uninstall()
will now error if the package is not already installed.Breaking Change
Use the new
Package:is_installed()
method to check whether the package is installed.Package:install(opts, callback)
now accepts a callback.This optional callback is called by Mason when package installation finishes, successfully or not.
Example:
Custom registries
v2.0.0 introduces official support for custom registries. Currently supported registry protocols are
github:
,file:
, andlua:
. See https://github.com/mason-org/registry-examples for examples.Beta Was this translation helpful? Give feedback.
All reactions