GithubHelp home page GithubHelp logo

Comments (6)

mperham avatar mperham commented on June 10, 2024 1

I think explicitly locking versions with a comment is superior to using Bundler in a non-default mode. The KISS principle. 99% of Ruby developers, including myself, have no idea what the side effects of that switch are.

from net-imap.

mperham avatar mperham commented on June 10, 2024

The issue here is that mail 2.8 now requires net-imap and almost every Ruby app that sends email via SMTP is now pulling in net-imap even though most of them do not use or need IMAP. Anyone wanting a pure Ruby environment will need to lock to mail 2.7.1.

I really wish Rubygems had optional dependencies so I could disable this type of unnecessary dependency.

from net-imap.

nevans avatar nevans commented on June 10, 2024

@mperham instead of locking to mail 2.7.1, you could lock the date gem to

Gem::Specification.find{_1.name == "date" && _1.default_gem?}.version

You could even add that to the Gemfile (although you would still need a different lockfile for each version of ruby). Or you could add bundle add date --version $(ruby -e 'Gem::Specification.find...') to your deploy scripts?

Or you could lock net-imap to 0.3.1. If you don't even care about net-imap, then that might be the quickest, simplest answer!

Obviously, manually managing gem versions like this is a pain.

from net-imap.

nevans avatar nevans commented on June 10, 2024

@mperham, I was about to start a discussion over at https://github.com/rubygems/rubygems, but then I wondered if the feature I wanted wasn't already supported. So I read through the bundler docs and found an existing option which might work for you, bundle install --prefer-local:

       --prefer-local
              Force  using  locally installed gems, or gems already present in
              Rubygems´ cache or in  vendor/cache,  when  resolving,  even  if
              newer  versions  are available remotely. Only attempt to connect
              to rubygems.org for gems that are not present locally.

It's not exactly what I was looking for, but it might be a better solution than the others I suggested?

In addition to your "optional dependencies" suggestion, I have a few other ideas for potential bundler features that maybe would help. i.e. bundle cache --include-platform-extensions or bundle install --prefer-system or bundle add --source system. But I'll save any deeper discussion of bundler feature requests for the rubygems repository. 😉

from net-imap.

nevans avatar nevans commented on June 10, 2024

I think explicitly locking versions with a comment is superior to using Bundler in a non-default mode. The KISS principle. 99% of Ruby developers, including myself, have no idea what the side effects of that switch are.

I know what I want and expect the effects to be, but I've never actually used it so that also puts me in the 99% who have no idea! 😉

from net-imap.

hsbt avatar hsbt commented on June 10, 2024

I wonder if ruby/date would consider a PR for publishing pre-compiled native gems?

I can release it. But pre-compiled gems need many of maintenance resources. I'm negative to do it.

Or we could drop the explicit dependency. ☹️

It's the short-term solution. Because date gem(= library on ruby/ruby repository) has no maintainer now. So, I will extract date from ruby/ruby repository. After that, net-imap will break the missing dependency of date library.

We don't have to extract embedded Time library to default or bundled gem. Can we rewrite lib/net/imap/data_encoding.rb with Time class?

from net-imap.

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.