2017-04-18 2:49 GMT+09:00 Marvin Renich <m...@renich.org>:

> * Kazunobu Kuriyama <kazunobu.kuriy...@gmail.com> [170417 05:19]:
> > This is a followup to
> > https://groups.google.com/forum/#!topic/vim_dev/5RFo3q8xvfo where we
> talked
> > about the feature list items relevant to Mac:
> >
> > 2017-04-09 21:58 GMT+09:00 Bram Moolenaar <b...@moolenaar.net>:
> > >  We should make the feature list a bit more clear about what
> > those features mean.
> > >
> > > I now have:
> > >
> > > gui_mac                 Compiled with Macintosh GUI.
> > > mac                     Any Macintosh version of Vim, but not all OS X.
> > > macunix                 Compiled for OS X, with darwin
> > > osx                     Compiled for OS X, with or without darwin
> >
> >
> > Proposal
> > -------------
> >
> > My proposal is to change them as follows:
> >
> > 'gui_mac' will be abolished by discontinuing maintaining the Carbon GUI
> > code and dropped from the list.
> >
> > The rest of the items will be changed for eval.txt as follows:
> >
> > mac         Any macOS versions of Vim
> > macunix     Compiled for macOS with pasteboard support (default)
> > osx         (Deprecated.  Use "mac" instead)
> >
> > Not to mention, macOS implies Mac OS X and OS X.
> >
> > Personally, I think the item 'osx' can also be dropped on this occation
> if
> > we don't worry much about the backwards compatibility of that particular
> > item.
>
> Bram usually does not make changes that have a reasonable chance to
> break existing scripts.  I'm not a Mac user, but it seems to me that
> changing the meaning of existing feature names is very likely to break
> existing scripts.


The proposed changes are rather fixes to address a certain issue than those
that possibly break existing scripts.

The issue is this: Currently, 'mac' does not cover all versions of vim
running on Mac. To be more specific, vim configured with --disable-darwin
gives 0 to has('mac').

To address the issue, a new feature list item called 'osx' was introduced
about a year ago.  With that, the following condition covers all possible
vim instances running on Mac:

    has('mac') || has('osx')

Although this is logically correct, it looks clumsy and is turned out to be
error-prone.

Naturally, people does not expect that there's a case where has('mac')
returns 0 for a vim actually running on Mac.  The proposed patch would
eliminate this counter-intuitive case.

Also, we are now in the process of improving the test coverage.  Through
the process, we sometimes came across the cases where a newly written test
failed inadvertently for darwin-disabled vim due to missing has('osx').

If all test writers were familiar with Mac, it would be quite reasonable to
ask them not to forget that.  In reality, however, they are not.  We need
to provide a feature list item easier to use for test writers to write
tests which are expected to work well on Mac even if they are not on Mac to
write them.  The proposed patch would help those people.

The --disable-darwin configuration is highly unlikely to be used by package
managers and non-dev users, because that configuration is meant to kill the
clipboard service from the system.  So I think dropping 'osx' won't make
much trouble because those who know both --disable-darwin and has('osx')
 and understand their implications have already had a working knowledge as
to how to handle trouble caused by them.

I think for this to work, the existing names should
> be left as is and marked as deprecated, and then add new names, such as
> mac_any, mac_unix, and mac_osx with the new meanings.
>

Now we come to know adding new names does not necessarily address an issue
satisfactorily and would cause trouble later, as we've seen a case with
'osx'.  That's another reason why the patch is of 10k SLOC instead of usual
0.1k for this sort of changes.  We need to neutralize the root cause of
name proliferation, too :)


> This is just a suggestion, as it is Bram's decision.
>
> ...Marvin
>

Thanks,
Kazunobu

>
> --
> --
> 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.

Raspunde prin e-mail lui