Skip to content

feat(tests): use mason.nvim v2#17

Merged
Conarius merged 1 commit into
v1from
feat/upgrade-mason-v2
Aug 1, 2025
Merged

feat(tests): use mason.nvim v2#17
Conarius merged 1 commit into
v1from
feat/upgrade-mason-v2

Conversation

@williamboman

@williamboman williamboman commented Aug 1, 2025

Copy link
Copy Markdown
Member

mason.nvim has been pinned to the v1.x branch since the v2 release, this unpins it. Not a lot of changes. Instead of manually parsing the package spec and instantiating a Package instance this is now entirely done via mason.nvim via the file: registry protocol, keeps things a bit simpler.

@williamboman williamboman requested a review from a team August 1, 2025 23:05
@williamboman

Copy link
Copy Markdown
Member Author

Tested it on williamboman/mason-registry-playground#80

Comment thread tests/test-runner.lua
for __, pkg_path in ipairs(packages) do
local pkg = try(parse_package_spec(pkg_path))
-- Turns "packages/rust-analyzer/package.yaml" into "rust-analyzer"
local pkg_name = vim.fn.fnamemodify(pkg_path, ":h:t")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For code readability, this could also be achieved with vim.fs.basename(vim.fs.dirname(pkg_path))

@Conarius Conarius left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Conarius Conarius merged commit 2ceadd8 into v1 Aug 1, 2025
1 check passed
@Conarius Conarius deleted the feat/upgrade-mason-v2 branch August 1, 2025 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants