facelessuser / sublime-backrefs

Sublime Text dependecy: Regular expression wrapper that adds new backrefs
MIT License
7 stars 2 forks source link

Missing dependency priority number #7

Closed evandrocoan closed 1 year ago

evandrocoan commented 1 year ago

I am reporting it here, in case someone else has a similar problem. As of now, the problem has been fixed by uninstalling BracketHighlighter. Feel free to close this issue if it does not seem relevant anymore.

Reported initially on https://github.com/evandrocoan/PlantUmlDiagrams/issues/17 by @mbrick02

@mbrick02 seems to be having this problem:

The package is working but since I installed it I've been getting a Package Control error: "2 missing dependencies were just installed. Sublime Text should be restarted..." I updated to "Sublime Text 4" a month ago. I've restarted a few times but still get the error.

plugins loaded
Package Control: Installing 2 missing dependencies
reloading settings Packages/mdpopups/Preferences.sublime-settings
C:\Users\Owner\AppData\Roaming\Sublime Text\Installed Packages\Package Control.sublime-package\package_control/loader.py:294: UserWarning: Duplicate name: '-mdpopups.py'
Package Control: Installed missing dependency mdpopups
C:\Users\Owner\AppData\Roaming\Sublime Text\Installed Packages\Package Control.sublime-package\package_control/loader.py:294: UserWarning: Duplicate name: '-backrefs.py'
Package Control: Installed missing dependency backrefs
Package Control: No updated packages
error: Package Control

He said the problem started after installing my package, but my package does not use these dependencies.

@mbrick02 fixed the problem after installing BracketHighlighter.

From the log above, the problem seems to be inside the 0_package_control_loader.sublime-package, where the backrefs and mdpopups seem to be missing the dependency priority in front of the package name. This is an example of a healthy 0_package_control_loader.sublime-package, where backrefs and mdpopups have the priorities 50 and 55. image

To debug further the problem, @mbrick02 could:

  1. Try installing back BracketHighlighter and see if the problems start again.
  2. If it happens again, then, check the contents of 0_package_control_loader.sublime-package and see if backrefs and mdpopups have the priority numbers correctly in front of their names.
facelessuser commented 1 year ago

He said the problem started after installing my package, but my package does not use these dependencies.

All of my packages uses mdpopups. BracketHighlighter uses backrefs.

I don't know what you mean by missing the priority number. All dependencies I specify have load orders specified: https://github.com/wbond/package_control_channel/blob/master/repository/dependencies.json#L55.

Can PackageControl mess up sometimes? Yes! But that is certainly not my fault.

As a sanity check, I downloaded the latest stable release for macOS and dropped the data folder within the package to make it portable. So we have an untainted, fresh isntall. I installed PC and installed Bracket Highlighter and everything works exactly as it should. Packages are installed as I would expect:

Screenshot 2023-09-07 at 7 23 06 PM

Dependency order looks fine:

Screenshot 2023-09-07 at 7 25 40 PM

If PackageControl freaks out, and this has happened on occasions with various dependencies over the years (many not mine), you can try deleting them manually, restarting Sublime, and try resolving dependencies.

I've had Package Control freak out and disable itself as well. I don't know why Package Control freaks out sometimes, but unless you see the dependency throwing exceptions on load, the issue is not on my side.

Also, I assume they aren't using something like PC 4.0 beta are they?

Keep in mind, BracketHighlighter has been configured this way for literally years and has over a million installs. I have not touched the dependency file in PackageControl for these dependencies for a long time. backrefs is not a new dependency.

I'm more than happy to offer any kind of help I can, but I am almost certain they are having a local issue, and I cannot debug their local issue as I cannot reproduce their issue on any of my systems.

facelessuser commented 1 year ago

It is possible that the folks over at the Package Control repo have seen these kinds of issues and have more experience than I at debugging this as this is in their domain.

facelessuser commented 1 year ago

Unfortunately, this is an upstream package control issue, I'm seeing no issues on Windows or macOS. Package Control should not be configuring the load without the load order, but we do not, and cannot control this. Package Control people should be able to make recommendations on moving forward, I've offered my advice above.

As there are no action items for us here, I am closing the issue.

evandrocoan commented 1 year ago

Thanks for looking into it. You are right; regardless of the dependency configuration, package control should not allow something to be loaded without a dependency number.