Re: Normalizing EOModel plists and avoiding CVS merge conflicts

From: Mike Schrag (mschra..dimension.com)
Date: Mon Jul 17 2006 - 15:08:21 EDT

  • Next message: Ken Anderson: "Re: Normalizing EOModel plists and avoiding CVS merge conflicts"

    Ohh you're advocating the inverse of what we do now ... Currently
    PropertyListSerializer does the EOKVCArchiver-style. The problem is
    that only sometimes (I think) would you want your dictionaries/lists
    on a single line in EOModel plist files, and I don't really have
    visibility into the serializer (without adding a visitor-style
    interface that gets passed in) to tell the serializer when I want a
    newline and when I don't. But maybe there are some simple heuristics
    that we can implement that tend to always make it about right.

    I think there is less of a chance of needing to read eomodel files
    outside of EOModeler, though (as compared with D2W rules). At least
    I have only found a couple of occasions. In those cases, I prefer
    having them on separate lines, I think. Open for discussion on this
    one, though.

    ms

    On Jul 17, 2006, at 2:53 PM, Anjo Krank wrote:

    > I mean:
    >
    > {"rules" = (
    > {"class" = "com.webobjects.directtoweb.Rule"; "rhs" = {"class" =
    > "com.webobjects.directtoweb.Assignment"; "keyPath" = "sortKey";
    > "value" = ""; }; "author" = "0"; },
    > {"class" = "com.webobjects.directtoweb.Rule"; "rhs" = {"class" =
    > "com.webobjects.directtoweb.Assignment"; "keyPath" = "maxColumns";
    > "value" = "2"; }; "author" = "0"; },
    >
    > instead of the verbose EOKVCArchiver format.
    >
    > {
    > "class" = "com.webobjects.directtoweb.Rule";
    > "rhs" = {
    > "class" = "com.webobjects.directtoweb.Assignment";
    > "keyPath" = "sortKey";
    > "value" = "";
    > };
    > "author" = "0";
    > },
    >
    > Granted, with the rules itīs simple because they are just one big
    > array of stuff, so i just donīt emit \n after the second level.
    >
    > Cheers, Anjo
    >
    > Am 17.07.2006 um 20:41 schrieb Mike Schrag:
    >
    >> You're referring to how plist serialization in WO will sometimes
    >> do ( value1, value2, value3 ) instead of:
    >> (
    >> value1,
    >> value2,
    >> value3
    >> )
    >> , right? It looks like PropertyListSerialization in Cayenne always
    >> does individual lines, so we get that for free ...
    >>
    >> ms
    >>
    >> On Jul 17, 2006, at 2:34 PM, Anjo Krank wrote:
    >>
    >>>
    >>> Am 17.07.2006 um 19:20 schrieb Chuck Hill:
    >>>
    >>>>>> I just had a vision: an EOModeler that writes plists in a
    >>>>>> deterministic fashion. Wow. Now THAT would be cool! :-P
    >>>>>
    >>>>> Imagine!? I just switched back to CVS so I'm looking forward to
    >>>>> testing this.
    >>>>
    >>>> Ugh. This must be my most hated bug in EOModeler.
    >>>
    >>> The new RuleModeler in ProjectWonder saves all D2W rules (sorted
    >>> by prio) each on its own line. A similar approach would be useful
    >>> for EOM, wouldn't it?
    >>>
    >>> Cheers, Anjo
    >>
    >



    This archive was generated by hypermail 2.0.0 : Mon Jul 17 2006 - 15:08:26 EDT