anishathalye / dotbot

A tool that bootstraps your dotfiles ⚡️
MIT License
6.9k stars 287 forks source link

Make Dispatcher a singleton after first instantiation #343

Open kurtmckee opened 11 months ago

kurtmckee commented 11 months ago

This allows plugins to re-instantiate the Dispatcher (or, now, use the instance cached in current_dispatcher) without knowing what plugins have been loaded by dotbot.

This fixes plugins that want to dispatch to other plugins.

Fixes #339

codecov-commenter commented 11 months ago

Welcome to Codecov :tada:

Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment.

Thanks for integrating Codecov - We've got you covered :open_umbrella:

kurtmckee commented 11 months ago

~Test suite is failing due to PyYAML 5 and Cython 3. There is currently no way to trivially resolve this.~

The test suite is passing after rebasing on master and resolving merge conflicts.

erikw commented 11 months ago

@kurtmckee many thanks! I can confirm that with this PR, plugins like dotbot-if works (https://github.com/wonderbeyond/dotbot-if/issues/1) 🚢 :shipit:

kurtmckee commented 10 months ago

Rebased on master and resolved merge conflicts. The test suite passes now.

erikw commented 8 months ago

I would be delighted if we could get this merged!

kurtmckee commented 7 months ago

@anishathalye I hope you're doing well! If you have an opportunity to take a look at this and see anything that needs to be modified please let me know. :+1: