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

Remove self-dependency on stomp #133

Closed
wants to merge 1 commit into from
Closed

Conversation

dLobatog
Copy link

Currently installing 1.4.2 through 'gem install stomp' or 'bundle install' breaks.
The reason is just that stomp relies on itself on the gemspec, the error
we get is:

Your bundle requires gems that depend on each other, creating an
infinite loop. Please remove gem 'stomp' and try again.

This change simply removes that dependency that I believe should not be
there, and also removes the double dev dependency on rspec. Rake is
already required in the gemspec so I removed it from the Gemfile.

Notice the current double 'rspec' requirement and the self-requirement of 'stomp' produce warning/errors already:

WARNING:  open-ended dependency on stomp (>= 0) is not recommended
  if stomp is semantically versioned, use:
    add_runtime_dependency 'stomp', '~> 0'
WARNING:  open-ended dependency on rspec (>= 2.14.1, development) is not recommended
  if rspec is semantically versioned, use:
    add_development_dependency 'rspec', '~> 2.14', '>= 2.14.1'
WARNING:  See http://guides.rubygems.org/specification-reference/ for help
ERROR:  While executing gem ... (Gem::InvalidSpecificationException)
    duplicate dependency on rspec (>= 2.14.1, development), (>= 2.14.1) use:
    add_runtime_dependency 'rspec', '>= 2.14.1', '>= 2.14.1'`

Currently installing 1.4.2 through 'gem install stomp' or 'bundle install' breaks.
The reason is just that stomp relies on itself on the gemspec, the error
we get is:

"Your bundle requires gems that depend on each other, creating an
infinite loop. Please remove gem 'stomp' and try again."

This change simply removes that dependency that I believe should not be
there, and also removes the double dev dependency on rspec. Rake is
already required in the gemspec so I removed it from the Gemfile
@daniel-rikowski
Copy link

Thank you for this PR:

ERROR:  While executing gem ... (Gem::Resolver::Molinillo::CircularDependencyError)
    There is a circular dependency between stomp and stomp

At least locking stomp to the previous versions (gem 'stomp', '1.4.1') allows bundle to succeed.

@dLobatog
Copy link
Author

Yeah, a new patch version even just with these changes would be nice I think, as otherwise anything that has an unpinned dependency in stomp will not load

@gmallard
Copy link

Did you hand edit the gemspec file ??

Regardless, there is a problem.

However your PR as it is does not seem to address the entire issue:

$ ruby -v
ruby 2.3.2p113 (2016-04-26 revision 54786) [x86_64-linux]

$ git log -1 --pretty=oneline
8bf8a46459fcf23d4fe815748c6ab61130b96009 Remove self-dependency on stomp

$ rake build
WARN: Unresolved specs during Gem::Specification.reset:
      nokogiri (>= 1.5.10)
      rack (< 3, >= 1.2)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
WARNING:  See http://guides.rubygems.org/specification-reference/ for help
rake aborted!
Gem::InvalidSpecificationException: duplicate dependency on rspec (>= 2.14.1, development), (>= 2.14.1) use:
    add_development_dependency 'rspec', '>= 2.14.1', '>= 2.14.1'

Tasks: TOP => build
(See full trace by running task with --trace)

$ rake install
WARN: Unresolved specs during Gem::Specification.reset:
      nokogiri (>= 1.5.10)
      rack (< 3, >= 1.2)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
WARNING:  See http://guides.rubygems.org/specification-reference/ for help
rake aborted!
Gem::InvalidSpecificationException: duplicate dependency on rspec (>= 2.14.1, development), (>= 2.14.1) use:
    add_development_dependency 'rspec', '>= 2.14.1', '>= 2.14.1'

Tasks: TOP => install => build
(See full trace by running task with --trace)

Using 'rake build' actually works on ruby 1.8.7 (2014-01-28 patchlevel 376), rake, version 0.9.2.2. Which is how 1.4.2 made it out the door in the first place. I will add 'rake install' to release procedures to make sure this does not happen again.

In the mean time, I am looking at what it will take to completely fix this. And ask that you do the same.

@gmallard
Copy link

The gem has traditionally used jeweler to generate the gemspec. That goes back to ..... around the time of my first commit, although I did not add jeweler to the mix. See 8ffa341 for when jeweler was added. Gemspec generation is accomplished by:

rake gemspec:generate

This install failure is apparently triggered by both:

  • Using jeweler to generate the gemspec and
  • The presence of the Gemfile

If both of those conditions are present, it causes the insertion of dependencies into the gemspec file. A number of those dependencies seem nonsensical to me. e.g.:

s.add_dependency(%q<stomp>, [">= 0"])

Additionally spurious (duplicate) dependencies are also added to the gemspec:

    s.add_dependency(%q<rspec>, [">= 2.14.1"])
    s.add_dependency(%q<rspec>, [">= 2.14.1"])

I am thinking the use of jeweler needs to be reevaluated. The jeweler gem is in somewhat of a state of flux. See:

for some of that discussion.

However, I am not going to do that immediately. I want to examine alternatives more closely in a more leisurely fashion.

A quick (and perhaps somewhat ugly) way of fixing the current install problems is:

  • remove the Gemfile totally

If that is done, the gemspec is generated properly, and the failure to install disappears completely.

In order to get an installable version out on the street now, I am likely to go with that approach and examine alternatives in a less stressful way. The Gemfile was very recently added, and removal should not cause too much pain I hope.

I do appreciate your efforts on this issue, thank you. I will let this PR dangle for a while. However, as far as I can see the PR is not a total solution to install failures.

gmallard added a commit to gmallard/stomp that referenced this pull request Aug 21, 2016
- stompgem#133
- stompgem#134

for discussion and thoughts about this.
@gmallard
Copy link

Try an install of 1.4.3, which is on rubygems.

@dLobatog
Copy link
Author

Thanks @gmallard , the current gemspec is looking good again. I'm not very interested on jeweler, though, I prefer to do gemspecs by hand, so if you don't mind I'll close this one out

@dLobatog dLobatog closed this Aug 22, 2016
@gmallard
Copy link

In the meantime I have tracked down why the jeweler and Gemfile mix was causing the install failure.

I will do some more testing, but will likely add the Gemfile back again in the future if that testing goes well.

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

Successfully merging this pull request may close these issues.

3 participants