Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ccls for openSUSE:Factory checked in 
at 2021-05-06 22:52:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ccls (Old)
 and      /work/SRC/openSUSE:Factory/.ccls.new.2988 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ccls"

Thu May  6 22:52:44 2021 rev:14 rq:890897 version:0.20210330

Changes:
--------
--- /work/SRC/openSUSE:Factory/ccls/ccls.changes        2020-11-03 
15:16:57.320062542 +0100
+++ /work/SRC/openSUSE:Factory/.ccls.new.2988/ccls.changes      2021-05-06 
22:53:19.730575900 +0200
@@ -1,0 +2,19 @@
+Mon May  3 18:10:23 UTC 2021 - Ferdinand Thiessen <[email protected]>
+
+- Update to version 0.20210330
+  * Fix short_name_size when getNameAsString does not return
+    a prefix
+- Update to version 0.20201219
+  * Supports Clang 7~11
+  * Support 3.15.0 serverInfo
+  * Report index status via $/progress
+  * Better recursive .ccls files
+  * New initialization option completion.placeholder:
+    change client.snippetSupport: false to drop ( and <
+  * Infer -target and --driver-mode from argv[0]
+  * indexer: log the number of errors and the first diagnostic
+  * indexer: set the kind of static data members to Field
+    instead of Var
+- Fixed gcc dependency for upcoming Leap 15.3
+
+-------------------------------------------------------------------

Old:
----
  ccls-0.20201025.tar.gz

New:
----
  ccls-0.20210330.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ccls.spec ++++++
--- /var/tmp/diff_new_pack.fo4bFw/_old  2021-05-06 22:53:20.178574052 +0200
+++ /var/tmp/diff_new_pack.fo4bFw/_new  2021-05-06 22:53:20.182574036 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ccls
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           ccls
-Version:        0.20201025
+Version:        0.20210330
 Release:        0
 Summary:        C/C++/ObjC language server
 # main package is Apache 2.0
@@ -38,8 +38,8 @@
 # ccls hardcodes the paths to clang's resource dir and we thus must ensure that
 # it is always shipped with the same clang version that was used to build it
 %{requires_eq clang}
-# gcc > 7.0 is called gcc7- in Leap 15.2
-%if 0%{?sle_version} == 150200
+# gcc > 7.0 is called gcc7- in Leap 15.2 and 15.3
+%if 0%{?sle_version} >= 150200
 BuildRequires:  gcc7-c++ >= 7.2
 %else
 BuildRequires:  gcc-c++ >= 7.2
@@ -67,15 +67,12 @@
 rm -rf third_party/rapidjson
 
 %build
-pushd .
 %cmake -DUSE_SYSTEM_RAPIDJSON=ON -DCLANG_LINK_CLANG_DYLIB=on
-
 # ccls currently consumes ~1GB of memory during compilation per thread
-%make_build
-popd
+%cmake_build
 
 %install
-%make_install -C build
+%cmake_install
 
 %files
 %{_bindir}/%{name}

++++++ _constraints ++++++
--- /var/tmp/diff_new_pack.fo4bFw/_old  2021-05-06 22:53:20.198573970 +0200
+++ /var/tmp/diff_new_pack.fo4bFw/_new  2021-05-06 22:53:20.198573970 +0200
@@ -2,7 +2,7 @@
 <constraints>
   <hardware>
     <memoryperjob>
-      <size unit="M">500</size>
+      <size unit="M">1000</size>
     </memoryperjob>
   </hardware>
 </constraints>

++++++ ccls-0.20201025.tar.gz -> ccls-0.20210330.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ccls-0.20201025/CMakeLists.txt 
new/ccls-0.20210330/CMakeLists.txt
--- old/ccls-0.20201025/CMakeLists.txt  2020-10-25 22:16:53.000000000 +0100
+++ new/ccls-0.20210330/CMakeLists.txt  2021-03-31 08:33:43.000000000 +0200
@@ -45,6 +45,7 @@
     /wd4800
     /wd4068 # Disable unknown pragma warning
     /std:c++17
+    /Zc:__cplusplus
     $<$<CONFIG:Debug>:/FS>
   )
   # relink system libs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ccls-0.20201025/src/clang_tu.cc 
new/ccls-0.20210330/src/clang_tu.cc
--- old/ccls-0.20201025/src/clang_tu.cc 2020-10-25 22:16:53.000000000 +0100
+++ new/ccls-0.20210330/src/clang_tu.cc 2021-03-31 08:33:43.000000000 +0200
@@ -17,18 +17,22 @@
 #include <llvm/Support/Path.h>
 
 using namespace clang;
-using namespace llvm;
 
 namespace ccls {
 std::string pathFromFileEntry(const FileEntry &file) {
-  // If getName() refers to a file within a workspace folder, we prefer it
-  // (which may be a symlink).
-  std::string ret = normalizePath(file.getName());
+  std::string ret;
+  if (file.getName().startswith("/../")) {
+    // Resolve symlinks outside of working folders. This handles leading path
+    // components, e.g. (/lib -> /usr/lib) in
+    // /../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/utility
+    ret = file.tryGetRealPathName();
+  } else {
+    // If getName() refers to a file within a workspace folder, we prefer it
+    // (which may be a symlink).
+    ret = normalizePath(file.getName());
+  }
   if (normalizeFolder(ret))
     return ret;
-  // Resolve symlinks outside of working folders. This handles leading path
-  // components, e.g. (/lib -> /usr/lib) in
-  // /../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/utility
   ret = realPath(ret);
   normalizeFolder(ret);
   return ret;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ccls-0.20201025/src/indexer.cc 
new/ccls-0.20210330/src/indexer.cc
--- old/ccls-0.20201025/src/indexer.cc  2020-10-25 22:16:53.000000000 +0100
+++ new/ccls-0.20210330/src/indexer.cc  2021-03-31 08:33:43.000000000 +0200
@@ -534,15 +534,18 @@
       // e.g. operator type-parameter-1
       i = 0;
       def.short_name_offset = 0;
-    } else if (short_name.empty() || (i >= 2 && name[i - 2] == ':')) {
-      // Don't replace name with qualified name in ns::name Cls::*name
-      def.short_name_offset = i;
+      def.short_name_size = name.size();
     } else {
-      name.replace(i, short_name.size(), qualified);
-      def.short_name_offset = i + qualified.size() - short_name.size();
+      if (short_name.empty() || (i >= 2 && name[i - 2] == ':')) {
+        // Don't replace name with qualified name in ns::name Cls::*name
+        def.short_name_offset = i;
+      } else {
+        name.replace(i, short_name.size(), qualified);
+        def.short_name_offset = i + qualified.size() - short_name.size();
+      }
+      // name may be empty while short_name is not.
+      def.short_name_size = name.empty() ? 0 : short_name.size();
     }
-    // name may be empty while short_name is not.
-    def.short_name_size = name.empty() ? 0 : short_name.size();
     for (int paren = 0; i; i--) {
       // Skip parentheses in "(anon struct)::name"
       if (name[i - 1] == ')')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ccls-0.20201025/src/lsp.hh 
new/ccls-0.20210330/src/lsp.hh
--- old/ccls-0.20201025/src/lsp.hh      2020-10-25 22:16:53.000000000 +0100
+++ new/ccls-0.20210330/src/lsp.hh      2021-03-31 08:33:43.000000000 +0200
@@ -223,7 +223,7 @@
   const char *kind;
   std::optional<std::string> title;
   std::optional<std::string> message;
-  std::optional<double> percentage;
+  std::optional<int> percentage;
 };
 struct WorkDoneProgressParam {
   const char *token;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ccls-0.20201025/src/messages/textDocument_completion.cc 
new/ccls-0.20210330/src/messages/textDocument_completion.cc
--- old/ccls-0.20201025/src/messages/textDocument_completion.cc 2020-10-25 
22:16:53.000000000 +0100
+++ new/ccls-0.20210330/src/messages/textDocument_completion.cc 2021-03-31 
08:33:43.000000000 +0200
@@ -537,9 +537,8 @@
   }
 
   std::string filter;
-  Position end_pos;
-  Position begin_pos =
-      wf->getCompletionPosition(param.position, &filter, &end_pos);
+  Position end_pos = param.position;
+  Position begin_pos = wf->getCompletionPosition(param.position, &filter);
 
 #if LLVM_VERSION_MAJOR < 8
   ParseIncludeLineResult preprocess = ParseIncludeLine(buffer_line);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ccls-0.20201025/src/messages/textDocument_signatureHelp.cc 
new/ccls-0.20210330/src/messages/textDocument_signatureHelp.cc
--- old/ccls-0.20201025/src/messages/textDocument_signatureHelp.cc      
2020-10-25 22:16:53.000000000 +0100
+++ new/ccls-0.20210330/src/messages/textDocument_signatureHelp.cc      
2021-03-31 08:33:43.000000000 +0200
@@ -156,8 +156,7 @@
     buffer_line = wf->buffer_lines[param.position.line];
   {
     std::string filter;
-    Position end_pos;
-    begin_pos = wf->getCompletionPosition(param.position, &filter, &end_pos);
+    begin_pos = wf->getCompletionPosition(param.position, &filter);
   }
 
   SemaManager::OnComplete callback =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ccls-0.20201025/src/pipeline.cc 
new/ccls-0.20210330/src/pipeline.cc
--- old/ccls-0.20201025/src/pipeline.cc 2020-10-25 22:16:53.000000000 +0100
+++ new/ccls-0.20210330/src/pipeline.cc 2021-03-31 08:33:43.000000000 +0200
@@ -729,7 +729,7 @@
             (Twine(completed - last_idle) + "/" + Twine(enqueued - last_idle))
                 .str();
         param.value.percentage =
-            100.0 * (completed - last_idle) / (enqueued - last_idle);
+            100 * (completed - last_idle) / (enqueued - last_idle);
         notify("$/progress", param);
       } else if (in_progress) {
         stats.last_idle.store(enqueued, std::memory_order_relaxed);
@@ -739,6 +739,7 @@
         notify("$/progress", param);
         in_progress = false;
       }
+      last_completed = completed;
     }
 
     if (did_work) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ccls-0.20201025/src/project.cc 
new/ccls-0.20210330/src/project.cc
--- old/ccls-0.20201025/src/project.cc  2020-10-25 22:16:53.000000000 +0100
+++ new/ccls-0.20210330/src/project.cc  2021-03-31 08:33:43.000000000 +0200
@@ -252,7 +252,7 @@
 
   auto getDotCcls = [&root, &folder](std::string cur) {
     while (!(cur = sys::path::parent_path(cur)).empty()) {
-      auto it = folder.dot_ccls.find(cur);
+      auto it = folder.dot_ccls.find(cur + '/');
       if (it != folder.dot_ccls.end())
         return it->second;
       std::string normalized = normalizePath(cur);
@@ -425,14 +425,13 @@
   } else {
     LOG_S(INFO) << "loaded " << path.c_str();
     for (tooling::CompileCommand &cmd : cdb->getAllCompileCommands()) {
-      static bool once;
       Project::Entry entry;
       entry.root = root;
       doPathMapping(entry.root);
 
       // If workspace folder is real/ but entries use symlink/, convert to
       // real/.
-      entry.directory = realPath(cmd.Directory);
+      entry.directory = realPath(resolveIfRelative(root, cmd.Directory));
       entry.directory.push_back('/');
       normalizeFolder(entry.directory);
       entry.directory.pop_back();
@@ -450,18 +449,7 @@
           entry.args.push_back(intern(args[i]));
       }
       entry.compdb_size = entry.args.size();
-
-      // Work around relative --sysroot= as it isn't affected by
-      // -working-directory=. chdir is thread hostile but this function runs
-      // before indexers do actual work and it works when there is only one
-      // workspace folder.
-      if (!once) {
-        once = true;
-        llvm::vfs::getRealFileSystem()->setCurrentWorkingDirectory(
-            entry.directory);
-      }
       proc.getSearchDirs(entry);
-
       if (seen.insert(entry.filename).second)
         folder.entries.push_back(entry);
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ccls-0.20201025/src/sema_manager.cc 
new/ccls-0.20210330/src/sema_manager.cc
--- old/ccls-0.20201025/src/sema_manager.cc     2020-10-25 22:16:53.000000000 
+0100
+++ new/ccls-0.20210330/src/sema_manager.cc     2021-03-31 08:33:43.000000000 
+0200
@@ -350,10 +350,19 @@
   std::string content = session.wfiles->getContent(task.path);
   std::unique_ptr<llvm::MemoryBuffer> buf =
       llvm::MemoryBuffer::getMemBuffer(content);
+#if LLVM_VERSION_MAJOR >= 12
+  // llvmorg-12-init-11522-g4c55c3b66de
+  auto bounds = ComputePreambleBounds(*ci.getLangOpts(), *buf, 0);
+  // llvmorg-12-init-17739-gf4d02fbe418d
+  if (!task.from_diag && oldP &&
+      oldP->preamble.CanReuse(ci, *buf, bounds, *fs))
+    return;
+#else
   auto bounds = ComputePreambleBounds(*ci.getLangOpts(), buf.get(), 0);
   if (!task.from_diag && oldP &&
       oldP->preamble.CanReuse(ci, buf.get(), bounds, fs.get()))
     return;
+#endif
   // -Werror makes warnings issued as errors, which stops parsing
   // prematurely because of -ferror-limit=. This also works around the issue
   // of -Werror + -Wunused-parameter in interaction with SkipFunctionBodies.
@@ -472,8 +481,13 @@
     DiagnosticConsumer dc;
     std::string content = manager->wfiles->getContent(task->path);
     auto buf = llvm::MemoryBuffer::getMemBuffer(content);
+#if LLVM_VERSION_MAJOR >= 12 // llvmorg-12-init-11522-g4c55c3b66de
+    PreambleBounds bounds =
+        ComputePreambleBounds(*ci->getLangOpts(), *buf, 0);
+#else
     PreambleBounds bounds =
         ComputePreambleBounds(*ci->getLangOpts(), buf.get(), 0);
+#endif
     bool in_preamble =
         getOffsetForPosition({task->position.line, task->position.character},
                              content) < (int)bounds.Size;
@@ -547,6 +561,10 @@
     std::shared_ptr<PreambleData> preamble = session->getPreamble();
     IntrusiveRefCntPtr<llvm::vfs::FileSystem> fs =
         preamble ? preamble->stat_cache->consumer(session->fs) : session->fs;
+    std::unique_ptr<CompilerInvocation> ci =
+        buildCompilerInvocation(task.path, session->file.args, fs);
+    if (!ci)
+      continue;
     if (preamble) {
       bool rebuild = false;
       {
@@ -558,16 +576,25 @@
             rebuild = true;
           }
       }
+      if (!rebuild) {
+        std::string content = manager->wfiles->getContent(task.path);
+        auto buf = llvm::MemoryBuffer::getMemBuffer(content);
+#if LLVM_VERSION_MAJOR >= 12 // llvmorg-12-init-11522-g4c55c3b66de
+        PreambleBounds bounds =
+            ComputePreambleBounds(*ci->getLangOpts(), *buf, 0);
+#else
+        PreambleBounds bounds =
+            ComputePreambleBounds(*ci->getLangOpts(), buf.get(), 0);
+#endif
+        if (bounds.Size != preamble->preamble.getBounds().Size)
+          rebuild = true;
+      }
       if (rebuild) {
         manager->preamble_tasks.pushBack({task.path, nullptr, true}, true);
         continue;
       }
     }
 
-    std::unique_ptr<CompilerInvocation> ci =
-        buildCompilerInvocation(task.path, session->file.args, fs);
-    if (!ci)
-      continue;
     // If main file is a header, add -Wno-unused-function
     if (lookupExtension(session->file.filename).second)
       ci->getDiagnosticOpts().Warnings.push_back("no-unused-function");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ccls-0.20201025/src/working_files.cc 
new/ccls-0.20210330/src/working_files.cc
--- old/ccls-0.20201025/src/working_files.cc    2020-10-25 22:16:53.000000000 
+0100
+++ new/ccls-0.20210330/src/working_files.cc    2021-03-31 08:33:43.000000000 
+0200
@@ -339,18 +339,11 @@
                           index_lines, is_end);
 }
 
-Position WorkingFile::getCompletionPosition(Position pos, std::string *filter,
-                                            Position *replace_end_pos) const {
+Position WorkingFile::getCompletionPosition(Position pos, std::string *filter) 
const {
   int start = getOffsetForPosition(pos, buffer_content);
   int i = start;
   while (i > 0 && isIdentifierBody(buffer_content[i - 1]))
     --i;
-
-  *replace_end_pos = pos;
-  for (int i = start;
-       i < buffer_content.size() && isIdentifierBody(buffer_content[i]); i++)
-    replace_end_pos->character++;
-
   *filter = buffer_content.substr(i, start - i);
   return getPositionForOffset(buffer_content, i);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ccls-0.20201025/src/working_files.hh 
new/ccls-0.20210330/src/working_files.hh
--- old/ccls-0.20201025/src/working_files.hh    2020-10-25 22:16:53.000000000 
+0100
+++ new/ccls-0.20210330/src/working_files.hh    2021-03-31 08:33:43.000000000 
+0200
@@ -52,8 +52,7 @@
                                               bool is_end);
   // Returns the stable completion position (it jumps back until there is a
   // non-alphanumeric character).
-  Position getCompletionPosition(Position pos, std::string *filter,
-                                 Position *replace_end_pos) const;
+  Position getCompletionPosition(Position pos, std::string *filter) const;
 
 private:
   // Compute index_to_buffer and buffer_to_index.

Reply via email to