Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

Configuration of path mapping #10

Closed
ruipires opened this issue Jul 17, 2020 · 2 comments
Closed

Configuration of path mapping #10

ruipires opened this issue Jul 17, 2020 · 2 comments

Comments

@ruipires
Copy link

When using the CLion plugin, it would be useful if we could configure a mapping to apply to file paths exchanged between the idea-sourcetrail plugin and sourcetrail itself (for the "Send Location" and "Show in IDE" commands).

My particular use case is:

  • Run sourcetrail on windows (for code inspection). I could run sourcetrail remotely as well, but its performance is terrible over X11.
  • Run CLion inside WSL, using X11 forwarding, synchronizing files to a remote buildserver that can handle the building/indexing of the project a lot better than my local PC.
  • Run sourcetrail in another remote buildserver, to update the srctrldb file, which I copy over to windows via scp.

The checkout path in WSL and in the buildserver differs only in the initial part of the path.
If a mapping is possible to configure in the plugin, this would all work out perfectly.

@mlangkabel
Copy link
Contributor

At first thought, implementing a generic solution for your issue wouldn't be as easy as it sounds, because Sourcetrail projects can contain source files from different root directories. Simple example: Your source code and your compiler headers or the c++ standard library.

For your usecase it may be enough if you would open the .srctrldb file with an SQLite Browser and write a simple query that iterates the "file" table and searches and replaces a certain prefix in the "path" column to let Sourcetrail send the "correct" path to the IDE.

@ruipires
Copy link
Author

Thanks for the workaround, that might be enough for my needs.

I understand the dificulty in implementing this generically.

I had tried simply using symlinks, but sourcetrail seems to prefer using the canonical path, which no matter what combination I tried, would cause the mapping to fail either on sourcetrail or in clion.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants