** Description changed:

- Here is a patch nobody asked for.
- 
  This is not a requirement but it will make it easier to navigate the
  code using language servers. Kernel has a script to generate this file.
- But it takes time because kernel needs to be compiled first.
  
- Since we already compile the kernels, we can simply run this script
- after compilation.
- 
- What is different from other source code tagging tools (gtags etc)? This
- will search within only the compiled source files & macros (part of
- sources which are disabled for the current build will not be included in
- search space). This makes it very useful for static analysis when there
- is a regression on certain architecture.
+ Other source code tagging utilities (such as gtags) index the whole code 
base. However, in practice quite a bit of code base is disabled (either through 
macro definitions or makefiles where some sources are kept out of compilation).
+     
+ When inspecting a crash on certain architecture, it would help a lot to 
search thought only the active source code. Language servers does this but 
requires compilation commands to parse the code exactly as it was compiled. 
Linux has a script to generate compile_commands.json but it is not used by our 
builds.
+    
+ Users can build the sources themselves and generate this file. However, this 
requires compilation first and it takes quite a bit of time. Since we already 
compile the code, it takes at most a couple seconds more to generate this file.

** Description changed:

  This is not a requirement but it will make it easier to navigate the
  code using language servers. Kernel has a script to generate this file.
  
- Other source code tagging utilities (such as gtags) index the whole code 
base. However, in practice quite a bit of code base is disabled (either through 
macro definitions or makefiles where some sources are kept out of compilation).
-     
- When inspecting a crash on certain architecture, it would help a lot to 
search thought only the active source code. Language servers does this but 
requires compilation commands to parse the code exactly as it was compiled. 
Linux has a script to generate compile_commands.json but it is not used by our 
builds.
-    
- Users can build the sources themselves and generate this file. However, this 
requires compilation first and it takes quite a bit of time. Since we already 
compile the code, it takes at most a couple seconds more to generate this file.
+ 
+ [Impact]
+ 
+ Other source code tagging utilities (such as gtags) index the whole
+ code base. However, in practice quite a bit of code base is disabled
+ (either through macro definitions or makefiles where some sources
+ are kept out of compilation).
+ 
+ When inspecting a crash on certain architecture, it would help a lot
+ to search thought only the active source code. Language servers does
+ this but requires compilation commands to parse the code exactly as
+ it was compiled. Linux has a script to generate compile_commands.json
+ but it is not used by our builds.
+ 
+ Users can build the sources themselves and generate this file. However,
+ this requires compilation first and it takes quite a bit of time. Since
+ we already compile the code, it takes at most a couple seconds more
+ to generate this file.
+ 
+ [Fix]
+ 
+ After compilation run scripts/clang-tools/gen_compile_commands.py and
+ package compile_commands.json into build-info.
+ 
+ [Test Case]
+ 
+ Build tested.
+ 
+ [Where things could go wrong]
+ 
+ Package may fail to build. Otherwise, there are no runtime
+ complications.
+ 
+ [Other Notes]
+ 
+ [1] https://clang.llvm.org/docs/JSONCompilationDatabase.html
+ [2] https://clangd.llvm.org/

** Description changed:

  This is not a requirement but it will make it easier to navigate the
  code using language servers. Kernel has a script to generate this file.
  
- 
  [Impact]
  
- Other source code tagging utilities (such as gtags) index the whole
- code base. However, in practice quite a bit of code base is disabled
- (either through macro definitions or makefiles where some sources
- are kept out of compilation).
+ Other source code tagging utilities (such as gtags) index the whole code
+ base. However, in practice quite a bit of code base is disabled (either
+ through macro definitions or makefiles where some sources are kept out
+ of compilation).
  
- When inspecting a crash on certain architecture, it would help a lot
- to search thought only the active source code. Language servers does
- this but requires compilation commands to parse the code exactly as
- it was compiled. Linux has a script to generate compile_commands.json
- but it is not used by our builds.
+ When inspecting a crash on certain architecture, it would help a lot to
+ search thought only the active source code. Language servers does this
+ but requires compilation commands to parse the code exactly as it was
+ compiled. Linux has a script to generate compile_commands.json but it is
+ not used by our builds.
  
  Users can build the sources themselves and generate this file. However,
  this requires compilation first and it takes quite a bit of time. Since
- we already compile the code, it takes at most a couple seconds more
- to generate this file.
+ we already compile the code, it takes at most a couple seconds more to
+ generate this file.
  
  [Fix]
  
  After compilation run scripts/clang-tools/gen_compile_commands.py and
  package compile_commands.json into build-info.
  
  [Test Case]
  
  Build tested.
  
  [Where things could go wrong]
  
  Package may fail to build. Otherwise, there are no runtime
  complications.
  
  [Other Notes]
  
  [1] https://clang.llvm.org/docs/JSONCompilationDatabase.html
  [2] https://clangd.llvm.org/

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/2119438

Title:
  Include compile_commands.json in build info for language servers

Status in linux package in Ubuntu:
  New
Status in linux source package in Jammy:
  New
Status in linux source package in Noble:
  New
Status in linux source package in Plucky:
  New
Status in linux source package in Questing:
  New

Bug description:
  This is not a requirement but it will make it easier to navigate the
  code using language servers. Kernel has a script to generate this
  file.

  [Impact]

  Other source code tagging utilities (such as gtags) index the whole
  code base. However, in practice quite a bit of code base is disabled
  (either through macro definitions or makefiles where some sources are
  kept out of compilation).

  When inspecting a crash on certain architecture, it would help a lot
  to search thought only the active source code. Language servers does
  this but requires compilation commands to parse the code exactly as it
  was compiled. Linux has a script to generate compile_commands.json but
  it is not used by our builds.

  Users can build the sources themselves and generate this file.
  However, this requires compilation first and it takes quite a bit of
  time. Since we already compile the code, it takes at most a couple
  seconds more to generate this file.

  [Fix]

  After compilation run scripts/clang-tools/gen_compile_commands.py and
  package compile_commands.json into build-info.

  [Test Case]

  Build tested.

  [Where things could go wrong]

  Package may fail to build. Otherwise, there are no runtime
  complications.

  [Other Notes]

  [1] https://clang.llvm.org/docs/JSONCompilationDatabase.html
  [2] https://clangd.llvm.org/

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2119438/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to