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

display error dialog prompting user to force upgrade buggy Python plugin #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

anthrotype
Copy link
Member

the old Glyphs Python plugin had an issue with the pip command, which has now been fixed in the latest version of that plugin. The upgrade should happen automatically I believe, but in any case it's better to tell the user they can manually remove and reinstall the Python plugin to overcome the issue

see schriftgestalt/glyphs-packages#146 (comment)

Screenshot 2024-05-16 at 15 23 53

the old Glyphs Python plugin had an issue with pip which has been fixed in the latest version of the plugin. The upgrade should happen automatically IIUC, but in any case it's better to tell the user they can manually remove and reinstall the Python plugin to overcome the issue
@anthrotype
Copy link
Member Author

@schriftgestalt am I correct in thinking that I just need to bump the two version fields in the Info.plist for the Plugin Manager to detect that our fontc export plugin can be updated?

And are the plugin updates automatic (how frequent) or do users need to actively click upgrade somewhere?

@schriftgestalt
Copy link

No, the plugin manager just pulls whatever is in the repo.

@anthrotype
Copy link
Member Author

wait, so even if I didn't change the versions it would still get updated?
and when will that occur?

@schriftgestalt
Copy link

The check is done when the app starts. The actual pulling when the app is closed. Otherwise the loaded plugin and the code on the disk would not agree.

@anthrotype
Copy link
Member Author

The check

what check? you said it "just pulls whatever is in the repo", which I assume means the versions in Info.plist are irrelevant?

@schriftgestalt
Copy link

schriftgestalt commented May 16, 2024

The check if there are new commits in the repo. @florianpircher did that code. So he might have more details.

@anthrotype
Copy link
Member Author

got it, thank you. So what's the use of the version strings? I can't even see those displayed anywhere in the UI

@schriftgestalt
Copy link

schriftgestalt commented May 16, 2024

the version string is a leftover from Glyphs 2.

You can remove those keys from the info.plist. But increase the CFBundleVersion every time you change something. And the CFBundleShortVersionString for bigger changes.

@anthrotype anthrotype force-pushed the update-python-error branch from 1ce8748 to 3864dcf Compare May 16, 2024 14:44
@anthrotype
Copy link
Member Author

oh, in that case I won't touch them. I reverted the commit that bumped them

@anthrotype
Copy link
Member Author

so how can one force some plugin to be updated? by closing and reopening the app a couple times?

@anthrotype
Copy link
Member Author

You can remove those keys from the info.plist. But increase the CFBundleVersion every time you change something. And the CFBundleShortVersionString for bigger changes.

i'm confused. Should I remove them or increase them?!

@florianpircher
Copy link

florianpircher commented May 16, 2024

When Glyphs launches, it fetches all repositories. As it is doing that, Glyphs checks whether the HEAD commit changed between before and after the fetch. If it did change, Glyphs considers that an update. Just as Glyphs is quit, the app resets the updated repositories to the fetched update. So the checking for updates and downloading new content is happening at launch, installing that new content is quickly done when quitting.

You can force an update by uninstalling and reinstalling. This is something that we will address better in the UI, but that will have to wait for the next bigger UI rework.

@florianpircher
Copy link

The versions strings in the bundle’s Info.plist are good to keep around and increment. They are part for a well-formed bundle. And while their values are currently not displayed to the user in the Plugin Manager, they still show up when the plugin crashes so you know what version a user has when they report a crash of your plugin.

@anthrotype
Copy link
Member Author

thanks for the clarifications
I'll keep them!

@schriftgestalt
Copy link

I meant you should remove those:UpdateFeedURL, productPageURL, productReleaseNotes. The CFBundleVersion, CFBundleShortVersionString are from apple and needed.

@anthrotype
Copy link
Member Author

so from what I understand we can simply wait and do nothing, this dialog about the Glyphs Python plugin not working with pip is transient and will go away as soon as people close and start their app a couple of times to automatically obtain the latest copy. I think I'll just close this

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

Successfully merging this pull request may close these issues.

3 participants