gem install archive-tar-minitar is failing from version 0.6

Austin Ziegler's Avatar

Austin Ziegler

07 Feb, 2017 10:05 PM

I recently published updates to archive-tar-minitar such that it now depends on minitar and minitar-cli. I did the following:

  1. gem push minitar/pkg/minitar-0.6.gem
  2. gem push minitar/pkg/archive-tar-minitar-0.6.gem
  3. gem push minitar/pkg/minitar-cli-0.6.gem

Now, when I (or anyone else) installs archive-tar-minitar, the following is the result:

Fetching: minitar-0.6.gem (100%)
The `minitar` executable is no longer bundled with `minitar`. If you are
expecting this executable, make sure you also install `minitar-cli`.
Successfully installed minitar-0.6
ERROR:  Error installing archive-tar-minitar:
    archive-tar-minitar requires minitar-cli (~> 0.6)

I suspect that because I pushed archive-tar-minitar before minitar-cli, whatever indexing mechanism exists on RubyGems is failing (when minitar-cli is installed manually, the dependency is satisfied). I have a theory that this can be solved by pushing archive-tar-minitar 0.6.0.1 (that’s the same except for the version number). I don’t want to do that unless it actually works, or if there’s something the RG team can do to fix this.

  1. 1 Posted by Jordan Sissel on 07 Feb, 2017 11:35 PM

    Jordan Sissel's Avatar

    Here's something interesting. The rubygems.org dependencies API doesn't have the correct details:

    % ruby -ropen-uri -e 'deps = Marshal.load(open("https://rubygems.org/api/v1/dependencies?gems=archive-tar-minitar").read); p deps.select { |d| d[:number] == "0.6" }.first[:dependencies]'
    [["minitar", "~> 0.6"]]
    

    ^^ Only minitar listed in the API. But if I fetch the gem and look inside, it correctly includes 'mintar-cli'

    % gem fetch archive-tar-minitar
    ....
    % tar -xf archive-tar-minitar-0.6.gem -O metadata.gz | gzip -dc | sed -ne '/^dependencies/,/^description/p'
    dependencies:
    - !ruby/object:Gem::Dependency
      name: minitar
      requirement: !ruby/object:Gem::Requirement
        requirements:
        - - "~>"
          - !ruby/object:Gem::Version
            version: '0.6'
      type: :runtime
      prerelease: false
      version_requirements: !ruby/object:Gem::Requirement
        requirements:
        - - "~>"
          - !ruby/object:Gem::Version
            version: '0.6'
    - !ruby/object:Gem::Dependency
      name: minitar-cli
      requirement: !ruby/object:Gem::Requirement
        requirements:
        - - "~>"
          - !ruby/object:Gem::Version
            version: '0.6'
      type: :runtime
      prerelease: false
      version_requirements: !ruby/object:Gem::Requirement
        requirements:
        - - "~>"
          - !ruby/object:Gem::Version
            version: '0.6'
    description: |-
    
  2. 2 Posted by Austin Ziegler on 08 Feb, 2017 12:56 AM

    Austin Ziegler's Avatar

    This is fixed for archive-tar-minitar 0.6.1 because a matching minitar-cli was previously released.

  3. Support Staff 3 Posted by Aditya Prakash on 26 Feb, 2017 06:31 AM

    Aditya Prakash's Avatar

    Hi,

    Only minitar listed in the API. But if I fetch the gem and look inside, it correctly includes 'mintar-cli'

    I can see both minitar-cli and minitar listed as dependencies of archive-tar-minitar 0.6 https://rubygems.org/api/v1/dependencies.json?gems=archive-tar-minitar.
    I was also able to successfully install archive-tar-minitar -v 0.6. Looks like issue was resolved. I am sorry we couldn't help sooner.

  4. Aditya Prakash closed this discussion on 26 Feb, 2017 06:31 AM.

  5. Austin Ziegler re-opened this discussion on 27 Feb, 2017 05:20 PM

  6. 4 Posted by Austin Ziegler on 27 Feb, 2017 05:20 PM

    Austin Ziegler's Avatar

    Yes. What happened here is the way that I published this, and it won’t
    happen again because now everything is published properly:

    1. archive-tar-minitar depends on minitar and minitar-cli.
    2. minitar-cli depends on minitar.
    3. I published minitar (0.6).
    4. I published archive-tar-minitar (0.6).
    5. I published minitar-cli (0.6).

    Because minitar-cli was not available at the time of #4, the publication
    occurred, but the JSON data no longer included the minitar-cli dependency,
    even though it’s in the gem.

    I had to track down some issues, so I needed to release 0.6.1:

    6. I published minitar (0.6.1).
    7. I published archive-tar-minitar (0.6.1).
    8. I published minitar-cli (0.6.1).

    At the time that #7 happened, minitar-cli (0.6) was available and the
    dependency was satisfiable, so the JSON includes the minitar-cli dependency
    correctly.

    Ideally, the RubyGems API should have refused to publish
    archive-tar-minitar 0.6 without an explicit override because of the missing
    dependency. Or, the dependency would have been kept in the JSON even though
    it was missing from the RubyGems index (I’m less certain about this one,
    because it would break other things too, I suspect).

    This was purely about publication order, because minitar and
    archive-tar-minitar are in the same repo, but minitar-cli is in a different
    repo.

    -a

  7. Aditya Prakash closed this discussion on 22 Mar, 2017 03:44 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

29 Mar, 2017 09:30 PM
29 Mar, 2017 09:27 PM
29 Mar, 2017 03:24 PM
29 Mar, 2017 03:10 PM
29 Mar, 2017 03:04 PM