ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:80871] [Ruby trunk Bug#13510] Problems with dependency resolution - Molinillo algo
       [not found] <redmine.issue-13510.20170426063802@ruby-lang.org>
@ 2017-04-26  6:38 ` sarangan12
  2017-04-26  8:19 ` [ruby-core:80872] [Ruby trunk Bug#13510][Third Party's Issue] " shyouhei
  2017-05-01  8:03 ` [ruby-core:80951] [Ruby trunk Bug#13510] " nobu
  2 siblings, 0 replies; 3+ messages in thread
From: sarangan12 @ 2017-04-26  6:38 UTC (permalink / raw
  To: ruby-core

Issue #13510 has been reported by sarangan12 (Sarangan Rajamanickam).

----------------------------------------
Bug #13510: Problems with dependency resolution - Molinillo algo
https://bugs.ruby-lang.org/issues/13510

* Author: sarangan12 (Sarangan Rajamanickam)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-darwin16.3.0]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
This is the gemspec defined for the azure ruby gem (https://github.com/Azure/azure-sdk-for-ruby/blob/asm/azure.gemspec#L39)

 ` if RUBY_VERSION < "2.1.0"
    s.add_runtime_dependency('nokogiri',              '~> 1.6.0')
  else
    s.add_runtime_dependency('nokogiri',              '~> 1.7')
  end`

Now, with ruby version 2.0.0, I get the following error:

ERROR:  Error installing azure:
	nokogiri requires Ruby version >= 2.1.0.

which should never happen because for ruby 2.0.0, the nokogiri version of 1.6.8.1 must be installed and not 1.7.1 (which needs Ruby version >= 2.1.0)

On debugging, I ended up with this code:  (in resolver.rb)
`
 def resolve
    locking_dg = Molinillo::DependencyGraph.new
    puts locking_dg
    Molinillo::Resolver.new(self, self).resolve(@needed.map { |d| DependencyRequest.new d, nil }, locking_dg).tsort.map(&:payload).compact
  rescue Molinillo::VersionConflict => e    
    conflict = e.conflicts.values.first
    raise Gem::DependencyResolutionError, Conflict.new(conflict.requirement_trees.first.first, conflict.existing, conflict.requirement)
  ensure
    @output.close if defined?(@output) and !debug?
  end
`

The output of this module is:
`
{
   :name=>"azure", 
   :number=>"0.7.9", 
   :platform=>"ruby",
   :dependencies=>[
       ["thor", "~> 0.19"], 
	["systemu", "~> 2.6"], 
	["nokogiri", "~> 1.7"], 
	["mime-types", "< 4.0, >= 1"], 
	["faraday_middleware", "~> 0.10"], 
	["faraday", "~> 0.9"], 
	["azure-core", "~> 0.1"], 
	["addressable", "~> 2.3"]
]
}
`

I am surprised at this return value. Why is this happening? The Molinillo algorithms reports incorrect version of nokogiri. 




-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:80872] [Ruby trunk Bug#13510][Third Party's Issue] Problems with dependency resolution - Molinillo algo
       [not found] <redmine.issue-13510.20170426063802@ruby-lang.org>
  2017-04-26  6:38 ` [ruby-core:80871] [Ruby trunk Bug#13510] Problems with dependency resolution - Molinillo algo sarangan12
@ 2017-04-26  8:19 ` shyouhei
  2017-05-01  8:03 ` [ruby-core:80951] [Ruby trunk Bug#13510] " nobu
  2 siblings, 0 replies; 3+ messages in thread
From: shyouhei @ 2017-04-26  8:19 UTC (permalink / raw
  To: ruby-core

Issue #13510 has been updated by shyouhei (Shyouhei Urabe).

Status changed from Open to Third Party's Issue

1. go to https://rubygems.org/gems/azure and click download button.
2. `tar xfp azure-0.7.9.gem`
3. look at metadata.gz

So the gem is built that way.

----------------------------------------
Bug #13510: Problems with dependency resolution - Molinillo algo
https://bugs.ruby-lang.org/issues/13510#change-64479

* Author: sarangan12 (Sarangan Rajamanickam)
* Status: Third Party's Issue
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-darwin16.3.0]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
This is the gemspec defined for the azure ruby gem (https://github.com/Azure/azure-sdk-for-ruby/blob/asm/azure.gemspec#L39)

 ` if RUBY_VERSION < "2.1.0"
    s.add_runtime_dependency('nokogiri',              '~> 1.6.0')
  else
    s.add_runtime_dependency('nokogiri',              '~> 1.7')
  end`

Now, with ruby version 2.0.0, I get the following error:

ERROR:  Error installing azure:
	nokogiri requires Ruby version >= 2.1.0.

which should never happen because for ruby 2.0.0, the nokogiri version of 1.6.8.1 must be installed and not 1.7.1 (which needs Ruby version >= 2.1.0)

On debugging, I ended up with this code:  (in resolver.rb)
`
 def resolve
    locking_dg = Molinillo::DependencyGraph.new
    puts locking_dg
    Molinillo::Resolver.new(self, self).resolve(@needed.map { |d| DependencyRequest.new d, nil }, locking_dg).tsort.map(&:payload).compact
  rescue Molinillo::VersionConflict => e    
    conflict = e.conflicts.values.first
    raise Gem::DependencyResolutionError, Conflict.new(conflict.requirement_trees.first.first, conflict.existing, conflict.requirement)
  ensure
    @output.close if defined?(@output) and !debug?
  end
`

The output of this module is:
`
{
   :name=>"azure", 
   :number=>"0.7.9", 
   :platform=>"ruby",
   :dependencies=>[
       ["thor", "~> 0.19"], 
	["systemu", "~> 2.6"], 
	["nokogiri", "~> 1.7"], 
	["mime-types", "< 4.0, >= 1"], 
	["faraday_middleware", "~> 0.10"], 
	["faraday", "~> 0.9"], 
	["azure-core", "~> 0.1"], 
	["addressable", "~> 2.3"]
]
}
`

I am surprised at this return value. Why is this happening? The Molinillo algorithms reports incorrect version of nokogiri. 




-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:80951] [Ruby trunk Bug#13510] Problems with dependency resolution - Molinillo algo
       [not found] <redmine.issue-13510.20170426063802@ruby-lang.org>
  2017-04-26  6:38 ` [ruby-core:80871] [Ruby trunk Bug#13510] Problems with dependency resolution - Molinillo algo sarangan12
  2017-04-26  8:19 ` [ruby-core:80872] [Ruby trunk Bug#13510][Third Party's Issue] " shyouhei
@ 2017-05-01  8:03 ` nobu
  2 siblings, 0 replies; 3+ messages in thread
From: nobu @ 2017-05-01  8:03 UTC (permalink / raw
  To: ruby-core

Issue #13510 has been updated by nobu (Nobuyoshi Nakada).

Description updated

The current rubygems does not provide support for multiple versions, or branches at installation time.
All dependencies are resolved at the gem building time, and gem files contain static values only.
Rubygems needs improvements.

----------------------------------------
Bug #13510: Problems with dependency resolution - Molinillo algo
https://bugs.ruby-lang.org/issues/13510#change-64617

* Author: sarangan12 (Sarangan Rajamanickam)
* Status: Third Party's Issue
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-darwin16.3.0]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
This is the gemspec defined for the azure ruby gem (https://github.com/Azure/azure-sdk-for-ruby/blob/asm/azure.gemspec#L39)

```ruby
  if RUBY_VERSION < "2.1.0"
    s.add_runtime_dependency('nokogiri',              '~> 1.6.0')
  else
    s.add_runtime_dependency('nokogiri',              '~> 1.7')
  end
```

Now, with ruby version 2.0.0, I get the following error:

```
ERROR:  Error installing azure:
	nokogiri requires Ruby version >= 2.1.0.
```

which should never happen because for ruby 2.0.0, the nokogiri version of 1.6.8.1 must be installed and not 1.7.1 (which needs Ruby version >= 2.1.0)

On debugging, I ended up with this code:  (in resolver.rb)

```ruby
 def resolve
    locking_dg = Molinillo::DependencyGraph.new
    puts locking_dg
    Molinillo::Resolver.new(self, self).resolve(@needed.map { |d| DependencyRequest.new d, nil }, locking_dg).tsort.map(&:payload).compact
  rescue Molinillo::VersionConflict => e    
    conflict = e.conflicts.values.first
    raise Gem::DependencyResolutionError, Conflict.new(conflict.requirement_trees.first.first, conflict.existing, conflict.requirement)
  ensure
    @output.close if defined?(@output) and !debug?
  end
```

The output of this module is:

```ruby
{
   :name=>"azure", 
   :number=>"0.7.9", 
   :platform=>"ruby",
   :dependencies=>[
       ["thor", "~> 0.19"], 
	["systemu", "~> 2.6"], 
	["nokogiri", "~> 1.7"], 
	["mime-types", "< 4.0, >= 1"], 
	["faraday_middleware", "~> 0.10"], 
	["faraday", "~> 0.9"], 
	["azure-core", "~> 0.1"], 
	["addressable", "~> 2.3"]
]
}
```

I am surprised at this return value. Why is this happening? The Molinillo algorithms reports incorrect version of nokogiri. 




-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-01  7:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <redmine.issue-13510.20170426063802@ruby-lang.org>
2017-04-26  6:38 ` [ruby-core:80871] [Ruby trunk Bug#13510] Problems with dependency resolution - Molinillo algo sarangan12
2017-04-26  8:19 ` [ruby-core:80872] [Ruby trunk Bug#13510][Third Party's Issue] " shyouhei
2017-05-01  8:03 ` [ruby-core:80951] [Ruby trunk Bug#13510] " nobu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).