{"action":"created","issue":{"url":"https://api.github.com/repos/LLNL/spack/issues/1975","repository_url":"https://api.github.com/repos/LLNL/spack","labels_url":"https://api.github.com/repos/LLNL/spack/issues/1975/labels{/name}","comments_url":"https://api.github.com/repos/LLNL/spack/issues/1975/comments","events_url":"https://api.github.com/repos/LLNL/spack/issues/1975/events","html_url":"https://github.com/LLNL/spack/issues/1975","id":181822843,"number":1975,"title":"How to handle versions like develop and master","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":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":50,"created_at":"2016-10-08T12:13:52Z","updated_at":"2016-10-10T16:35:16Z","closed_at":null,"body":"@davydden @tgamblin \r\nThis Issue is related to: #1924 #1940 #1561 \r\n\r\nCurrently, the `@develop` version is special, in that it is larger than all numeric versions, whereas all other non-numeric versions are smaller.  Although this does serve a purpose, it feels like a special-case \"hack\" where a more general (and transparent) approach could serve us better.  This is a proposal for comparing versions that is more general.\r\n\r\nA version consists of a series of strings separated by dots.  For example: '1', '1.2', 'master', '1.2.develop', etc.  Versions are compared by:\r\n\r\n1. Split on the dots.  Eg: '1.2.develop' --> ('1', '2', 'develop')\r\n2. Compare the tuples element-by-element using the following rules:\r\n   a) An element is numeric if it consists of all 0-9 digits (plus other stuff, like 2a).\r\n   b) Any element starting '<' is always less than 0; any element starting with '>' is greater than 9.\r\n   c) All other elements will be sorted in alphabetical order, and placed less than elements starting with '<'\r\n\r\nIn practice, two things would need to change from current use:\r\n\r\n1. Replace '@develop' with '@>develop'\r\n2. Use quotes when specifying these versions in the bash shell.  (Unless we think of different symbols to use for < and >.  The symbols can be more than one character if we like.  Maybe '~' and '+' since those are already used elsewhere in Spack).\r\n\r\nThoughts?\r\n\r\n[This proposal has been updated slightly from original]"},"comment":{"url":"https://api.github.com/repos/LLNL/spack/issues/comments/252673339","html_url":"https://github.com/LLNL/spack/issues/1975#issuecomment-252673339","issue_url":"https://api.github.com/repos/LLNL/spack/issues/1975","id":252673339,"user":{"login":"alalazo","id":4199709,"avatar_url":"https://avatars.githubusercontent.com/u/4199709?v=3","gravatar_id":"","url":"https://api.github.com/users/alalazo","html_url":"https://github.com/alalazo","followers_url":"https://api.github.com/users/alalazo/followers","following_url":"https://api.github.com/users/alalazo/following{/other_user}","gists_url":"https://api.github.com/users/alalazo/gists{/gist_id}","starred_url":"https://api.github.com/users/alalazo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alalazo/subscriptions","organizations_url":"https://api.github.com/users/alalazo/orgs","repos_url":"https://api.github.com/users/alalazo/repos","events_url":"https://api.github.com/users/alalazo/events{/privacy}","received_events_url":"https://api.github.com/users/alalazo/received_events","type":"User","site_admin":false},"created_at":"2016-10-10T16:35:15Z","updated_at":"2016-10-10T16:35:15Z","body":"@adamjstewart Before I propose something, I would like to understand what is that we want to achieve and why :smile:\r\n\r\nIs it re-usable classes to handle versions wherever they appear ? If so, what are the expected benefit ? Or we want to model \"common\" names in repository branches ? \r\n\r\nAnother thing is not clear to me. Suppose we could write something like : \r\n```\r\nversion('master', git='https://github.com/LLNL/Caliper.git')\r\n```\r\nwhat is that you expect from an installation of it ? Personally I would expect `master` to be a moving version so that if I say : \r\n```\r\nspack install foo@master\r\n# time passes\r\nspack install foo@master\r\n# previous installation gets updated\r\n```\r\n*If* we agree on this behavior how do we want to tie it to the version ? "}}
{"actor":{"display_login":"alalazo"}}