Hi all,
the [Emmet plugin](https://emmet.io) crashes since the latest test builds of TM v2.0-rc.22.
The developer is aware of this issue, but unfortunately no fix till now. Could someone here tell what the changes in TM are what could break the Emmet plugin? So I can give the developer a hint :)
A crashlog can be found here: https://feek.d.pr/98mGNP
== feek
-- Sent from: http://textmate.1073791.n5.nabble.com/textmate-users-f3.html
Hi,
since the latest build of TM today (2.0 rc24), the Emmet plugin even do not show in the menu bar. I switch to rc10 (Emmet works) in order to do some css work.
From the developer is do not get any info regarding updating the plugin. Is
there an other way to incorporate https://github.com/emmetio/expand-abbreviation in latest TM builds?
== feek
-- Sent from: http://textmate.1073791.n5.nabble.com/textmate-users-f3.html
On 27 Jun 2019, at 7:01, feek wrote:
since the latest build of TM today (2.0 rc24), the Emmet plugin even do not show in the menu bar. I switch to rc10 (Emmet works) in order to do some css work.
This is likely because rc-24 has the hardened runtime enabled (and is notarized).
I imagine that plug-ins must now also have the hardened runtime enabled to be able to be loaded by TextMate.
On 20 Jan 2019, at 19:41, feek wrote:
The developer is aware of this issue, but unfortunately no fix till now. Could someone here tell what the changes in TM are what could break the Emmet plugin? So I can give the developer a hint :)
Select _TextMate → About_ and switch to the Changes tab.
Then click “See all changes since v2.0-rc.20” and you will be brought to GitHub with all the commits since rc.20 (the previous version at the time of your email).
I've taken a crack at this.
I was able to get an error which confirms Allan's suspicions:
Error Domain=NSCocoaErrorDomain Code=3587 "dlopen_preflight(/Users/[...]/.homesick/repos/textmate-config/Application Support/TextMate/PlugIns/EmmetTextMate-1.tmplugin/Contents/MacOS/EmmetTextMate): no suitable image found. Did find:
/Users/[...]/.homesick/repos/textmate-config/Application Support/TextMate/PlugIns/EmmetTextMate-1.tmplugin/Contents/MacOS/EmmetTextMate: code signature in (/Users/[...]/.homesick/repos/textmate-config/Application Support/TextMate/PlugIns/EmmetTextMate-1.tmplugin/Contents/MacOS/EmmetTextMate) not valid for use in process using Library Validation: mapping process has no Team ID and is not a platform binary
/Users/[...]/.homesick/repos/textmate-config/Application Support/TextMate/PlugIns/EmmetTextMate-1.tmplugin/Contents/MacOS/EmmetTextMate: stat() failed with errno=1" UserInfo={NSLocalizedFailureReason=The bundle is damaged or missing necessary resources., NSLocalizedRecoverySuggestion=Try reinstalling the bundle., NSFilePath=/Users/[...]/.homesick/repos/textmate-co
I am also seeing the same error for Contents/PlugIns/Dialog2.tmplugin and Dialog.tmplugin.
I tried signing the plugin, but it was already signed.
$ codesign -s "[...]" EmmetTextMate-1.tmplugin
EmmetTextMate-1.tmplugin: is already signed
I also did a little Googling and I began to wonder if unsigned code can be loaded by signed code at all?
Thanks,
On Thu, Jun 27, 2019 at 12:44 AM Allan Odgaard mailinglist@textmate.org wrote:
On 20 Jan 2019, at 19:41, feek wrote:
The developer is aware of this issue, but unfortunately no fix till now. Could someone here tell what the changes in TM are what could break the Emmet plugin? So I can give the developer a hint :)
Select *TextMate → About* and switch to the Changes tab.
Then click “See all changes since v2.0-rc.20” and you will be brought to GitHub with all the commits since rc.20 (the previous version at the time of your email).
textmate mailing list textmate@lists.macromates.com https://lists.macromates.com/listinfo/textmate
On 12 Jul 2019, at 22:34, Graham Heath wrote:
I am also seeing the same error for Contents/PlugIns/Dialog2.tmplugin and Dialog.tmplugin.
Where are you seeing this error?
% codesign -vv TextMate.app/Contents/PlugIns/Dialog.tmplugin TextMate.app/Contents/PlugIns/Dialog.tmplugin: valid on disk TextMate.app/Contents/PlugIns/Dialog.tmplugin: satisfies its Designated Requirement
And TextMate itself (which embeds the plug-ins) should be notarized:
% spctl -a -v TextMate.app TextMate.app: accepted source=Notarized Developer ID
I tried signing the plugin, but it was already signed.
$ codesign -s "[...]" EmmetTextMate-1.tmplugin
The recent change was the switch to the hardened runtime, this is done by adding `--options runtime` to `codesign`.
So try re-sign it with that option.
However, when enabling the hardened runtime the plug-in may need entitlements, for example if it is sending AppleEvents. But lacking entitlements shouldn’t cause a problem loading the plug-in, it will just be a runtime failure from `AESend`.
@graham,
I think your error is related to not showing the emmet plugin into the TM menu (thats since TM 2.0 rc24).
When switching back to rc10, the emmet plugin is visible again.
== feek
-- Sent from: http://textmate.1073791.n5.nabble.com/textmate-users-f3.html
Error log confirming that
-- Sent from: http://textmate.1073791.n5.nabble.com/textmate-users-f3.html
It seems that the developer is working on a new version of the Emmet for a couple of years now ( https://github.com/emmetio/emmet/issues/551#issuecomment-457849109) So, I've put together a quick solution (bundle) for the new Emmet abbreviation expander (https://github.com/emmetio/expand-abbreviation).
https://github.com/zdenko/emmet2.tmbundle
On Sat, Jul 13, 2019 at 1:10 PM feek feekdiv@gmail.com wrote:
Error log confirming that
-- Sent from: http://textmate.1073791.n5.nabble.com/textmate-users-f3.html
textmate mailing list textmate@lists.macromates.com https://lists.macromates.com/listinfo/textmate
Great Zdenko, you made my day :)
-- Sent from: http://textmate.1073791.n5.nabble.com/textmate-users-f3.html
My error code did not get posted:
Error loading /Users/Feek/Library/Application Support/TextMate/PlugIns/EmmetTextMate.tmplugin/Contents/MacOS/EmmetTextMate: dlopen(/Users/Feek/Library/Application Support/TextMate/PlugIns/EmmetTextMate.tmplugin/Contents/MacOS/EmmetTextMate, 265): no suitable image found. Did find: /Users/Feek/Library/Application Support/TextMate/PlugIns/EmmetTextMate.tmplugin/Contents/MacOS/EmmetTextMate: code signature in (/Users/Feek/Library/Application Support/TextMate/PlugIns/EmmetTextMate.tmplugin/Contents/MacOS/EmmetTextMate) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
-- Sent from: http://textmate.1073791.n5.nabble.com/textmate-users-f3.html
@feek; Fascinating, thats something to be excited about!
@Zdenko; Thanks, thats amazing :)
@allan; I'm running out the door, but if you like I'll put a formal pr together (if only for review).
To see this error I had to make some changes in the source.
In TMPlugInController, line 90 (original);
if([bundle load])
becomes:
NSError *bundleLoadError;
if([bundle loadAndReturnError:&bundleLoadError])
and then down on 104 (original);
NSLog(@"Failed to load plug-in: %@, path %@", name ?: identifier, aPath);
becomes
NSLog(@"Failed to load plug-in: %@, path %@. Error %@", name ?: identifier, aPath, bundleLoadError);
Thanks, Graham
On 13 Jul 2019, at 3:41, Allan Odgaard wrote:
On 12 Jul 2019, at 22:34, Graham Heath wrote:
I am also seeing the same error for Contents/PlugIns/Dialog2.tmplugin and Dialog.tmplugin.
Where are you seeing this error?
% codesign -vv TextMate.app/Contents/PlugIns/Dialog.tmplugin TextMate.app/Contents/PlugIns/Dialog.tmplugin: valid on disk TextMate.app/Contents/PlugIns/Dialog.tmplugin: satisfies its Designated Requirement
And TextMate itself (which embeds the plug-ins) should be notarized:
% spctl -a -v TextMate.app TextMate.app: accepted source=Notarized Developer ID
I tried signing the plugin, but it was already signed.
$ codesign -s "[...]" EmmetTextMate-1.tmplugin
The recent change was the switch to the hardened runtime, this is done by adding `--options runtime` to `codesign`.
So try re-sign it with that option.
However, when enabling the hardened runtime the plug-in may need entitlements, for example if it is sending AppleEvents. But lacking entitlements shouldn’t cause a problem loading the plug-in, it will just be a runtime failure from `AESend`.
textmate mailing list textmate@lists.macromates.com https://lists.macromates.com/listinfo/textmate
Can someone perhaps explain why does Emmet have to be a plugin? I'm not an expert, but Emmet in its core is JS library, and plugin seems a bit of overkill. Besides, it's menu is placed at the top level, which, IMHO is unnecessary since it only covers HTML/CSS scope. My approach is far from perfect, but I think it's simpler and easier to maintain,
z
On Sat, Jul 13, 2019 at 5:41 PM Graham Heath graham.p.heath@gmail.com wrote:
@feek; Fascinating, thats something to be excited about!
@Zdenko; Thanks, thats amazing :)
@allan; I'm running out the door, but if you like I'll put a formal pr together (if only for review).
To see this error I had to make some changes in the source.
In TMPlugInController, line 90 (original);
if([bundle load])
becomes:
NSError *bundleLoadError;
if([bundle loadAndReturnError:&bundleLoadError])
and then down on 104 (original);
NSLog(@"Failed to load plug-in: %@, path %@", name ?: identifier, aPath);
becomes
NSLog(@"Failed to load plug-in: %@, path %@. Error %@", name ?: identifier, aPath, bundleLoadError);
Thanks, Graham
On 13 Jul 2019, at 3:41, Allan Odgaard wrote:
On 12 Jul 2019, at 22:34, Graham Heath wrote:
I am also seeing the same error for Contents/PlugIns/Dialog2.tmplugin and Dialog.tmplugin.
Where are you seeing this error?
% codesign -vv TextMate.app/Contents/PlugIns/Dialog.tmplugin TextMate.app/Contents/PlugIns/Dialog.tmplugin: valid on disk TextMate.app/Contents/PlugIns/Dialog.tmplugin: satisfies its Designated Requirement
And TextMate itself (which embeds the plug-ins) should be notarized:
% spctl -a -v TextMate.app TextMate.app: accepted source=Notarized Developer ID
I tried signing the plugin, but it was already signed.
$ codesign -s "[...]" EmmetTextMate-1.tmplugin
The recent change was the switch to the hardened runtime, this is done by adding --options runtime to codesign.
So try re-sign it with that option.
However, when enabling the hardened runtime the plug-in may need entitlements, for example if it is sending AppleEvents. But lacking entitlements shouldn’t cause a problem loading the plug-in, it will just be a runtime failure from AESend.
textmate mailing list textmate@lists.macromates.com https://lists.macromates.com/listinfo/textmate
textmate mailing list textmate@lists.macromates.com https://lists.macromates.com/listinfo/textmate
For implementing the css and html expansions there is indeed no need of using a plugin. The emmet plugin also has a lot of command like increase numbers, replace enclosing html tags (I almost never used btw). Maybe for this functions a plugin was needed?
The original zen-coding bundle (base for emmet) also was just a bundle.
= feek
-- Sent from: http://textmate.1073791.n5.nabble.com/textmate-users-f3.html
I really appreciate this bundle Zdenko.
It has unblocked my upgrade to the latest version and I'm very happy to have a modern TM2.
Thanks, Graham
On 14 Jul 2019, at 4:29, feek wrote:
For implementing the css and html expansions there is indeed no need of using a plugin. The emmet plugin also has a lot of command like increase numbers, replace enclosing html tags (I almost never used btw). Maybe for this functions a plugin was needed?
The original zen-coding bundle (base for emmet) also was just a bundle.
= feek
-- Sent from: http://textmate.1073791.n5.nabble.com/textmate-users-f3.html
textmate mailing list textmate@lists.macromates.com https://lists.macromates.com/listinfo/textmate
Same here :) I switching al the time between RC10 and lates TM build :) (depending what I was doing).
== feek
I really appreciate this bundle Zdenko.
It has unblocked my upgrade to the latest version and I'm very happy to have a modern TM2.
Thanks, Graham
-- Sent from: http://textmate.1073791.n5.nabble.com/textmate-users-f3.html
On 13 Jul 2019, at 17:41, Graham Heath wrote:
@allan; I'm running out the door, but if you like I'll put a formal pr together (if only for review).
I’ve applied your suggested change, thanks!
https://github.com/textmate/textmate/commit/ad74df78242c39d906e5b0f6e69e6115...
No, thank you! I feel great about having made a contribution :-D
@allan (and the rest of the TextMate community): Thanks so much for your dedication. I love that I have gotten a number of specific and personal responses to my questions from this group. Can't really say that about many tools that I've used.
Thanks, Graham
On 15 Jul 2019, at 15:38, Allan Odgaard wrote:
On 13 Jul 2019, at 17:41, Graham Heath wrote:
@allan; I'm running out the door, but if you like I'll put a formal pr together (if only for review).
I’ve applied your suggested change, thanks!
https://github.com/textmate/textmate/commit/ad74df78242c39d906e5b0f6e69e6115...
textmate mailing list textmate@lists.macromates.com https://lists.macromates.com/listinfo/textmate