Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the version constraint for Addressable with Ruby ~> 2.2 ? #568

Closed
PikachuEXE opened this issue Jan 5, 2016 · 17 comments
Closed

Comments

@PikachuEXE
Copy link
Contributor

I can find 2 PR:

I am using Ruby 2.2.4 (might update to 2.3.x in a month)
I just run bundle update and this gem is updated from 1.22.3 to 1.22.5
But I can see the version constraint for addressable changes from >= 2.3.6 to < 2.4.0

I am not sure if that is intended for non Ruby 1.8.x

@jasnow
Copy link

jasnow commented Jan 5, 2016

I was wondering this too.

@davidbegin
Copy link
Collaborator

It was actually supposed to remain >= 2.3.6 for anything other than 1.8.7
https://github.com/bblimke/webmock/blob/master/webmock.gemspec#L19

but I see the () are off, and I am not sure if that is affecting this. I will explore fixing this right now.

@davidbegin
Copy link
Collaborator

It looks like was incorrect parentheses, I am working on fix here: #569

I will try and get a 1.22.6 out with this fix shortly.

@davidbegin
Copy link
Collaborator

@PikachuEXE @jasnow it looks like () are a red herring, this is an issue with the generated gem. If you point to directly to the repo (which is on the same commit as 1.22.5) the dependencies should work. I am figuring out what went wrong now.

gem 'webmock', :git => "git@github.com:bblimke/webmock.git"

@matthewrudy
Copy link
Contributor

I noticed this too @PikachuEXE :)

@bblimke
Copy link
Owner

bblimke commented Jan 5, 2016

The way dependencies in the gemspec are specified, is not working. gemspec is evaluated at gem build time, converted to YAML, and then compressed as metadata.gz inside gem package.
Since the gem was build with ruby 1.8, the dependencies are for ruby 1.8.

I don't think there is a workaround.

How about we drop support for ruby 1.8?

@davidbegin
Copy link
Collaborator

I would like to drop, support for 1.8, as it is the cause of lots of extra edge cases all over the code. But I think we should bump to 2.0.0 at that time.

Thoughts?

@nerdrew
Copy link

nerdrew commented Jan 5, 2016

+1 dropping 1.8 support. Lots of jruby apps might still use 1.9 syntax.

@bblimke
Copy link
Owner

bblimke commented Jan 5, 2016

I always hoped 2.0.0 release will have much more significant changes than just dropped support for Ruby 1.8 ;) Since we drop backward compatibility, we should go with 2.0.0 according to semantic versioning though.

Let's do that! 2.0.0 and dropped Ruby 1.8 support.

We can do 1.8 branch for bug fixes in case there are still people using Ruby 1.8.

@bblimke
Copy link
Owner

bblimke commented Jan 5, 2016

and then yank 1.22.5

@davidbegin
Copy link
Collaborator

I was also hoping for a a lot more fixes before 2.0

but it always will be a lot easier to all the features in fix not supporting 1.8.7!

I will/can start working on this later today, unless anyone else wants to get it started!

@matthewrudy
Copy link
Contributor

@bblimke @davidbegin maybe we're over complicating this.

The situation is:

Why not just maintain travis running with addressable < 2.4.0 and 1.8.7.

And run other ruby versions against the latest addressable.

The outcome for anyone on 1.8.7 will be

  • rubygems will complain that it can't install addressable 2.4.0
  • you can add gem "addressable", "< 2.4.0" as a fix to the readme

Then you can have a separate timeline to introduce webmock 2.0

(this is what my earlier change did 7183303)

@davidbegin
Copy link
Collaborator

@matthewrudy I think you are the right track. I think I will do that, plus I will raise an error with a descriptive method if someone is using an Addressable version >= 2.4.0 with Ruby 1.8.7

@davidbegin
Copy link
Collaborator

I have started implementing @matthewrudy's solution here #570

I now just need to figure out the best way to restrict the Addressable version for 1.8.7 when on Travis,
as well as what is the best format for the error.

@PikachuEXE
Copy link
Contributor Author

You can use different gemfiles for different Ruby versions
See Travis Doc
If you don't want to manage different gemfiles manually you can take a look at appraisal gem

@davidbegin
Copy link
Collaborator

Thanks @PikachuEXE thats exactly what I need. I will start working on a fix.

@davidbegin
Copy link
Collaborator

Thanks for everyones help. 1.22.6 is now out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants