From 94a81144af43f96540087525c042656fc13115be Mon Sep 17 00:00:00 2001 From: Ben Jackson Date: Sun, 2 Oct 2016 18:36:11 +0100 Subject: [PATCH 1/2] Update ycmd. Update docs for GetTypeImprecise and GetDocImprecise --- README.md | 26 ++++++++++++++++++++++++++ doc/youcompleteme.txt | 34 ++++++++++++++++++++++++++++++++-- third_party/ycmd | 2 +- 3 files changed, 59 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ece1df7c..903d497e 100644 --- a/README.md +++ b/README.md @@ -1307,6 +1307,19 @@ NOTE: Causes re-parsing of the current translation unit. Supported in filetypes: `c, cpp, objc, objcpp, javascript, typescript` +#### The `GetTypeImprecise` subcommand + +WARNING: This command trades correctness for speed! + +Same as the `GetType` command except that it doesn't recompile the file with +libclang before looking up nodes in the AST. This can be very useful when you're +editing files that take long to compile but you know that you haven't made any +changes since the last parse that would lead to incorrect type. When you're +just browsing around your codebase, this command can spare you quite a bit of +latency. + +Supported in filetypes: `c, cpp, objc, objcpp` + #### The `GetParent` subcommand Echos the semantic parent of the point under the cursor. @@ -1351,6 +1364,19 @@ under the cursor. Depending on the file type, this includes things like: Supported in filetypes: `c, cpp, objc, objcpp, cs, python, typescript, javascript` +#### The `GetDocImprecise` subcommand + +WARNING: This command trades correctness for speed! + +Same as the `GetDoc` command except that it doesn't recompile the file with +libclang before looking up nodes in the AST. This can be very useful when you're +editing files that take long to compile but you know that you haven't made any +changes since the last parse that would lead to incorrect docs. When you're +just browsing around your codebase, this command can spare you quite a bit of +latency. + +Supported in filetypes: `c, cpp, objc, objcpp` + ### Refactoring and FixIt Commands These commands make changes to your source code in order to perform refactoring diff --git a/doc/youcompleteme.txt b/doc/youcompleteme.txt index b3522a9d..c2c930b5 100644 --- a/doc/youcompleteme.txt +++ b/doc/youcompleteme.txt @@ -59,8 +59,10 @@ Contents ~ 8. The |GoToImplementationElseDeclaration| subcommand 2. Semantic Information Commands |youcompleteme-semantic-information-commands| 1. The |GetType| subcommand - 2. The |GetParent| subcommand - 3. The |GetDoc| subcommand + 2. The |GetTypeImprecise| subcommand + 3. The |GetParent| subcommand + 4. The |GetDoc| subcommand + 5. The |GetDocImprecise| subcommand 3. Refactoring and FixIt Commands |youcompleteme-refactoring-fixit-commands| 1. The |FixIt| subcommand 2. The 'RefactorRename ' subcommand |RefactorRename-new-name| @@ -1580,6 +1582,20 @@ NOTE: Causes re-parsing of the current translation unit. Supported in filetypes: 'c, cpp, objc, objcpp, javascript, typescript' +------------------------------------------------------------------------------- +The *GetTypeImprecise* subcommand + +WARNING: This command trades correctness for speed! + +Same as the |GetType| command except that it doesn't recompile the file with +libclang before looking up nodes in the AST. This can be very useful when +you're editing files that take long to compile but you know that you haven't +made any changes since the last parse that would lead to incorrect type. When +you're just browsing around your codebase, this command can spare you quite a +bit of latency. + +Supported in filetypes: 'c, cpp, objc, objcpp' + ------------------------------------------------------------------------------- The *GetParent* subcommand @@ -1624,6 +1640,20 @@ under the cursor. Depending on the file type, this includes things like: Supported in filetypes: 'c, cpp, objc, objcpp, cs, python, typescript, javascript' +------------------------------------------------------------------------------- +The *GetDocImprecise* subcommand + +WARNING: This command trades correctness for speed! + +Same as the |GetDoc| command except that it doesn't recompile the file with +libclang before looking up nodes in the AST. This can be very useful when +you're editing files that take long to compile but you know that you haven't +made any changes since the last parse that would lead to incorrect docs. When +you're just browsing around your codebase, this command can spare you quite a +bit of latency. + +Supported in filetypes: 'c, cpp, objc, objcpp' + ------------------------------------------------------------------------------- *youcompleteme-refactoring-fixit-commands* Refactoring and FixIt Commands ~ diff --git a/third_party/ycmd b/third_party/ycmd index b540c06a..36350644 160000 --- a/third_party/ycmd +++ b/third_party/ycmd @@ -1 +1 @@ -Subproject commit b540c06ab5bfb6f50a528948fa93b465929c372f +Subproject commit 363506449fe18337b6aabbf29d8a14720483ccf6 From 1e8be57708006b88d389e0cf8d887974dfb75992 Mon Sep 17 00:00:00 2001 From: Ben Jackson Date: Sun, 2 Oct 2016 19:24:45 +0100 Subject: [PATCH 2/2] Use g++ 4.8 on YouCompleteMe builds too as the new boost requires this --- .travis.yml | 4 ++++ ci/travis/travis_install.linux.sh | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/.travis.yml b/.travis.yml index 0f6ae99b..2f2a86c5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,9 @@ install: script: - ci/travis/travis_script.sh env: + global: + # Travis can run out of RAM, so we need to be careful here. + - YCM_CORES=3 matrix: - YCM_PYTHON_VERSION=2.7 YCM_FLAKE8=true # Since 3.0.4, Flake8 is not working anymore on Python 2.6. @@ -30,6 +33,7 @@ addons: packages: - cmake-data - cmake + - g++-4.8 - ninja-build # Everything below is a Python build dep (though it depends on Python # version). We need them because pyenv builds Python. diff --git a/ci/travis/travis_install.linux.sh b/ci/travis/travis_install.linux.sh index 52d400e4..b09d1ab1 100644 --- a/ci/travis/travis_install.linux.sh +++ b/ci/travis/travis_install.linux.sh @@ -1,5 +1,15 @@ # Linux-specific installation +# We can't use sudo, so we have to approximate the behaviour of setting the +# default system compiler. + +mkdir ${HOME}/bin + +ln -s /usr/bin/g++-4.8 ${HOME}/bin/c++ +ln -s /usr/bin/gcc-4.8 ${HOME}/bin/cc + +export PATH=${HOME}/bin:${PATH} + # In order to work with ycmd, python *must* be built as a shared library. This # is set via the PYTHON_CONFIGURE_OPTS option. export PYTHON_CONFIGURE_OPTS="--enable-shared"