timbrel / GitSavvy

Full git and GitHub integration with Sublime Text
MIT License
1.9k stars 136 forks source link

Packages does not load properly in Sublime Text 4 version 4126 #1918

Closed madhosoi closed 4 months ago

madhosoi commented 4 months ago

Hi I am getting this error installing the package ( either via Package Manager or cloning this repo). Here you have some details:

reloading plugin GitSavvy.__init__
reloading plugin GitSavvy.git_savvy
Traceback (most recent call last):
  File "/Users/<USER>/Applications/Sublime Text.app/Contents/MacOS/Lib/python38/sublime_plugin.py", line 312, in reload_plugin
    m = importlib.import_module(modulename)
  File "./python3.8/importlib/__init__.py", line 127, in import_module
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 808, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/<USER>/Library/Application Support/Sublime Text/Packages/GitSavvy/git_savvy.py", line 3, in <module>
    from .common.commands import *
  File "/Users/<USER>/Library/Application Support/Sublime Text/Packages/GitSavvy/common/commands/__init__.py", line 1, in <module>
    from .debug import *
  File "/Users/<USER>/Library/Application Support/Sublime Text/Packages/GitSavvy/common/commands/debug.py", line 7, in <module>
    from ..util import debug, reload
  File "/Users/<USER>/Library/Application Support/Sublime Text/Packages/GitSavvy/common/util/__init__.py", line 5, in <module>
    from . import view
  File "/Users/<USER>/Library/Application Support/Sublime Text/Packages/GitSavvy/common/util/view.py", line 6, in <module>
    from ...core.view import place_view
  File "/Users/<USER>/Library/Application Support/Sublime Text/Packages/GitSavvy/core/view.py", line 6, in <module>
    from .runtime import text_command
  File "/Users/<USER>/Library/Application Support/Sublime Text/Packages/GitSavvy/core/runtime.py", line 15, in <module>
    from . import utils
  File "/Users/<USER>/Library/Application Support/Sublime Text/Packages/GitSavvy/core/utils.py", line 122, in <module>
    STYLE = {"scope": "git_savvy.graph.dot", "flags": sublime.RegionFlags.NO_UNDO}
AttributeError: module 'sublime' has no attribute 'RegionFlags'
generating meta info summary
generating syntax summary
unloading plugin GitSavvy.__init__
unloading plugin GitSavvy.git_savvy
reloading plugin GitSavvy.__init__
reloading plugin GitSavvy.git_savvy
Traceback (most recent call last):
  File "/Users/<USER>/Applications/Sublime Text.app/Contents/MacOS/Lib/python38/sublime_plugin.py", line 312, in reload_plugin
    m = importlib.import_module(modulename)
  File "./python3.8/importlib/__init__.py", line 127, in import_module
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 808, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/<USER>/Library/Application Support/Sublime Text/Packages/GitSavvy/git_savvy.py", line 3, in <module>
    from .common.commands import *
  File "/Users/<USER>/Library/Application Support/Sublime Text/Packages/GitSavvy/common/commands/__init__.py", line 1, in <module>
    from .debug import *
  File "/Users/<USER>/Library/Application Support/Sublime Text/Packages/GitSavvy/common/commands/debug.py", line 7, in <module>
    from ..util import debug, reload
  File "/Users/<USER>/Library/Application Support/Sublime Text/Packages/GitSavvy/common/util/__init__.py", line 5, in <module>
    from . import view
  File "/Users/<USER>/Library/Application Support/Sublime Text/Packages/GitSavvy/common/util/view.py", line 6, in <module>
    from ...core.view import place_view
  File "/Users/<USER>/Library/Application Support/Sublime Text/Packages/GitSavvy/core/view.py", line 6, in <module>
    from .runtime import text_command
  File "/Users/<USER>/Library/Application Support/Sublime Text/Packages/GitSavvy/core/runtime.py", line 15, in <module>
    from . import utils
  File "/Users/<USER>/Library/Application Support/Sublime Text/Packages/GitSavvy/core/utils.py", line 122, in <module>
    STYLE = {"scope": "git_savvy.graph.dot", "flags": sublime.RegionFlags.NO_UNDO}
AttributeError: module 'sublime' has no attribute 'RegionFlags'
generating meta info summary
generating syntax summary
unloading plugin GitSavvy.__init__
unloading plugin GitSavvy.git_savvy
generating syntax summary
generating meta info summary
generating syntax summary
generating meta info summary
Package Control: pausing indexer
ignored packages updated to: ["GitSavvy", "Vintage"]
reloading settings Packages/User/Package Control.sublime-settings
reloading settings Packages/User/Preferences.sublime-settings
Package Control: Installed package "GitSavvy" 2.44.3
ignored packages updated to: ["Vintage"]
reloading settings Packages/User/Package Control.sublime-settings
reloading settings Packages/User/Preferences.sublime-settings
reloading plugin GitSavvy.__init__
Traceback (most recent call last):
  File "/Users/<USER>/Applications/Sublime Text.app/Contents/MacOS/Lib/python38/sublime_plugin.py", line 312, in reload_plugin
    m = importlib.import_module(modulename)
  File "./python3.8/importlib/__init__.py", line 127, in import_module
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'GitSavvy.__init__'
reloading plugin GitSavvy.git_savvy
Traceback (most recent call last):
  File "/Users/<USER>/Applications/Sublime Text.app/Contents/MacOS/Lib/python38/sublime_plugin.py", line 312, in reload_plugin
    m = importlib.import_module(modulename)
  File "./python3.8/importlib/__init__.py", line 127, in import_module
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'GitSavvy.git_savvy'

Cheers, Miguel

kaste commented 4 months ago

Looks like your Sublime Text version is too old. Could it be #1904 ?

kaste commented 4 months ago

I guess that can be closed. I did not realize that you said you're running 4126 directly in the title. (I thought that would be the number of GitSavvy.)

I'm not sure how to make this requirement, the build number of ST, clear for the user. Ideas welcome.

kaste commented 4 months ago

🤷

madhosoi commented 4 months ago

Sorry for the late answer. I downloaded the latest version of your code, and debug it. I found a workaround replacing sublime. for sublime-plugin. in some files. I will keep this version as long as I can. I want to remain in that version of Sublime until I deserve to pay for the newer version. ;) thanks!

kaste commented 4 months ago

👍 fair enough. You may post your patch to get it working again. I don't recall any bigger API changes/features in the last years.