{"action":"created","issue":{"url":"https://api.github.com/repos/Valloric/ycmd/issues/240","labels_url":"https://api.github.com/repos/Valloric/ycmd/issues/240/labels{/name}","comments_url":"https://api.github.com/repos/Valloric/ycmd/issues/240/comments","events_url":"https://api.github.com/repos/Valloric/ycmd/issues/240/events","html_url":"https://github.com/Valloric/ycmd/pull/240","id":108193463,"number":240,"title":"Test on on OS X using Travis","user":{"login":"puremourning","id":10584846,"avatar_url":"https://avatars.githubusercontent.com/u/10584846?v=3","gravatar_id":"","url":"https://api.github.com/users/puremourning","html_url":"https://github.com/puremourning","followers_url":"https://api.github.com/users/puremourning/followers","following_url":"https://api.github.com/users/puremourning/following{/other_user}","gists_url":"https://api.github.com/users/puremourning/gists{/gist_id}","starred_url":"https://api.github.com/users/puremourning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puremourning/subscriptions","organizations_url":"https://api.github.com/users/puremourning/orgs","repos_url":"https://api.github.com/users/puremourning/repos","events_url":"https://api.github.com/users/puremourning/events{/privacy}","received_events_url":"https://api.github.com/users/puremourning/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-09-24T19:03:55Z","updated_at":"2015-09-25T15:08:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Valloric/ycmd/pulls/240","html_url":"https://github.com/Valloric/ycmd/pull/240","diff_url":"https://github.com/Valloric/ycmd/pull/240.diff","patch_url":"https://github.com/Valloric/ycmd/pull/240.patch"},"body":"Fixes https://github.com/Valloric/ycmd/issues/191\r\n\r\nDependency\r\n====\r\n\r\nMerging this will require @Valloric to request OS X support for ycmd repo. This requires sending a mail to support@travis-ci.com and requesting to feature-flag the repo for multiple OS support.\r\n\r\nOverview\r\n====\r\n\r\nThis involved 2 changes:\r\n - switching to the new Travis infrastructure, and\r\n - getting build scripts set up to bootstrap on OS X\r\n\r\nUnfortunately, the \"python\" Travis config is not yet supported on OS X, so we actually transition to the \"csharp\" one (because that just handles installing mono for us), and we implement the required multi-python-environment stuff manually.\r\n\r\nThis involves using a third-party repo for Linux and some cool built-in multi-lib stuff on OS X. \r\n\r\nMultiple Python Versions\r\n========\r\n\r\nWe use an environment variable YCMD_PYTHON_VERSION in the travis config to set\r\nthe major.minor python version to test with.\r\n\r\nOn linux: We use the ppa fkrull/deadsnakes\r\n(https://launchpad.net/~fkrull/+archive/ubuntu/deadsnakes) to install specific\r\nmajor.minor python version.\r\nOn OSX: Apple ships both python 2.6 and 2.7 as part of the base Yosemite OS\r\nrelease, as such we don't need to install anything. All we need to do is tell\r\nthe OS which \"default\" python version to use:\r\nhttp://stackoverflow.com/questions/6998545/how-can-i-make-python-2-6-my-default-in-mac-os-x-lion\r\n\r\nAnnoyingly, however, Apple doesn't ship libpython2.6.dylib in the same\r\ndirectory pattern as libpython2.7.dylib (it is only in /usr/lib rather than\r\nalso in /python_prefix/lib. A small change is required to build.py to support\r\nthis.\r\n\r\nTiming\r\n====\r\n\r\nWhile the new infrastructure is faster for Linux builds, sadly the OS X builds take quite a long time, as there is significantly less resource available in Travis' cloud. This makes the whole run take about 1 hour, rather than the previous 20 minutes or so.\r\n\r\nOther changes\r\n====\r\n\r\n* Fixed a bug where we were using `check_output` on python 2.6. Simply use a backport of it.\r\n* `ordereddict` is not installed by default on python 2.6, so we add it to `test_requirements.txt`\n\n<!-- Reviewable:start -->\n[<img src=\"https://reviewable.io/review_button.png\" height=40 alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/valloric/ycmd/240)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/Valloric/ycmd/issues/comments/143247932","html_url":"https://github.com/Valloric/ycmd/pull/240#issuecomment-143247932","issue_url":"https://api.github.com/repos/Valloric/ycmd/issues/240","id":143247932,"user":{"login":"micbou","id":10026824,"avatar_url":"https://avatars.githubusercontent.com/u/10026824?v=3","gravatar_id":"","url":"https://api.github.com/users/micbou","html_url":"https://github.com/micbou","followers_url":"https://api.github.com/users/micbou/followers","following_url":"https://api.github.com/users/micbou/following{/other_user}","gists_url":"https://api.github.com/users/micbou/gists{/gist_id}","starred_url":"https://api.github.com/users/micbou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micbou/subscriptions","organizations_url":"https://api.github.com/users/micbou/orgs","repos_url":"https://api.github.com/users/micbou/repos","events_url":"https://api.github.com/users/micbou/events{/privacy}","received_events_url":"https://api.github.com/users/micbou/received_events","type":"User","site_admin":false},"created_at":"2015-09-25T15:08:51Z","updated_at":"2015-09-25T15:08:51Z","body":"> Any particular reason? I use a lot of scripting languages and I find that the addition of { and } around variables in certain scenarios is useful for showing the boundaries without worrying about particular subleties of the language at hand, such as when used as part of a path\n\n> XYZ=/blah/${blah}/:${PATH}:/blah/blah${TEST}\n\n> I'm happy to make any changes, just want to understand the rationale, in case I am missing some subtlety.\n\nForget what I said. Without curly braces in paths, the syntax coloration will be messed up in some cases.\nFor consistency, we should maybe always use curly braces even if not in a path. For example, curly braces are used here:\n```\ndefaults write com.apple.versioner.python Version ${YCMD_PYTHON_VERSION}\n```\nbut not here:\n```\npython_version=$(python -c 'import sys; print \"{0}.{1}\".format( sys.version_info[0], sys.version_info[1] )')\necho \"Checking python version (actual $python_version vs expected $YCMD_PYTHON_VERSION)\"\ntest $python_version == $YCMD_PYTHON_VERSION\n```\n> I thought I had. I will check. There are occasions where I have started with phases like\n\n>   virtualenv does not....\n\n> The lower-case v there is intentional, as I'm referring to the virtualenv command.\n\nI looked again and only found one missing capital letter that I highlighted.  I thought there were more.\n\n\n\n>>    on Linux, when YCMD_PYTHON_VERSION=2.6, PythonLibs is python 2.7. This was already the case before.\n\n> Quite, and I think this might be some sort of bug.\n\n>> on OS X, when YCMD_PYTHON_VERSION=2.7, PythonInterp is not the python from virtualenv and python 2.6 is used\n\n> I realised this, but I suspect that is the broken cmake talking. The tests themselves, I believe, do indeed run with the correct interpreter. That's why I put the check in travis_install.sh.\n\nI am wondering if the ycmd libraries are linked to the correct python version.\n\n---\n\nReview status: 4 of 6 files reviewed at latest revision, 14 unresolved discussions, some commit checks failed.\n\n---\n\n<sup>**[.travis.yml, line 24 \\[r4\\]](https://reviewable.io:443/reviews/valloric/ycmd/240#-K-3Uc0LDbX9od3iGjQp)** ([raw file](https://github.com/valloric/ycmd/blob/d626da27dc3303c48c23734efb2b8658cf9f6635/.travis.yml#L24)):</sup>\nYou can safely remove the quotation marks.\n\n---\n\n<sup>**[build.py, line 87 \\[r1\\]](https://reviewable.io:443/reviews/valloric/ycmd/240#-K-0v_vdq0wrmm4uIud-)** ([raw file](https://github.com/valloric/ycmd/blob/88d80eb1195fc2cadbe45f8af1a4bf9b2eb84c95/build.py#L87)):</sup>\nSorry, I meant single quotes. I mixed up the terms. This is only for consistency. Single quotes was used in the rest of the file.\n\n---\n\n<sup>**[build.py, line 97 \\[r1\\]](https://reviewable.io:443/reviews/valloric/ycmd/240#-K-0vlcg1uH-SeAaU3ke)** ([raw file](https://github.com/valloric/ycmd/blob/88d80eb1195fc2cadbe45f8af1a4bf9b2eb84c95/build.py#L97)):</sup>\nSingle quotes, not commas.\n\n---\n\n<sup>**[build.py, line 106 \\[r1\\]](https://reviewable.io:443/reviews/valloric/ycmd/240#-K-0vnnpUMlckHoVe01s)** ([raw file](https://github.com/valloric/ycmd/blob/88d80eb1195fc2cadbe45f8af1a4bf9b2eb84c95/build.py#L106)):</sup>\nSingle quotes, not commas.\n\n---\n\n<sup>**[build.py, line 127 \\[r1\\]](https://reviewable.io:443/reviews/valloric/ycmd/240#-K-0wKxbV1PhdAwlA9zA)** ([raw file](https://github.com/valloric/ycmd/blob/88d80eb1195fc2cadbe45f8af1a4bf9b2eb84c95/build.py#L127)):</sup>\nSingle quotes, not commas.\n\n---\n\n<sup>**[travis_install.osx.sh, line 3 \\[r4\\]](https://reviewable.io:443/reviews/valloric/ycmd/240#-K-3zJAlvxNqP4uey6gI)** ([raw file](https://github.com/valloric/ycmd/blob/d626da27dc3303c48c23734efb2b8658cf9f6635/travis_install.osx.sh#L3)):</sup>\nMissing capital letter to run.\n\n---\n\n\nComments from the [review on Reviewable.io](https://reviewable.io:443/reviews/valloric/ycmd/240)\n<!-- Sent from Reviewable.io -->\n"}}