AFileIcon icon indicating copy to clipboard operation
AFileIcon copied to clipboard

"Shell Script (Git).sublime-syntax" warning on startup with Dev Channel ST3.

Open leeb opened this issue 7 years ago • 11 comments

After updating to ST3 build 3188 (Dev Channel), I have a new warning dialog on startup.

Error loading syntax file "Packages/zzz A File Icon zzz/aliases/Shell Script (Git).sublime-syntax": Unable to read Packages/zzz A File Icon zzz/aliases/Shell Script (Git).sublime-syntax

Everything seems fine once the dialog is dismissed.

Your Environment

macOS High Sierra Version 10.13.6

Console with dev_mode: true

A File Icon: Initializing settings A File Icon: Initializing icons >>> All the necessary icons are provided A File Icon: Checking theme specific icons A File Icon: Getting installed themes >>> {'Theme - Default': ['Adaptive.sublime-theme', 'Default.sublime-theme']} A File Icon: Getting the list of theme packages with customization support >>> [] A File Icon: Checking aliases A File Icon: Enabling aliases >>> Aliases already enabled A File Icon: Preparing to patch A File Icon: Getting installed themes >>> {'Theme - Default': ['Adaptive.sublime-theme', 'Default.sublime-theme']} A File Icon: Getting the list of theme packages with customization support >>> [] A File Icon: Getting settings of the icons >>> {'opacity_on_hover': 0.5, 'opacity_on_select': 1.0, 'opacity': 0.75, 'row_padding': [], 'size': 8} A File Icon: Clearing old unnecessary patches A File Icon: All the themes are already patched

leeb avatar Jan 21 '19 15:01 leeb

This file is no longer part of the current v3.3.1 release as ST provides support for git files via default Git Formats package.

  1. Are you running this latest release?
  2. You may try to either manually delete the file or run "A File Icon: Revert to freshly installed state" and restart ST.
  3. If the issue persists, you might need to delete the Cache/zzz A File Icon zzz . Maybe an "old" cache of that file still exists, which causes ST to muck.

deathaxe avatar Jan 21 '19 16:01 deathaxe

Yes, on v3.3.1. First thing I tried was to delete and reinstall the package. Have also just cleared cache folder, with no change. If the issue is with the dev channel build of ST3, I can revert my version and close issue.

leeb avatar Jan 21 '19 17:01 leeb

Maybe the session file or contains any file/view with the syntax still being assigned to for some reason.

deathaxe avatar Jan 21 '19 18:01 deathaxe

Removing syntax references to "zzz A File Icon zzz" in the Sublime session file removed the warning dialogs for me.

jacobcsmith avatar Jan 31 '19 19:01 jacobcsmith

Same result for me, resolved the immediate issue by removing references in the session file. Would appreciate feedback from the author as to whether you'd like this closed, or left open pending any fix in code.

leeb avatar Feb 02 '19 11:02 leeb

I don't intend to write any code which messes with your session file as it might have unpredictable side effects. The issue you see is caused by an unresolved reference in a configuration file of ST, which can happen at any time with any plugin which removes a syntax definition which is in use by ST.

A File Icon removed that syntax as it is no longer needed with the current release ST3176 which provides its own syntax for that purpose.

deathaxe avatar Feb 02 '19 11:02 deathaxe

run "A File Icon: Revert to freshly installed state" and restart ST

delete the Cache/zzz A File Icon zzz

Removing syntax references to "zzz A File Icon zzz" in the Sublime session file

none of these worked for me

Every time I re-open ST3 (build 3208) if I look in the fileSublime Text 3/Local/Session.sublime_session this line has appeared again (after having deleted it):

"syntax": "Packages/zzz A File Icon zzz/aliases/Shell Script (Git).sublime-syntax"

Paying more attention to the context I noticed it appears here:

"groups":
[
    {
        "sheets":
        [
            {
                "file": "/Users/anentropic/Documents/Dev/project/.gitignore",
                ...
                "settings":
                {
                    ...
                    "settings":
                    {
                        ...
                        "syntax": "Packages/zzz A File Icon zzz/aliases/Shell Script (Git).sublime-syntax"

So yeah - I had a file open in one of my Sublime windows, where I must have manually assigned that syntax to it in the past.

After closing that file and restarting ST the annoying alert box is finally gone.

anentropic avatar Apr 21 '19 14:04 anentropic

Removing syntax references to "zzz A File Icon zzz" in the Sublime session file removed the warning dialogs for me.

How did you do that, please?

Vincent14 avatar Jan 07 '20 09:01 Vincent14

On Mac, close sublime and open the session file as below in the other editor. Find all mentioned the zzz to delete and then reopen sublime, everything goes well :). $HOME/Library/Application\ Support/Sublime\ Text\ 3/Local/Session.sublime_session

returnchung avatar Jan 08 '20 09:01 returnchung

Thanks @returnchung this fixed it for me. On Windows, I found the session file here: C:\Users\{Your User Name}\AppData\Roaming\Sublime Text 3\Local\Session.sublime_session

dwhiting10 avatar Feb 08 '20 14:02 dwhiting10

i removed zzz A File Icon zzz using package control. Error gone

GribanovIvan avatar Dec 06 '20 19:12 GribanovIvan