Giter Club home page Giter Club logo

Comments (7)

ahx avatar ahx commented on June 26, 2024 2

@Marahin Alright. Sounds plausible.

from json_schemer.

Marahin avatar Marahin commented on June 26, 2024 1

IMHO with Ruby 3 just a few months to go, let’s nudge people towards using newer Ruby versions.

Why? Why forcing people to update their well-working scripts, gems, programs would be the way to go?
Ruby is an open-minded community, and while Ruby 3 is great, I think forcing anybody to upgrade their Ruby version solely because there's a newer one is a harmful approach.

Ruby version requirement should be dictated by the need of the language functionalities, as bundler.io suggests:

Like gems, developers can setup a dependency on Ruby. This makes your app fail faster in case you depend on specific features in a Ruby VM. (...)

So, in my understanding, unless json_schemer specifically needs features that are not present in Ruby 2.4, it shouldn't be specified as a dependency.

New applications should indeed be written in the highest Ruby versions possible, but please allow users that already have their use-cases covered to have their application still working without having to upgrade everything just so they can validate their JSON inputs.

// EDIT: added linkage and quotation to bundler.io

from json_schemer.

davishmcclurg avatar davishmcclurg commented on June 26, 2024 1

Merged 2.4 support and released in 0.2.14.

from json_schemer.

ahx avatar ahx commented on June 26, 2024

IMHO with Ruby 3 just a few months to go, let’s nudge people towards using newer Ruby versions. 🚀

from json_schemer.

davishmcclurg avatar davishmcclurg commented on June 26, 2024

we would love to use this gem to validate JSON payloads on-failure in our gem, jsonapi_parameters.

Sounds great!

and, the third scenario is: reaching out and asking whether its possible (and if not - what is the reason for this decision) to remove the constraint in json_schemer that enforces Ruby versions above 2.4.0. This is the path that we decided to choose first.

I originally enforced Ruby 2.5 because 2.4 is EOL and I'd like to use some of the features in 2.5. Would it work for you to pin your dependency on an older version of the gem? I believe 0.2.11 works on Ruby 2.4. In fact, bundler should pick up that version when running on 2.4.

from json_schemer.

Marahin avatar Marahin commented on June 26, 2024

@davishmcclurg indeed we could pin down to the version before the Ruby 2.5 dependency was introduced, but this way we are giving up on the new features, fixes and changes in your library, such as more precise errors: #1

So while this would indeed allow us to include and use json_schemer, it:

  • creates another issue (what about new features? We are locking ourselves to one specific version),
  • already by the time its introduced will be outdated

I'd like to use some of the features in 2.5

This is a super valid point, but are there any features that json_schemer is making use of right now? If yes, then this indeed discards our request and is a great argument behind setting this dependency up.

from json_schemer.

davishmcclurg avatar davishmcclurg commented on June 26, 2024

This is a super valid point, but are there any features that json_schemer is making use of right now?

I think you're right that there aren't any. I was thinking of some things I changed when I dropped 2.3.

but this way we are giving up on the new features, fixes and changes in your library, such as more precise errors: #1

That's true. I'm open to supporting 2.4 again since it shouldn't require any other changes. How long do you plan to support it? I don't have a good sense for people's expectations on these types of things.

Please open a PR with the changes, if you can.

from json_schemer.

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.