https://bugzilla.wikimedia.org/show_bug.cgi?id=28591

             Bug #: 28591
           Summary: Update/replace/supplement spyc (YAML parsing library)
           Product: MediaWiki
           Version: 1.17
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Low
         Component: API
        AssignedTo: roan.katt...@gmail.com
        ReportedBy: s...@reedyboy.net
                CC: bryan.tongm...@gmail.com, s...@reedyboy.net,
                    soxre...@gmail.com, tstarl...@wikimedia.org,
                    vasi...@gmail.com
    Classification: Unclassified


We've got another bug about API YAML output being wrong (bug 28586), so this is
sort of a dupe, but with more detail/scope than bug 22292

Looking at r42547 where Tim stripped most of the "scary" stuff out, which
Niklas brought back into Translates spyc in r53613 (which looks to be gone in
trunk translate now)

Looking at trunk spyc [1] it seems not to include that stuff (which is good).
It however only lists itself as YAML 1.0 compliant [2].

Looking around, there seems to be only a few PHP YAML libraries, spyc being one
of the PHP coded ones, and the other being Symfonys YAML library [3].

Looking at PECL and such type libraries, we do have syck [4], which Niklas has
seemingly labelled as "// Just horrible output" in Translate, and also a
version usable via Perl (I don't think such specific external
dependancies/shelling out is the best way for something like this).

Finally there seems to be php-yaml [5], "The Yaml PHP Extension provides a
wrapper to the LibYAML library"

Looking at the YAML site [6] it only lists those 3, with various levels of
specification implementation, not seemingly implementing the current 1.2 spec.
A stackoverflow post [7] seems to concur, suggesting Symfony has partial 1.2
spec implementation.

It seems the options are:
* Keeping the ancient currently used 0.2.3 (Hmmm), with our custom hacks...
* Upgrade it to 0.4.5svn (which seemingly doesn't have the scary code), and
port our hacks/updates/changes (if needed(?)). SVN diffing this might be hard,
so may need to ask Tim/Roan or both to review the newer one and see if there is
anything that is god awfully bad
* Move to the symfony YAML parser (seemingly well maintained), but no idea
about the dependancy tree. A few files is ok, but if we've got to import most
of Symfony, it's a non starter. Looks to be a max of 4 files (not had a chance
to look at it in detail), possibly with less needed if we're not reading in
YAML etc
* Do a combination of above, and maybe add support for a "best case", "next
best case", "resultant fallback" approach like we do elsewhere, adding support
for some of the PECL libraries. Possibly do this like Translate does, have a
variable to use to set this, to what you want, rather than the fallback type we
have elsewhere



[1] http://code.google.com/p/spyc/source/browse/trunk/spyc.php
[2] http://code.google.com/p/spyc/
[3] http://components.symfony-project.org/yaml/installation
[4] http://pecl.php.net/package/syck
[5] http://code.google.com/p/php-yaml/
[6] http://www.yaml.org/
[7] http://stackoverflow.com/questions/294355/php-yaml-parsers

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to