Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor!: refactor installer internals and add new Package class methods #1523

Merged
merged 1 commit into from
Oct 11, 2023

Conversation

williamboman
Copy link
Owner

This contains the following changes:

  1. Package:install() now accepts a second, optional, callback argument which is called when installation finishes
    (successfully or not).
  2. The uninstall:success and package:uninstall:success events now include an additional payload argument containing
    the receipt of the uninstalled package.
  3. Adds a Package:is_installing() method.

This contains the following breaking changes:

  1. Package:install() will now error when called while an installation is already ongoing. Use the new
    Package:is_installing() method to check whether an installation is already running.

This also refactors large portions of the tests by removing test globals, removing async_test, and adding the
mason-test Lua module instead. Test helpers via globals are problematic to work with due to not being detected through
tools like the Lua language server without additional configuration. This has been replaced with a Lua module
mason-test. async_test has also been removed in favour of explicitly making use of the mason-core.async API. These
changes stands for a significant portion of the diff.

…hods

This contains the following changes:
1) `Package:install()` now accepts a second, optional, callback argument which is called when installation finishes
   (successfully or not).
2) The `uninstall:success` and `package:uninstall:success` events now include an additional payload argument containing
   the receipt of the uninstalled package.
3) Adds a `Package:is_installing()` method.

This contains the following breaking changes:
1) `Package:install()` will now error when called while an installation is already ongoing. Use the new
   `Package:is_installing()` method to check whether an installation is already running.

This also refactors large portions of the tests by removing test globals, removing async_test, and adding the
`mason-test` Lua module instead. Test helpers via globals are problematic to work with due to not being detected through
tools like the Lua language server without additional configuration. This has been replaced with a Lua module
`mason-test`. `async_test` has also been removed in favour of explicitly making use of the `mason-core.async` API. These
changes stands for a significant portion of the diff.
@williamboman williamboman merged commit 42c4869 into v2.x Oct 11, 2023
7 checks passed
@williamboman williamboman deleted the refactor/installer branch October 11, 2023 14:31
williamboman added a commit that referenced this pull request Nov 8, 2023
…hods (#1523)

This contains the following changes:
1) `Package:install()` now accepts a second, optional, callback argument which is called when installation finishes
   (successfully or not).
2) The `uninstall:success` and `package:uninstall:success` events now include an additional payload argument containing
   the receipt of the uninstalled package.
3) Adds a `Package:is_installing()` method.

This contains the following breaking changes:
1) `Package:install()` will now error when called while an installation is already ongoing. Use the new
   `Package:is_installing()` method to check whether an installation is already running.

This also refactors large portions of the tests by removing test globals, removing async_test, and adding the
`mason-test` Lua module instead. Test helpers via globals are problematic to work with due to not being detected through
tools like the Lua language server without additional configuration. This has been replaced with a Lua module
`mason-test`. `async_test` has also been removed in favour of explicitly making use of the `mason-core.async` API. These
changes stands for a significant portion of the diff.
williamboman added a commit that referenced this pull request Feb 25, 2024
…hods (#1523)

This contains the following changes:
1) `Package:install()` now accepts a second, optional, callback argument which is called when installation finishes
   (successfully or not).
2) Adds a `Package:is_installing()` method.

This contains the following breaking changes:
1) `Package:install()` will now error when called while an installation is already ongoing. Use the new
   `Package:is_installing()` method to check whether an installation is already running.
2) The `install:success` and `package:install:success` events now receive an `InstallReceipt` as payload.
3) The `uninstall:success` and `package:uninstall:success` events now receive an `InstallReceipt` as payload.

This also refactors large portions of the tests by removing test globals, removing async_test, and adding the
`mason-test` Lua module instead. Test helpers via globals are problematic to work with due to not being detected through
tools like the Lua language server without additional configuration. This has been replaced with a Lua module
`mason-test`. `async_test` has also been removed in favour of explicitly making use of the `mason-core.async` API. These
changes stands for a significant portion of the diff.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants