Giter VIP home page Giter VIP logo

Comments (3)

ioquatix avatar ioquatix commented on June 2, 2024

The deprecated constants aren't supposed to be loaded except via the very old files e.g. lib/parts.rb. Can you explain what you think the behaviour should be?

from multipart-post.

aaronjensen avatar aaronjensen commented on June 2, 2024

As 2.3.0 was a new minor version, I would expect it to be backwards compatible with 2.2.3. I was even prepared for the eventuality of changing those constants:

# multipart-post 3.x will likely move classes we depend on into namespaces
s.add_runtime_dependency "multipart-post", "~> 2.1"

I wasn't aware that there were alternatives available when I first added that comment/version pin (I don't think they had been published yet). I was depending on ::Multipartable, after requiring net/http/post/multipart. Once I upgraded to 2.3.0, my code could not find the ::Multipartable constant anymore, which broke it. I had to make a change to keep using the new minor version. Had it been a major version update it would have been fine.

It's typical, per semver (and I'm making an assumption here that the intent is to follow it), to not remove constants/methods/do other breaking changes that require code changes in efferents. So, that's what I would have expected--that those constants continue be defined when requiring the same file(s) they were previously defined by.

from multipart-post.

ioquatix avatar ioquatix commented on June 2, 2024

Ahh, I understand.

Yes, it was a little tricky and I didn't do it perfectly.

The original implementation had ::Parts defined in lib/parts.rb. We moved the constant into lib/multipart/post/parts.rb and also put the deprecated constant in that file. In retrospect, we should have left it in parts.rb because defining that top level constant was causing people problems.

Unfortunately, it was just the nature of the situation and a lack of experience on my part that lead to this issue. Unfortunately there is little we can do about it now, but the current release is probably about as good as we can have it.

from multipart-post.

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.