nvim-neorocks / rocks-dev.nvim

A swiss-army knife for testing and developing rocks.nvim modules.
GNU General Public License v3.0
14 stars 4 forks source link

fix: use nio.create to remove rock synchronously within pcall #19

Closed bottd closed 3 months ago

bottd commented 3 months ago

To resolve the 2nd error in #16 I wrapped operations.remove in nio.create. My thinking is the error thrown for calling async in a sync context is related to pcall being a sync method. By using nio.create rock removal is handled synchronously within pcall.

Since this occurs in a larger async context created by api.query_installed_rocks the overall process should still be async.

Edit: I did more testing locally and have found this does not fix the issue :( I will keep looking at it though!

github-actions[bot] commented 3 months ago

Review Checklist

Does this PR follow the Contribution Guidelines? Following is a partial checklist:

Proper conventional commit scoping:

If applicable: