RESOLVED FIXED 209901
[Flatpak SDK] Path references shouldn't point to the sandbox in compile_commands.json
https://bugs.webkit.org/show_bug.cgi?id=209901
Summary [Flatpak SDK] Path references shouldn't point to the sandbox in compile_comma...
Sergio Villar Senin
Reported 2020-04-02 06:02:52 PDT
The problem is that the paths specified in the compilation database are flatpak's paths, so any tool using the compilation database like ycmd, ccls, etc... is unable to find references to the source files in it.
Attachments
Emacs config (1.79 KB, application/x-compressed-tar)
2020-05-04 05:38 PDT, Sergio Villar Senin
no flags
Patch (2.55 KB, patch)
2020-05-08 08:49 PDT, Philippe Normand
no flags
Sergio Villar Senin
Comment 1 2020-04-02 06:47:16 PDT
BTW for those using VSCode there is a workaround. Just need to use path mappings setting, for example: "ccls.clang.pathMappings": [ "/app/webkit>PATH_TO_YOUR_WEBKIT_CHECKOUT_ROOT" ], Note the ">" in between paths, it's superimportant :)
Philippe Normand
Comment 2 2020-04-03 01:35:18 PDT
Is there something to fix then? Or this is "only" a matter of documentation :)
Philippe Normand
Comment 3 2020-04-03 04:53:32 PDT
What's your use-case for this? Are you building WebKit from VSCode?
Sergio Villar Senin
Comment 4 2020-04-06 12:23:24 PDT
(In reply to Philippe Normand from comment #3) > What's your use-case for this? Are you building WebKit from VSCode? The use case is having semantic autocompletion when using LSP tools with different editors: VSCode, emacs..., is not about building.
Philippe Normand
Comment 5 2020-05-02 10:59:49 PDT
So you use LSP in Emacs for WebKit dev? Can you share your config? :D
Sergio Villar Senin
Comment 6 2020-05-04 05:38:03 PDT
Created attachment 398360 [details] Emacs config Not my default editor anymore, but here you are the relevant bits. Note that the path mapping setting is not used anymore as I'm using jhbuild again because I could not make it work with flatpak builds.
Philippe Normand
Comment 7 2020-05-05 02:06:06 PDT
Perhaps the SDK could ship ccls and have it running in the sandbox. This needs investigation but is down below in my TODO.
Philippe Normand
Comment 8 2020-05-08 08:49:45 PDT
Philippe Normand
Comment 9 2020-05-12 01:09:47 PDT
(In reply to Philippe Normand from comment #3) > What's your use-case for this? Are you building WebKit from VSCode? FWIW I now have compilation errors reported in Emacs thanks to LSP/CCLS.
EWS
Comment 10 2020-05-14 02:41:47 PDT
Committed r261681: <https://trac.webkit.org/changeset/261681> All reviewed patches have been landed. Closing bug and clearing flags on attachment 398863 [details].
Radar WebKit Bug Importer
Comment 11 2020-05-14 02:42:15 PDT
Note You need to log in before you can comment on or make changes to this bug.