Skip to content
This repository has been archived by the owner on Sep 4, 2018. It is now read-only.

auto add latest DVTPlugInCompatibilityUUID to Alcatraz (just Alcatraz, not user plugins) #276

Closed
alanhamlett opened this issue May 20, 2015 · 27 comments

Comments

@alanhamlett
Copy link
Contributor

This is not for user plugins, only for Alcatraz itself.

I'm thinking a service which every hour:

  • checks the latest version of Xcode from apple.com
  • downloads the new version if it has changed
  • adds the new DVTPlugInCompatibilityUUID to Alcatraz [1]
  • commits and pushes to GitHub
  1. find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID``

Related issues: #73, #120, #122, #209, #225, #236, #255 #260, #262, #273

@skywinder
Copy link

+1 👍

@winkelsdorf
Copy link

:1

But why not also do this for the user plugins?

I just had to edit about ~ 20 plugin bundle info.plist to support current Xcode 6.3.2, which is quite a pain. This was not what I excepted from a package manager.

Alcatraz Troubleshooting section sent me into the wrong direction until I discovered it in some plugin's git history..

@AJMiller
Copy link

That script alone is pretty sweet. Just saved me a ton of time updating all of my plugins. I also would vote to have it run that script for user plugins, but maybe just for point releases?
+1

@jurre
Copy link
Collaborator

jurre commented May 21, 2015

Updating all plugins has been widely discussed (please search the issue history) and we've decided against it. Nothing has really changed for us to reconsider that decision, actually apple has been cracking down on plugins even harder.

@alanhamlett
Copy link
Contributor Author

@jurre I understand not updating all plugins, that makes sense. However myself and my users see Alcatraz as a core component. When Alcatraz is not running, my plugin can not update. Even if I've already tested and updated my plugin. Because Alcatraz is blocking all plugins from updating, shouldn't it provide some sense of durability across Xcode updates?

@winkelsdorf
Copy link

@jurre: Understood. I tend not to search through closed Issues of large projects for things that should be mentioned in the docs.

For the sake of good UX, I would suggest to please consider given at least a warning or error message if a package does not include the current UUID in it's info.plist. This morning, I wondered why plugins stopped working and freshly installed ones (from today) didn't show up which no error message given at all.

I understand the displeasure with Apple's choice how to handle plugins for your team and all the plugin developers. But knowing this show stopper obviously for a long time and not publishing it under the section troubleshooting at the project home is kind of not mentioning one important thing. Which is easy to fix, when you know where to search.

Anyway, using alcatraz for several years now (iirc 2013): Thank you for this great work!

Edit: Found it, #225 #209, you already realized that you should give some kind of indication if a plugin is working/would work 👍 Sadly it's a known issue for ~ 1,5 years that at least some message should be shown, see #120.

@CodeEagle
Copy link

--- comment marked as inappropriate by @supermarin ---

@supermarin
Copy link
Collaborator

@CodeEagle I'm deleting your comment because it's not relevant to this issue (look at the title),
and I don't want other people to see it.

I've opened an issue on your repository with more info.

@alkozin
Copy link

alkozin commented Jun 19, 2015

I create this tool https://github.com/alkozin/Alcatraz-helper
If you decide that it is useful, we can include it in the project.

Since we can not write a plugin that will not break with the each new release let's make the application and put it here: /Applications/Xcode.app/Contents/Applications/

Then you can push only one button to restore Alcatraz.
What do you think?

@jurre
Copy link
Collaborator

jurre commented Jun 20, 2015

@alkozin this is exactly what we do not want. It is to plugin maintainers themselves to make sure their plugin is compatible, and if it is, add the UUID. Adding it blindly to all the plugins will make Xcode crash and ultimately lead to apple banning plugins altogether.

@guillaumealgis
Copy link
Member

@jurre If I'm not mistaken, @alkozin's app only add UUIDs to Alcatraz compatibility list, not all plugins.

@alkozin
Copy link

alkozin commented Jun 21, 2015

@jurre, @guillaume-algis rights. App adds just Alcatraz. Then Alcatraz can check plugin updates and install updated plugins.
Also we can improve it and add feature to removing Alcatraz from Xcode's blacklist.

@alkozin
Copy link

alkozin commented Jun 24, 2015

@jurre, @supermarin what do you think about adding UUIDs just to Alcatraz?

@jurre
Copy link
Collaborator

jurre commented Jun 24, 2015

I wouldn't like automatically adding it, the idea behind these UUIDs is that we as developers check that everything still works and Xcode doesn't crash and if that's the case, add the UUID

@alanhamlett
Copy link
Contributor Author

@jurre sure for regular plugins, but for a Plugin Manager like Alcatraz? Just look at the issues to see the many problems every time Xcode gets a new version. Alcatraz not running means EVERY plugin installed with Alcatraz is also disabled even if that individual plugin has been tested and updated with the new UUID.

Can you test the new UUIDs before Apple releases a new Xcode version? If not, we should auto update Alcatraz with the latest UUID and handle errors by sending a notification to an Alcatraz mailing list.

@guillaumealgis
Copy link
Member

@alanhamlett If I may, the majority of the issues opened recently are either because of Xcode new blacklisting system (which could not be anticipated), or Alcatraz not behaving correctly on Xcode 7 beta. For the later, this is precisely what UUIDs are meant to avoid. The Xcode 7 beta UUID was added only a few hours after Xcode was available to download, probably without proper testing, which in my opinion was a mistake (I'm not blaming anyone, mind you).

Can you test the new UUIDs before Apple releases a new Xcode version?

Yeah, by testing on beta releases, and only once Alcatraz is deemed stable enough merging the new UUID. But this also means that people adopting the betas early will have to use Xcode without Alcatraz during a few days/weeks.

My point is that you either add the UUID as soon as the new Xcode comes out, and you'll get issues about Alcatraz crashing/not behaving correctly, or you take your time and test it before adding the UUID, and you'll get issues about Alcatraz not showing up in Xcode anymore. I prefer option 2, but I understand that's debatable.

Alcatraz not running means EVERY plugin installed with Alcatraz is also disabled

That's not entirely true. Alcatraz is "just" a frontend to git clone && xcodebuild for plugins. Alcatraz not being available just means you have to manage your plugins manually, like in the "old days". Nothing is keeping other plugins which are updated for the new Xcode version to run properly. Alcatraz even keeps the git repos of the plugins around, so upgrading a plugin to the latest version really isn't too much trouble.

I guess this reply will sound a bit bitter, and I really didn't mean it to. I'm just trying to clear things up. I agree that this UUID thing is a recurring issue, but in my opinion there is no silver bullet here.

@alanhamlett
Copy link
Contributor Author

Ok, I'll add a terminal command to my plugin's readme for users to manually update the plugin in cases where a new uuid is needed.

@alkozin
Copy link

alkozin commented Jun 25, 2015

Why do not move Alcatraz to .app and forget about this problems?

@supermarin
Copy link
Collaborator

@alkozin I'll have to reach out to Apple about this (as Alcatraz uses basically no Xcode APIs),
but it is one of the options. It feels weird if it's out of Xcode as a separate app, but if that's what we have to pay for the functionality...

@alanhamlett
Copy link
Contributor Author

@alkozin great idea!

@alkozin
Copy link

alkozin commented Jul 1, 2015

@supermarin I think it will look good. We can make a separate application without restrictions. It will make self updates and update plugins. And create a new small plugin for Xcode that will interact with the application.

If you like the idea, I would like to participate in the development.

@qx
Copy link

qx commented Nov 12, 2015

I have 2 versions xcode 6.4/7.1 ,after done as you suggestted, 6.4 worked,but 7.1 still have nothing
@alanhamlett

@stevenche
Copy link

I allready added DVTPlugInCompatibilityUUID into plist for 7.1 but still no "package manager" in window.

@alanhamlett
Copy link
Contributor Author

I've added an api endpoint with the latest Xcode releases updated daily:
https://wakatime.com/api/v1/xcode_releases

I'm sending myself an email with the dmg download link when any new Xcode version is released, to help with updating DVTPlugInCompatibilityUUID in plugins. If anyone else wants to get notified, send me an email [email protected] and I'll add you to the list.

@OdNairy
Copy link
Contributor

OdNairy commented Mar 12, 2016

@alanhamlett What is the trigger for new versions? Is it polling xcode downloads web-page or any mail/rss feed?

@alanhamlett
Copy link
Contributor Author

It polls the Xcode downloads page once per day. Currently I have to manually download the dmg to get the UUID but that will be automated in the future using this script:
https://github.com/wakatime/xcode-wakatime/blob/master/extract_xcode_plugin_uuid.py

@OdNairy
Copy link
Contributor

OdNairy commented Mar 12, 2016

So the whole workflow is:

  1. Apple produce new Xcode version;
  2. You manually download it;
  3. Manually extract new UUID and added info to db;
  4. API included new info.

Is i'm right?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests