Skip to content

Handle or ignore dependencies using commit hash instead of version number #5

Description

@BartoszCichecki

Due to legacy reasons, some of our dependencies target specific commit hash instead of version number:

      {
        "package": "OHHTTPStubs",
        "repositoryURL": "https://github.com/AliSoftware/OHHTTPStubs",
        "state": {
          "branch": "9.1.0",
          "revision": "12f19662426d0434d6c330c6974d53e2eb10ecd9",
          "version": null
        }
      },

This results in an error like this being thrown:

/Users/vagrant/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0/gems/semantic-1.6.1/lib/semantic/version.rb:15:in `initialize': 12f19662426d0434d6c330c6974d53e2eb10ecd9 is not a valid SemVer Version (http://semver.org/) (ArgumentError)
      raise ArgumentError.new("#{version_str} is not a valid SemVer Version (http://semver.org/)") if v.nil?
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	from /Users/vagrant/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0/gems/danger-spm_version_updates-0.2.0/lib/spm_version_updates/plugin.rb:110:in `new'
	from /Users/vagrant/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0/gems/danger-spm_version_updates-0.2.0/lib/spm_version_updates/plugin.rb:110:in `warn_for_new_versions'
	from /Users/vagrant/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0/gems/danger-spm_version_updates-0.2.0/lib/spm_version_updates/plugin.rb:70:in `block in check_for_updates'
	from /Users/vagrant/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0/gems/danger-spm_version_updates-0.2.0/lib/spm_version_updates/plugin.rb:45:in `each'
	from /Users/vagrant/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0/gems/danger-spm_version_updates-0.2.0/lib/spm_version_updates/plugin.rb:45:in `check_for_updates'
	from Dangerfile:54:in `eval_file'

Not sure what is the best approach to this, maybe ignore these?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions