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

esy install failure: Unable to solve when package is listed as dependency of itself. #721

Open
ManasJayanth opened this issue Dec 8, 2018 · 4 comments
Labels

Comments

@ManasJayanth
Copy link
Member

esy version: 0.4.3 and @esy-nightly/esy@0.4.4-20f0b3

Operating System: Windows

Issue:
Esy install fails

Package.json

{
  "name": "pesy",
  "version": "0.0.0",
  "description": "My Project",
  "esy": {
    "build": [
      "refmterr dune build -p #{self.name}",
      "mkdir -p #{self.root / '_build' / 'default' / 'share' / 'template-repo'}",
      "mkdir -p #{self.install / 'share' / 'template-repo'}",
      "cp #{self.root / 'pesy-package.template.json'} #{self.install / 'share' / 'template-repo' / 'pesy-package.template.json'}",
      "cp #{self.root / 'pesy-package.template.json'} #{self.root / '_build' / 'default' / 'share' / 'template-repo' / 'pesy-package.template.json'}",
      "cp #{self.root / 'pesy-App.template.re'} #{ self.root / '_build' / 'default' / 'share' /  'template-repo' / 'pesy-App.template.re' }",
      "cp #{self.root / 'pesy-App.template.re'} #{ self.install / 'share' /  'template-repo' / 'pesy-App.template.re' }",
      "cp #{self.root / 'pesy-Test.template.re'} #{ self.install / 'share' /  'template-repo' / 'pesy-Test.template.re' }",
      "cp #{self.root / 'pesy-Test.template.re'} #{ self.root / '_build' / 'default' / 'share' /  'template-repo' / 'pesy-Test.template.re' }",
      "cp #{self.root / 'pesy-Util.template.re'} #{ self.install / 'share' /  'template-repo' / 'pesy-Util.template.re' }",
      "cp #{self.root / 'pesy-Util.template.re'} #{ self.root / '_build' / 'default' / 'share' /  'template-repo' / 'pesy-Util.template.re' }",
      "cp #{self.root / 'pesy-README.template.md'} #{ self.install / 'share' /  'template-repo' / 'pesy-README.template.md' }",
      "cp #{self.root / 'pesy-README.template.md'} #{ self.root / '_build' / 'default' / 'share' / 'template-repo' / 'pesy-README.template.md' }",
      "cp #{self.root / 'pesy-gitignore.template'} #{ self.install / 'share' /  'template-repo' / 'pesy-gitignore.template' }",
      "cp #{self.root / 'pesy-gitignore.template'} #{ self.root / '_build' / 'default' / 'share' /  'template-repo' / 'pesy-gitignore.template' }"
    ],
    "buildsInSource": "_build",
    "release": { "releasedBinaries": [ "Pesy.exe" ] }
  },
  "buildDirs": {
    "test": {
      "require": [ "pesy.lib" ],
      "main": "TestPesy",
      "name": "TestPesy.exe"
    },
    "library": { "name": "pesy.lib", "namespace": "Pesy" },
    "executable": {
      "require": [ "pesy.lib" ],
      "main": "Pesy",
      "name": "Pesy.exe"
    }
  },
  "dependencies": {
    "@esy-ocaml/reason": "*",
    "@opam/dune": "*",
    "@opam/lambda-term": "1.13",
    "@opam/lwt": "4.1.0",
    "@opam/lwt_ppx": "1.2.1",
    "@opam/ppx_inline_test": "v0.11.0",
    "@opam/sexplib": "v0.11.0",
    "@opam/yojson": "1.4.1",
    "ocaml": "~4.6.0",
    "pesy": "*",
    "refmterr": "*"
  },
  "devDependencies": { "@esy-ocaml/merlin": "*" }
}

Actual behavior:
esy i fails. Logs here

Expected behavior:
esy i installs all packages like esy@0.3.4 does

Additional steps to reproduce:
Running esy install on the repo here

@andreypopp
Copy link
Member

Likely #706, can you try removing ~/.esy/opam-repository?

@andreypopp andreypopp added the bug label Dec 8, 2018
@ManasJayanth
Copy link
Member Author

@andreypopp That didn't help. rm -rf ~/.esy didn't help either.

On MacOS, the following is seen,

info install 0.4.3                                                         
info checking https://github.com/ocaml/opam-repository for updates...                                                                                                                                      
info checking https://github.com/ocaml/opam-repository for updates...
info checking https://github.com/esy-ocaml/esy-opam-override for updates...
.... resolving esy packages @esy-ocaml/substserror: command failed: 'git' 'clone' '--branch' 'master' '--depth' '1' 'https://github.com/ocaml/opam-repository' '/Users/manas/.esy/opam-repository'
stderr:                                            
         Cloning into '/Users/manas/.esy/opam-repository'...
         error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
         fatal: the remote end hung up unexpectedly
         fatal: early EOF
         fatal: index-pack failed
                                    
stdout:                         
                                       
  resolving @opam/yojson@=opam:1.4.1 
esy: exiting due to errors above                     
.... resolving esy packages @opam/base%

@andreypopp
Copy link
Member

The error is different now though. Does the following command works for you:

'git' 'clone' '--branch' 'master' '--depth' '1' 'https://github.com/ocaml/opam-repository'

We need to make sure we retry multiple times and fail with a good error message.

@ManasJayanth
Copy link
Member Author

Yes, I'm able to clone the opam repo on my mac (where the error was seen)

@ManasJayanth ManasJayanth changed the title esy install failure: Unable to solve esy install failure: Unable to solve when package is listed as dependency of itself. Dec 9, 2018
ManasJayanth added a commit to ManasJayanth/pesy that referenced this issue Dec 9, 2018
Remove pesy as a dep of itself since build conf gen is supported
natively
ManasJayanth added a commit to ManasJayanth/pesy that referenced this issue Jan 11, 2019
Remove pesy as a dep of itself since build conf gen is supported
natively
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants