{"action":"created","issue":{"url":"https://api.github.com/repos/ocaml/opam/issues/3507","repository_url":"https://api.github.com/repos/ocaml/opam","labels_url":"https://api.github.com/repos/ocaml/opam/issues/3507/labels{/name}","comments_url":"https://api.github.com/repos/ocaml/opam/issues/3507/comments","events_url":"https://api.github.com/repos/ocaml/opam/issues/3507/events","html_url":"https://github.com/ocaml/opam/issues/3507","id":350030397,"node_id":"MDU6SXNzdWUzNTAwMzAzOTc=","number":3507,"title":"`opam pin add` fails but `opam pin add -n ...; opam install ...` succeeds","user":{"login":"jberdine","id":1466830,"node_id":"MDQ6VXNlcjE0NjY4MzA=","avatar_url":"https://avatars1.githubusercontent.com/u/1466830?v=4","gravatar_id":"","url":"https://api.github.com/users/jberdine","html_url":"https://github.com/jberdine","followers_url":"https://api.github.com/users/jberdine/followers","following_url":"https://api.github.com/users/jberdine/following{/other_user}","gists_url":"https://api.github.com/users/jberdine/gists{/gist_id}","starred_url":"https://api.github.com/users/jberdine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jberdine/subscriptions","organizations_url":"https://api.github.com/users/jberdine/orgs","repos_url":"https://api.github.com/users/jberdine/repos","events_url":"https://api.github.com/users/jberdine/events{/privacy}","received_events_url":"https://api.github.com/users/jberdine/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-08-13T13:30:10Z","updated_at":"2018-08-13T20:06:19Z","closed_at":"2018-08-13T20:06:19Z","author_association":"NONE","body":"Should pinning be equivalent to separately pinning and then installing?\r\n\r\nI encountered a case where pinning fails but separately pinning and then installing succeeds:\r\n```\r\n$ opam pin add --edit --dev conf-llvm\r\nconf-llvm.6.0.0] synchronised from git+https://github.com/ocaml/opam-repository.git\r\nPress enter to start \"/Users/jjb/.local/bin/emacsclient\" (this can be customised by setting EDITOR or OPAMEDITOR)...\r\nWaiting for Emacs...\r\n# I edited the version, but don't think that mattered\r\n[WARNING] The opam file didn't pass validation:\r\n  warning 47: Synopsis should start with a capital and not end with a dot\r\nProceed anyway ('no' will re-edit)? [Y/n] y\r\nYou can edit this file again with \"opam pin edit conf-llvm\", export it with \"opam show conf-llvm --raw\"\r\n[WARNING] Overlay file of conf-llvm\r\n          /Users/jjb/sat/sledge/_opam/.opam-switch/overlay/conf-llvm/files/configure.sh not found,\r\n          ignoring\r\nconf-llvm is now pinned to git+https://github.com/ocaml/opam-repository.git (version 7.0.0)\r\n\r\nThe following actions will be performed:\r\n  ∗ install conf-llvm 7.0.0*\r\nDo you want to continue? [Y/n] y\r\n\r\n<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫\r\n[ERROR] The compilation of conf-llvm failed at \"/Users/jjb/.opam/opam-init/hooks/sandbox.sh build bash\r\n        -ex configure.sh 7.0.0\".\r\n\r\n#=== ERROR while compiling conf-llvm.7.0.0 ====================================#\r\n# context     2.0.0 | macos/x86_64 |  | pinned(git+https://github.com/ocaml/opam-repository.git#5c74be12)\r\n# path        ~/sat/sledge/_opam/.opam-switch/build/conf-llvm.7.0.0\r\n# command     ~/.opam/opam-init/hooks/sandbox.sh build bash -ex configure.sh 7.0.0\r\n# exit-code   1\r\n# env-file    ~/.opam/log/conf-llvm-97144-d0f245.env\r\n# output-file ~/.opam/log/conf-llvm-97144-d0f245.out\r\n### output ###\r\n# bash: configure.sh: No such file or directory\r\n```\r\nNote that opam reports that the overlay file `configure.sh` is not found, and then compilation fails for that reason.\r\n\r\nBut pinning separately and then installing works:\r\n```\r\n$ opam pin add conf-llvm --dev-repo --edit --no-action\r\n[conf-llvm.6.0.0] no changes from git+https://github.com/ocaml/opam-repository.git\r\nPress enter to start \"/Users/jjb/.local/bin/emacsclient\" (this can be customised by setting EDITOR or OPAMEDITOR)...\r\nWaiting for Emacs...\r\n[WARNING] The opam file didn't pass validation:\r\n  warning 47: Synopsis should start with a capital and not end with a dot\r\n    error 53: Mismatching 'extra-files:' field: \"configure.sh\"\r\nProceed anyway ('no' will re-edit)? [Y/n] y\r\nYou can edit this file again with \"opam pin edit conf-llvm\", export it with \"opam show conf-llvm --raw\"\r\nconf-llvm is now pinned to git+https://github.com/ocaml/opam-repository.git (version 7.0.0)\r\n$\r\n$ opam install conf-llvm\r\n\r\n<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><>  🐫\r\n[conf-llvm.7.0.0] no changes from git+https://github.com/ocaml/opam-repository.git\r\n\r\nThe following actions will be performed:\r\n  ∗ install conf-llvm 7.0.0*\r\n\r\n<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫\r\n∗ installed conf-llvm.7.0.0\r\nDone.\r\n$\r\n```\r\nNote that there is still an error reported about `configure.sh` when pinning, but installation succeeds.\r\n\r\nIs `opam pin` handling the files in the `files` directory adjacent to the `opam` file in the package repo as expected?\r\n\r\nThis is with opam 2.0.0~rc4 (actually no, with #3499)."},"comment":{"url":"https://api.github.com/repos/ocaml/opam/issues/comments/412646000","html_url":"https://github.com/ocaml/opam/issues/3507#issuecomment-412646000","issue_url":"https://api.github.com/repos/ocaml/opam/issues/3507","id":412646000,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjY0NjAwMA==","user":{"login":"jberdine","id":1466830,"node_id":"MDQ6VXNlcjE0NjY4MzA=","avatar_url":"https://avatars1.githubusercontent.com/u/1466830?v=4","gravatar_id":"","url":"https://api.github.com/users/jberdine","html_url":"https://github.com/jberdine","followers_url":"https://api.github.com/users/jberdine/followers","following_url":"https://api.github.com/users/jberdine/following{/other_user}","gists_url":"https://api.github.com/users/jberdine/gists{/gist_id}","starred_url":"https://api.github.com/users/jberdine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jberdine/subscriptions","organizations_url":"https://api.github.com/users/jberdine/orgs","repos_url":"https://api.github.com/users/jberdine/repos","events_url":"https://api.github.com/users/jberdine/events{/privacy}","received_events_url":"https://api.github.com/users/jberdine/received_events","type":"User","site_admin":false},"created_at":"2018-08-13T20:06:19Z","updated_at":"2018-08-13T20:06:19Z","author_association":"NONE","body":"Hmm, ok, I can't repro any more either. Sorry for the noise. I'll close this and reopen if I find a repro. The only thing I can think of is if I had some remnants of a previous attempt to pin lying around my opam dirs somewhere."}}
{"actor":{"display_login":"jberdine"}}