[TxMt] Re: Can TextMate::UI.alert etc. be used with the ruby20 shim?
mailinglist at textmate.org
Sun Aug 21 11:59:15 UTC 2016
On 21 Aug 2016, at 13:29, Stefan Daschek wrote:
> I’d be happy to give this a try. Could you give me some hints on
> what code you think could / should be removed?
Unused code, whatever that is :) And code that is only used by a single
bundle can be moved to that bundle.
There might also be use of some code that could be replaced with stdlib
functionality, for example a lot of bundles use `e_sh` from `escape.rb`
when they should probably instead use the `Shellwords` library.
> To check if code isn’t used in other bundles before removing it:
> Would it be sufficient to search across all bundles that are listed in
> TextMate’s bundle index?
Yes, I think if none of “our” bundles use the code, there should be
no need to support it anymore.
> (Btw, where can I find the source of this index?)
This code will echo the “git clone” instructions required to clone
all bundles in the index (pipe it to `sh` when you ensure it works):
|grep -o 'https://api.textmate.org/.*\.tbz' \
|while read url; do curl -s $url \
|tar -jxO info.plist|pp \
|sed -n 's/.*url = "\(.*git.*\)";/\1/p' \
|( read repos; echo git clone $repos ); done
Here `pp` is the property list tool found in the _Property List_ bundle
It basically just reads a property list from stdin and outputs the
old-style format to stdout so that we can easily grep it. A bit like
`pl` but that tool lacks support for binary property lists.
And you will btw need to clone all the repositories because the deployed
versions use binary property lists, so searching these would not find
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the textmate