2017-09-05 5:24 GMT+09:00 Bram Moolenaar <b...@moolenaar.net>: > > Kazunobu Kuriyama wrote: > > > The purpose of this patch is to make it easier for devs to write tests > > having branch conditions for macOS. > > > > So far, to cover all possible builds for macOS, the correct condition is > > "has('mac') || has('osx')". Yet, unfortunately, it has been something > easy > > to forget. > > > > This issue itself was discussed last May in the context of an argument on > > discontinuation of the support for the Carbon GUI, and we reached an > > agreement approving the proposed change in feature list items to address > > the issue (IIRC). > > > > In conjunction with that, I wrote a document on mac-darwin-ffeature and > > sent a patch for that to vim_dev. While the patch was included, I > somehow > > forgot to send out a patch for the mentioned change. > > > > Having seen the test included with Patch 8.0.1049 failed with non-darwin > > builds, I remembered what I forgot. > > > > Attached is a patch for the proposed change. It is made against HEAD. > > > > Briefly, with the proposed patch, the relevant feature list items will > > change from: > > > > mac Any Macintosh version of Vim, but not all OS X. > > macunix Compiled for OS X, with |mac-darwin-feature| > > osx Compiled for OS X, with or w/o |mac-darwin-feature| > > > > to: > > > > mac Any Macintosh version of Vim > > macunix Compiled for OS X, with |mac-darwin-feature| > > osx Compiled for OS X, without |mac-darwin-feature| > > I think the "osx" here is very confusing. It should just mean "any > version of OS X". >
Agreed. With my new patch attached to this email, has('osx') always returns 1 regardless of whether the darwin feature is compiled in, if Vim was built on macOS. > For the others: Is it clear how to add a check for a specific version, > no matter if Vim is before or after this change? > With the modification mentioned above, I think it will get clearer if the change is included. With it, we'll have mac Any Macintosh version of Vim osx Any macOS version of Vim macdarwin Compiled for macOS with |mac-darwin-feature| macunix (ditto) > > I'm not sure why "mac" was "not all OS X"? What was excluded, and did > anybody rely on that? It's certainly easier to understand. > I'm not, either. Though it may sound a joke, it is the fact that has('mac') of the system-installed Vim returns 0 on macOS, since the darwin feature is not compiled in. Probably, they don't like to see what they think the Vi text editor dependent on an Objective-C runtime to support GUI. In fact, +clipboard is implemented with the NSPasteboard class which belongs to AppKit, the GUI part of the Cocoa framework. I guess, when the feature was included, there was a reasonable expectation that non-darwin build would soon disappear, thereby people might have thought the feature would prevail and thus no need to let 'mac' cover all possible builds...I don't know. Anyway, I think it's a good chance to address the issue on this occasion. > > Perhaps it makes sense to add "macdarwin". It's still a bit confusing > compared to "macunix", and redundant. But it's useful for code where > the darwin feature is required. > I like the idea. I added 'macdarwin' to the feature list and revised some part of the test suite and the documents accordingly. I hope now you can see easily whether the addition is worth having. Best regards, Kazunobu > -- > hundred-and-one symptoms of being an internet addict: > 76. Your ISP regards you as a business partner rather than as a customer. > > /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net > \\\ > /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ > \\\ > \\\ an exciting new programming language -- http://www.Zimbu.org > /// > \\\ help me help AIDS victims -- http://ICCF-Holland.org > /// > > -- > -- > You received this message from the "vim_dev" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to vim_dev+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
mac-feature-list.updated.patch
Description: Binary data