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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
v2.0.0-rc.2 Release Notes
2025-03-03:
v2.0.0-rc.2has 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.2when downloading the plugin.Please provide feedback/issues within this discussion! The
v2.0.0-rc.2release can be found in thev2.xbranch or thev2.0.0-rc.2git tag.mason-lspconfig.nvimhas a correspondingv2.xbranch andv2.0.0-rc.1git tag, if you use that plugin as well.Important
If you upgrade to
v2.0.0-rc.2and 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
:MasonUI.Bug Fixes
Misc
Breaking ChangeMinimum Neovim requirement changed from 0.7.0 to 0.10.0.Breaking ChangeAPIs related to custom packages written in Lua has been removed.require("mason-core.installer.managers")modules have been removed.Event changes
Package
Breaking Changeinstall:successnow provides the receipt as payload argument.Breaking Changeinstall:failednow provides the error as payload argument.Breaking Changeuninstall:successnow provides the receipt of the uninstalled package as payload argument.uninstall:failedis now emitted when package uninstallation fails.Registry
Breaking Changepackage:install:successnow provides the receipt as payload argument.Breaking Changepackage:install:failednow provides the error as payload argument.Breaking Changepackage:uninstall:successnow provides the receipt of the uninstalled package as payload argument.package:uninstall:failedis now emitted when package uninstallation fails.Breaking Changeupdateis no longer emitted when registry is updated. It's replaced by the following events:update:startwhen the registry starts updatingupdate:successwhen the registry is successfully updatedupdate:failedwhen the registry failed to updateupdate:progressis emitted when the registry update process makes progress when multiple registries are usedPackage API changes
Package:get_install_path()has been removed.Breaking ChangeThis 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
PATHby default. If you're using the method to access other files inside the package, please consider accessing the$MASON/sharedirectory instead.Example:
Clarification: The
$MASONenvironment 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 ChangeThis method now provides an asynchronous interface and accepts two new optional arguments
optsandcallback.optscurrently doesn't have any valid values other than an empty Lua table{}.callbackis 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 ChangePackage: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 ChangeThis function no longer accepts a callback.
Example:
Package:install()will now error if the package is currently being installed.Breaking ChangeUse 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 ChangeUse 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