Skip to content

Error executing elm-install from elm_install gem #4732

@RobertFischer

Description

@RobertFischer

Referenced here: https://github.com/gdotdesign/elm-github-install/issues/32

Environment

  • jruby-9.1.12.0 installed via rbenv
  • Linux megapadd 4.4.0-87-generic #110-Ubuntu SMP Tue Jul 18 12:55:35 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
  • Installed elm-install 1.1.1.
  • Minimal elm-package.json:
$ cat elm-package.json 
{
    "version": "1.0.0",
    "summary": "helpful summary of your project, less than 80 characters",
    "repository": "https://github.com/user/project.git",
    "license": "BSD3",
    "source-directories": [
        "."
    ],
    "exposed-modules": [],
    "dependencies": {
        "elm-lang/core": "5.1.1 <= v < 6.0.0"
    },
    "elm-version": "0.18.0 <= v < 0.19.0"
}

Expected Behavior

  • In the directory with elm-package.json, you should be able to run elm-install and it should install cleanly.

Actual Behavior

  • Getting an warning about a deprecated constants.
  • Getting an error about constraint types being wrong.
$ elm-install 
/home/robert/.rbenv/versions/jruby-9.1.12.0/lib/ruby/gems/shared/gems/commander-4.4.3/lib/commander/user_interaction.rb:334: warning: constant ::JavaPackageModuleTemplate is deprecated
error: Contract violation for return value:
        Expected: [Solve::Constraint],
        Actual: [#<Solve::Constraint < 6.0.0>, #<Solve::Constraint >= 5.1.1>]
        Value guarded in: ElmInstall::Utils::transform_constraint
        With Contract: String => Array
        At: /home/robert/.rbenv/versions/jruby-9.1.12.0/lib/ruby/gems/shared/gems/elm_install-1.1.1/lib/elm_install/utils.rb:23 . Use --trace to view backtrace
  • Here is the same error but with the trace:
/home/robert/.rbenv/versions/jruby-9.1.12.0/lib/ruby/gems/shared/gems/commander-4.4.3/lib/commander/user_interaction.rb:334: warning: constant ::JavaPackageModuleTemplate is deprecated
ReturnContractError: Contract violation for return value:
        Expected: [Solve::Constraint],
        Actual: [#<Solve::Constraint < 6.0.0>, #<Solve::Constraint >= 5.1.1>]
        Value guarded in: ElmInstall::Utils::transform_constraint
        With Contract: String => Array
        At: /home/robert/.rbenv/versions/jruby-9.1.12.0/lib/ruby/gems/shared/gems/elm_install-1.1.1/lib/elm_install/utils.rb:23 
              block in Contract at /home/robert/.rbenv/versions/jruby-9.1.12.0/lib/ruby/gems/shared/gems/contracts-0.16.0/lib/contracts.rb:46
               failure_callback at /home/robert/.rbenv/versions/jruby-9.1.12.0/lib/ruby/gems/shared/gems/contracts-0.16.0/lib/contracts.rb:155
                      call_with at /home/robert/.rbenv/versions/jruby-9.1.12.0/lib/ruby/gems/shared/gems/contracts-0.16.0/lib/contracts/call_with.rb:86
  block in transform_constraint at /home/robert/.rbenv/versions/jruby-9.1.12.0/lib/ruby/gems/shared/gems/contracts-0.16.0/lib/contracts/method_handler.rb:138
              block in identify at /home/robert/.rbenv/versions/jruby-9.1.12.0/lib/ruby/gems/shared/gems/elm_install-1.1.1/lib/elm_install/identifier.rb:61
                           each at org/jruby/RubyHash.java:1343
                            map at org/jruby/RubyEnumerable.java:830
                       identify at /home/robert/.rbenv/versions/jruby-9.1.12.0/lib/ruby/gems/shared/gems/elm_install-1.1.1/lib/elm_install/identifier.rb:60
                        send_to at /home/robert/.rbenv/versions/jruby-9.1.12.0/lib/ruby/gems/shared/gems/contracts-0.16.0/lib/contracts/method_reference.rb:43
                      call_with at /home/robert/.rbenv/versions/jruby-9.1.12.0/lib/ruby/gems/shared/gems/contracts-0.16.0/lib/contracts/call_with.rb:79
              block in identify at /home/robert/.rbenv/versions/jruby-9.1.12.0/lib/ruby/gems/shared/gems/contracts-0.16.0/lib/contracts/method_handler.rb:138
                     initialize at /home/robert/.rbenv/versions/jruby-9.1.12.0/lib/ruby/gems/shared/gems/elm_install-1.1.1/lib/elm_install/identifier.rb:20
                        send_to at /home/robert/.rbenv/versions/jruby-9.1.12.0/lib/ruby/gems/shared/gems/contracts-0.16.0/lib/contracts/method_reference.rb:43
                      call_with at /home/robert/.rbenv/versions/jruby-9.1.12.0/lib/ruby/gems/shared/gems/contracts-0.16.0/lib/contracts/call_with.rb:79
            block in initialize at /home/robert/.rbenv/versions/jruby-9.1.12.0/lib/ruby/gems/shared/gems/contracts-0.16.0/lib/contracts/method_handler.rb:138
                     initialize at /home/robert/.rbenv/versions/jruby-9.1.12.0/lib/ruby/gems/shared/gems/elm_install-1.1.1/lib/elm_install/installer.rb:12
                        send_to at /home/robert/.rbenv/versions/jruby-9.1.12.0/lib/ruby/gems/shared/gems/contracts-0.16.0/lib/contracts/method_reference.rb:43
                      call_with at /home/robert/.rbenv/versions/jruby-9.1.12.0/lib/ruby/gems/shared/gems/contracts-0.16.0/lib/contracts/call_with.rb:79
            block in initialize at /home/robert/.rbenv/versions/jruby-9.1.12.0/lib/ruby/gems/shared/gems/contracts-0.16.0/lib/contracts/method_handler.rb:138
                        install at /home/robert/.rbenv/versions/jruby-9.1.12.0/lib/ruby/gems/shared/gems/elm_install-1.1.1/lib/elm_install.rb:40
                block in (root) at /home/robert/.rbenv/versions/jruby-9.1.12.0/lib/ruby/gems/shared/gems/elm_install-1.1.1/bin/elm-install:21
                           call at /home/robert/.rbenv/versions/jruby-9.1.12.0/lib/ruby/gems/shared/gems/commander-4.4.3/lib/commander/command.rb:178
                            run at /home/robert/.rbenv/versions/jruby-9.1.12.0/lib/ruby/gems/shared/gems/commander-4.4.3/lib/commander/command.rb:153
             run_active_command at /home/robert/.rbenv/versions/jruby-9.1.12.0/lib/ruby/gems/shared/gems/commander-4.4.3/lib/commander/runner.rb:446
                           run! at /home/robert/.rbenv/versions/jruby-9.1.12.0/lib/ruby/gems/shared/gems/commander-4.4.3/lib/commander/runner.rb:68
                           run! at /home/robert/.rbenv/versions/jruby-9.1.12.0/lib/ruby/gems/shared/gems/commander-4.4.3/lib/commander/delegates.rb:15
                block in (root) at /home/robert/.rbenv/versions/jruby-9.1.12.0/lib/ruby/gems/shared/gems/commander-4.4.3/lib/commander/import.rb:5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions