GithubHelp home page GithubHelp logo

Comments (4)

camertron avatar camertron commented on August 15, 2024

Ugh yeah, we see these on JRuby too. I've spelunked through the code a few times looking for the bug with no success. I'm pretty sure this is related to the different YAML parsers that various versions of Ruby come with. MRI 1.8 comes with Syck, which parses UTF-8 correctly. MRI 1.9 comes with Syck, which still works, and Psych, which doesn't. MRI 2.0 comes with only Psych, which explains the errors you're seeing.

There's a syck gem available that re-introduces the YAML engine manager, but I'd rather not depend on it considering that Psych is the way forward. It looks like there are a few issues filed against Psych that might help, and it makes sense to run TwitterCLDR's YAML tests against the pre-release of MRI 2.1 to see if our particular issues have been addressed. Short of going on another deep-dive into the YAML dumper, Psych, and libyaml, that's all I can suggest :(

from twitter-cldr-rb.

jrochkind avatar jrochkind commented on August 15, 2024

Do you think it's likely safe to run the gem on ruby 2.0, ignoring those failed tests?

Am I right that the goal of your yaml fixes is just making yaml files containing unicode easier for humans to read and write? I wonder if it makes sense to just abandon this, and either get your fixes into Psych upstream, or give up on having em. But just an idea, I haven't personally encountered much of the pain your custom yaml fixes are meant to ameliorate.

from twitter-cldr-rb.

camertron avatar camertron commented on August 15, 2024

Yes, the goal of these fixes is to make yaml with unicode dump correctly so it doesn't get loaded as a jumble of unrecognizable characters (which also has the side effect of being easier to read in the yaml files themselves). Since I don't have time to look into these failures now, I'd say let's just ignore them. As I said before, unicode-safe yaml dumping is really meant to help people using MRI 1.8, and since that (still) works, I'd say let's not worry too much about the failures.

from twitter-cldr-rb.

camertron avatar camertron commented on August 15, 2024

I went ahead and "fixed" these failures (pretty hacky, but c'est la vie). Everything should be passing in the v3.0 branch.

from twitter-cldr-rb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.