Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error after installing via Package Control #46

Closed
rudedogg opened this issue Oct 17, 2020 · 8 comments
Closed

Error after installing via Package Control #46

rudedogg opened this issue Oct 17, 2020 · 8 comments

Comments

@rudedogg
Copy link
Sponsor

I keep getting this error popup after installing the plugin via package control:

error loading meta info from Packages/Zig Language/Preferences/Comments.tmPreferences: Error parsing plist xml: expected < in file Packages/Zig Language/Preferences/Comments.tmPreferences on line: 1

The error seems to happen when I interact with Package Control (add/remove packages). Syntax highlighting still works, so it's not a big deal.

I'm using the master branch of Package Control, and the beta version of macOS 11 – so this could definitely be an issue on my end and I just need to wait. Is anyone else having this happen?

@tesuji
Copy link

tesuji commented Oct 26, 2020

I have the same error dialog in Linux amd64.
image

@haferburg
Copy link

Same here on Windows.

@brodeuralexis
Copy link

brodeuralexis commented Dec 27, 2020

Did some investigating, Preferences/Comments.tmPreferences looks like this from a fresh install.
Was there an error when packaging ?
zig-comments-preference

EDIT:
Seems that a workaround is to replace the content of Preferences/Comments.tmPreferences with the content of Support/Comments.tmPreferences in Installed Packages/Zig Language.sublime-package

@naringas
Copy link

I just got this error on Sublime Text after a fresh install of this via package control.

I can confirm that the workaround (from #46 (comment) ) does seems to work. I was able to do it by modifying the zipped up .config/sublime-text-3/Installed Packages/Zig Language.sublime-package

@Cobertos
Copy link

Cobertos commented Mar 5, 2021

Workaround worked for me as well. Unzip, change the file, rezip as .zip

EDIT: Looks to be same issue as #34

Maybe the Package Control package just needs to be updated? Latest is 1.4.5 (both on GitHub and Package Control), but the issue was fixed after the latest version.

@Manuzor
Copy link
Sponsor

Manuzor commented Apr 15, 2021

I do not encounter the problem when cloning the repo into ~\AppData\Roaming\Sublime Text 3\Packages\ on windows. So yea, seems like the version uploaded to package control is outdated.

@ron-wolf
Copy link

ron-wolf commented May 25, 2021

For anyone wondering: Sublime packages are zip archives, as you’ll find by running file "$HOME/Application Support/Sublime Text 3/Installed Packages/Zig Language.sublime-package". As such, fixing the issue can involve a bit of tedious decompressing and recompressing. The following script applies @brodeuralexis’s fix and should suffice as a temporary fix for an individual installation (it prints stuff verbosely so you know what’s going on, and exits on the first error):

#!/usr/bin/env -S bash -euET -o pipefail
shopt -s inherit_errexit 2>/dev/null || true

ZIP_DEST="$(mktemp -d)"
ZIP_SRC="$HOME/Library/Application Support/Sublime Text 3/Installed Packages/Zig Language.sublime-package"

SRC_FILE=Support/Comments.tmPreferences
DEST_FILE=Preferences/Comments.tmPreferences

printf 'Unarchiving "%s"\n' "$(basename "$ZIP_SRC")"
unzip "$ZIP_SRC" {Preferences,Support}/Comments.tmPreferences -d "$ZIP_DEST"
printf '\nOverwriting "%s" with the contents of "%s"\n' "$DEST_FILE" "$SRC_FILE"
ln -fv "$ZIP_DEST/$SRC_FILE" "$ZIP_DEST/$DEST_FILE"

printf '\nRe-zipping "%s" with the new "%s"\n' "$(basename "$ZIP_SRC")" "$DEST_FILE"
pushd "$ZIP_DEST"
zip -Tv -b "$ZIP_DEST" "$ZIP_SRC" Preferences/Comments.tmPreferences
popd

printf '\nRemoving temporary files\n'
rm -fRv "$ZIP_DEST"

@hovsater
Copy link
Collaborator

hovsater commented Nov 2, 2021

I've released a new version, 1.5.0, that is semver compatible. It's now available in Package Control. It resolves this issue.

Enjoy!

@hovsater hovsater closed this as completed Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants