{"action":"created","issue":{"url":"https://api.github.com/repos/LLNL/spack/issues/2664","repository_url":"https://api.github.com/repos/LLNL/spack","labels_url":"https://api.github.com/repos/LLNL/spack/issues/2664/labels{/name}","comments_url":"https://api.github.com/repos/LLNL/spack/issues/2664/comments","events_url":"https://api.github.com/repos/LLNL/spack/issues/2664/events","html_url":"https://github.com/LLNL/spack/pull/2664","id":197096096,"number":2664,"title":"`spack setup`: Fix Bugs + Multi-setup","user":{"login":"citibeth","id":1924215,"avatar_url":"https://avatars.githubusercontent.com/u/1924215?v=3","gravatar_id":"","url":"https://api.github.com/users/citibeth","html_url":"https://github.com/citibeth","followers_url":"https://api.github.com/users/citibeth/followers","following_url":"https://api.github.com/users/citibeth/following{/other_user}","gists_url":"https://api.github.com/users/citibeth/gists{/gist_id}","starred_url":"https://api.github.com/users/citibeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citibeth/subscriptions","organizations_url":"https://api.github.com/users/citibeth/orgs","repos_url":"https://api.github.com/users/citibeth/repos","events_url":"https://api.github.com/users/citibeth/events{/privacy}","received_events_url":"https://api.github.com/users/citibeth/received_events","type":"User","site_admin":false},"labels":[{"id":73908754,"url":"https://api.github.com/repos/LLNL/spack/labels/bug","name":"bug","color":"fc2929","default":true},{"id":446623646,"url":"https://api.github.com/repos/LLNL/spack/labels/concretization","name":"concretization","color":"006b75","default":false},{"id":73908756,"url":"https://api.github.com/repos/LLNL/spack/labels/feature","name":"feature","color":"84b6eb","default":false},{"id":446626162,"url":"https://api.github.com/repos/LLNL/spack/labels/hashes","name":"hashes","color":"9a69b7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":18,"created_at":"2016-12-22T05:12:27Z","updated_at":"2017-02-07T22:14:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/LLNL/spack/pulls/2664","html_url":"https://github.com/LLNL/spack/pull/2664","diff_url":"https://github.com/LLNL/spack/pull/2664.diff","patch_url":"https://github.com/LLNL/spack/pull/2664.patch"},"body":"This PR addresses a serious case of \"bitrot\" in `spack setup`: changes accumulated in `cmd/install.py` and ended up breaking `cmd/setup.py`.  `spack setup` was simply unusable.  The main thrust of this PR is to make `spack setup` work again.\r\n\r\nBenefits\r\n---------\r\n\r\n1. So far, this PR seems to fix #2657 and #2662, and possibly other related issues of unstable hashes in the past.\r\n2. More consistent UI\r\n3. Addresses #2661 (duplicate of #2149).\r\n4. Should not change behavior outside of `spack setup`.\r\n5. Faster: avoid concretizing twice.\r\n\r\nChanges\r\n----------\r\n\r\n1. Previously, `spack setup` called `spack install` twice, by passing it command line arguments.  `spack install` in turn calls `Package.do_install()`.  Now, `spack setup` and `spack install` both call `Package.do_install()` directly.\r\n\r\n2. Previously, a call to `spack setup` would concretize three times.  By not calling `spack install`, `spack setup` now ony concretizes once.  This is not just for efficiency, but also correctness.  **I suspect that concretizing is not idempotent; and that concretizing three times was a root cause of the bugs.  This could have something to do with the way concretization results are memoized.**\r\n\r\n3. Relevant parts of `spack install` were factored out into subroutines so that `spack setup` can make use of them.\r\n\r\n4. `spack setup` and `spack install` now take the same command line arguments.  All arguments were determined to make sense for `spack setup`.\r\n\r\n5. A new '-I' option was added that prints out the fully concretized spec before installing.  If users want a more customized printout, they should use `spack spec`.\r\n\r\n6. A context manager is now used to set up / tear down logging.  This ensures that the logging tear-down will always be done, even in the face of a `sys.exit(1)` or `tty.die()`.\r\n\r\nTo Do\r\n------\r\n\r\n- [ ] Like `spack setup`, `spack diy` also derives from `spack install`.  It should also be refactored to match `spack setup` and `spack install`.\r\n- [ ] @alalazo You re-did this code most recently; can you please verify that this PR does not change the behavior of `spack install`?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/LLNL/spack/issues/comments/278159215","html_url":"https://github.com/LLNL/spack/pull/2664#issuecomment-278159215","issue_url":"https://api.github.com/repos/LLNL/spack/issues/2664","id":278159215,"user":{"login":"krafczyk","id":6449564,"avatar_url":"https://avatars.githubusercontent.com/u/6449564?v=3","gravatar_id":"","url":"https://api.github.com/users/krafczyk","html_url":"https://github.com/krafczyk","followers_url":"https://api.github.com/users/krafczyk/followers","following_url":"https://api.github.com/users/krafczyk/following{/other_user}","gists_url":"https://api.github.com/users/krafczyk/gists{/gist_id}","starred_url":"https://api.github.com/users/krafczyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krafczyk/subscriptions","organizations_url":"https://api.github.com/users/krafczyk/orgs","repos_url":"https://api.github.com/users/krafczyk/repos","events_url":"https://api.github.com/users/krafczyk/events{/privacy}","received_events_url":"https://api.github.com/users/krafczyk/received_events","type":"User","site_admin":false},"created_at":"2017-02-07T22:14:02Z","updated_at":"2017-02-07T22:14:02Z","body":"@citibeth I've gone and added my -j and -d arguments to diy and moved -j to the common arguments. I'd like to see those changes merged. @tgamblin, do you think your requested regression tests can be moved to a separate PR and have this PR merged once the conflicts have been resolved?"}}
{"actor":{"display_login":"krafczyk"}}