wbond / package_control

The Sublime Text package manager
https://packagecontrol.io
4.78k stars 814 forks source link

PackageManager Cleanups #1554

Closed deathaxe closed 3 years ago

deathaxe commented 3 years ago
  1. Some methods use package some package_name as argument names. This PR proposes to use package_name for all of them to make clear a name string is meant.
  2. removes some package_file_exists() calls, which are already handled by the gated methods and thus reduntant.
  3. drops another ST2 construct which pushed adding/removing installed_packages to main thread via set_timeout().
rchl commented 3 years ago

3. drops another ST2 construct which pushed adding/removing installed_packages to main thread via set_timeout().

I know almost nothing about Package Control but are you sure that's only needed for ST2 and not some fix for some subtle timing issue?

deathaxe commented 3 years ago

Yes. It wasn't possible to call API functions from threads in ST2. That's why all those were delegated to main thread this way. I guess that's also the main reason for caching all package control settings in __init__().

deathaxe commented 3 years ago

Rebased that branch, too.

wbond commented 3 years ago

These changes look good, thank you!