Sourcetrail icon indicating copy to clipboard operation
Sourcetrail copied to clipboard

Remote indexing

Open egraether opened this issue 8 years ago • 10 comments

Some users compile on a remote machine and don't have all dependencies to properly index locally. It should be possible to index with Coati on the remote machine and look at the project locally.

egraether avatar Aug 04 '16 08:08 egraether

+1

I'm using a dual-core laptop to edit code. Offloading the indexing to a server would be a nice feature.

simonpintarelli avatar Aug 04 '16 13:08 simonpintarelli

Ideally coati would be split into a client and a server: the client would to indexing (and auto-reindexing), the server would be in browser. This way I could set up coati server once, to watch git repos, local code (inside docker, on a remote server) and what not, and then simply launch a browser on my laptop. Not being able do so makes running (and using) coati very painful for me, most of the time.

sasha-s avatar May 29 '17 18:05 sasha-s

We probably won't build an in-browser app soon, but having a server for remote indexing seems to be a high demanded feature. In the front end you will still need to use our current app however.

egraether avatar May 30 '17 08:05 egraether

not as elegant as the browser interface, but would be very nice indeed!

sasha-s avatar May 31 '17 05:05 sasha-s

Is there any progress on the remote indexing feature?

This is also something that is almost mandatory for my environment.

Although I use Mac OSX as my UI machine, nearly all of my software development is done inside docker containers running Linux OS environments (e.g. Centos, Ubuntu). While I map in the source from my MacOS file system, the system includes/header files etc are all available only inside the docker container.

Ideally I would be able to set up an indexer running inside the Linux container, that has access to all the appropriate files necessary for the build. Then, it could either export the symbols over a port to the Mac for the UI, or if necessary, create a whole database that can be copied (or mapped) out of the container to be used by the UI.

Thoughts?

evantorrie avatar Nov 01 '17 22:11 evantorrie

@evantorrie There is some progress. We implemented a commandline interface that can be used within scripts or docker images to index projects with Sourcetrail. Please have a look at our documentation.

Steps to use with Docker:

  • Create a local Sourcetrail project .srctrlprj und use relative paths that will also work within your docker image.
  • Install Sourcetrail in you docker image
  • Run Sourcetrail config --license-file <path/to/your/license.txt> or Sourcetrail config --non-commercial-use true to choose a license option.
  • Move the .srctrlprj file to your docker image.
  • Run Sourcetrail index <path/to/your/project.srctrlprj>. If there are problems due to wrong paths, missing flags, include paths etc. you will need to manually edit the .scrtroprj file, which is XML.
  • Export the finished Sourcetrail database .srctrldb file as artifact
  • Move the .srctrldb file into the same local directory as your .srctrlprj file.
  • Open the .srctrlprj file with Sourcetrail and you should be able to browse the project.

egraether avatar Nov 02 '17 11:11 egraether

@egraether Thanks! I got that working fairly well for my use case after I realized I needed to reconfig the global header search paths stored in ~/.config/sourcetrail/ApplicationSettings.xml because I was using a different version of the compiler to compile the code compared to I guess what was the default at the time I ran the first Sourcetrail config.

evantorrie avatar Nov 03 '17 00:11 evantorrie

+1 by mail

egraether avatar Nov 10 '17 13:11 egraether

@egraether You mentioned that there is information about remote indexing at documentation. But I haven't found anything similar to it. Only your steps to use it with docker available as documentation?

(hello from future :) )

merrychap avatar Mar 18 '21 15:03 merrychap

Would be really useful if ssh would be supported!

Viatorus avatar Jun 08 '21 05:06 Viatorus