Author Topic: local tag files for networked source?  (Read 10619 times)

Duhhh

  • Community Member
  • Posts: 36
  • Hero Points: 0
local tag files for networked source?
« on: August 14, 2007, 06:21:41 PM »
Is there a way to tell slickedit to use a local tag file when accessing networked files? Here's my use case: I have a large project that I access remotely. If I load the remote project, there is a HUGE delay while Slickedit loads the tag file. I'd like to be able to copy the tag file (and project/workspace files) to a local drive, then tell Slickedit to open the local project, but point it at the remote files. Since the tags all have relative paths, All I need to do is tell Slickedit that the project home isn't where it found the project file, but in an alternate location.

Sure, if I built the tag file using the network path it would work, but then I'd have an even BIGGER delay as I tagged the entire project. I can periodically load Slickedit locally and update tags, and then download the updated tag file.

Does that make sense? From what I see, Slickedit takes the absolute path of the .VPJ and prepends that to all of the files in the project. I would like to tell Slickedit what to prepend (project working_dir would be just fine for me).

Lisa

  • Senior Community Member
  • Posts: 238
  • Hero Points: 24
  • User-friendly geek-speak translator extraordinaire
Re: local tag files for networked source?
« Reply #1 on: August 15, 2007, 08:07:01 PM »
The location of the workspace file (.vpw) dictates where the tag file goes. So for SlickEdit to use a local tag file, you just need to put the workspace file on a local drive. Then you can still have the project files on the network drive.

Hope this helps,
Lisa

Duhhh

  • Community Member
  • Posts: 36
  • Hero Points: 0
Re: local tag files for networked source?
« Reply #2 on: September 05, 2007, 07:01:31 PM »
If I put the .vpw locally, that does dictate where the tag file goes, but it also dictates the base path to find all of the project files. In the .vtg, each file might have a path something like "src/foo/bar.c" and if my .vpw (and .vtg) are located at C:\WORK, then if I ask SlickEdit to load a file that is tagged, it would look for "C:\SRC\FOO\BAR.C"

What I want to be able to do is tell SlickEdit to ignore the base path as specified by the location of the tag file. I will tell it what the base path is (much like I can tell it what the "working directory" for a project is). So, in the above example, if I tell it my base path is Z:\NETDIR\PROJECT, and I ask SlickEdit to find a tag, it would build Z:\NETDIR\PROJECT\SRC\FOO\BAR.C and load that file.

I've hunted through projutil.e looking for some kind of magic, but nothing has worked yet.

The real reason I want this to work is because when I am local to my source, I can build tags quickly, but when I am remote, I'd like to take my tag files with me (so they don't take forever to load), and be able to use them over the network, with a new path.

I've also noticed that SlickEdit *really* hates it when a network path goes away. I've lost connection to the network and SlickEdit goes unresponsive. Worse yet, I close SlickEdit, shut down the network, then re-open SlickEdit because I want to work on a local file. It tries to restore the project, and when it can't get to the network files, it tries to take my system to its knees.

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: local tag files for networked source?
« Reply #3 on: September 05, 2007, 07:22:08 PM »
I think you'd need to create new local tagfiles referring to the (locally visible) mapped files. The error parser can be configured to handle the 'non-matching' output (path prefix) of your remote build/compile commands. I guess you're using your own build env. This worked quite good for mee time ago.
Maybe it's also an option to create new (local) projects and workaround your build command wildcards if you use them to e.g. refer to the project dir.
HS2

Duhhh

  • Community Member
  • Posts: 36
  • Hero Points: 0
Re: local tag files for networked source?
« Reply #4 on: September 07, 2007, 09:21:01 PM »
Well, I can't be sure, but I thought all of the tag files are relative to the .VPW file location. At least they looked that way. Creating a new project and tag file is a possibility, but it would mean that I would have to create a local configuration that looks just like my remote setup (not impossible, but a pain), then copy THAT project/tag file to my remote machine. If I could get the relative paths working, I could make a copy of my current local tag file any time I felt like updating it (did I mention that locally I work on linux, and remotely I work on Windows?)

So, I'm guessing that there is nowhere in the .e where I can force the project root? Hmmm, maybe a feature request.

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: local tag files for networked source?
« Reply #5 on: September 11, 2007, 09:59:53 AM »
Funny - my config was working on Window locally on a remote Linux project :)
Of course the workaround locally maintaining a 'view' of a remote project is not an elegant solution.
But I afraid it's just not that easy to find one. Note that there is no such thing as a 'project path prefix' which can simply be substituted (maybe a list would do). Usually sources are organized like that, but that's not guaranteed.
Why do you need to ' ... copy THAT project/tag file to my remote machine ... ' ?
BTW: The compiler/other tagfile configuration should also match the project setup conc. the paths.
However, it's up to the real experts to give a better advise.

HS2

Duhhh

  • Community Member
  • Posts: 36
  • Hero Points: 0
Re: local tag files for networked source?
« Reply #6 on: September 16, 2007, 01:38:26 AM »
> Why do you need to ' ... copy THAT project/tag file to my remote machine ... ' ?

Because my windows machine is never directly connected to the linux network. If I could connect that machine to the network, I could create a project and tag file. Instead, I use Slickedit for Linux to create the project and tags, then copy those files to a USB flash drive and bring that to the Windows machine. When I'm on the road (fairly slow connection) I want to use the local tags to reference the remote source. If I tried to build a tagfile remotely, it would take way too long. If I point my windows machine at the project and tag file that are on the Linux server, it works, but it is PAINFULLY slow loading the tags. If that's how you run, have you ever lost the connection? Slickedit goes NUTS when it loses touch with the project/tag files - I usually have to kill it with task manager.

I didn't think this was a big deal, at most I thought I'd have to make a few changes to one of the tag .e files, but I couldn't find a variable that controlled that. Is this one of the few things that's actually hard-coded into SlickEdit? Maybe Clark can say for sure (sounds like a feature for Slickedit 2008).

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: local tag files for networked source?
« Reply #7 on: September 16, 2007, 10:02:19 AM »
Ok - got it. This is indeed quite different to what I was using. My dev. platform was/is Windows but I had a permanent LAN connection/SMB mounts. So I only had to find a solution to resolve the diff. path prefixes for tagging and error parsing when doing remote builds.
Seems that a (maybe easy to implement) path prefix re-mapping table used for tagging and error parsing could be a reasonable approach. The latter could even solve a minor problem I'm curr. running in when I get linker errors working on a (local hosted) cygwin based cross-dev. project. Even though my build env. uses relative paths the linker spews out abs. paths like '/cygdrive/c/path-to-project/.../file.cpp' which makes the error parser fail to find the affected '.../file.cpp'. A path-prefix remapping like '/cygdrive/c/' -> 'c:' could help the error parser to remap the unknown/unwanted path-prefix automagically when 'goto-error' fails to find the source file. The same would apply to 'push-tag' and friends. I hope the performance penalty is not that much.
So I agree that a solution for these issues would be an appreciated enhancement for SE2008.

HS2
« Last Edit: September 16, 2007, 10:08:35 AM by hs2 »

Duhhh

  • Community Member
  • Posts: 36
  • Hero Points: 0
Re: local tag files for networked source?
« Reply #8 on: October 18, 2007, 06:00:49 PM »
My search for a solution is going nowhere, and my frustration at not being able to solve it is going higher. Does anyone know if this feature is exposed in .e, or is it buried beneath that?

I'm now considering an "outside the box" solution. On OS/2, I used to use TVFS, which allowed me to layer filesystems. If I can write a TVFS for windows, I could solve my problem, because SlickEdit wouldn't think that the local tag files and the networked source were in the same tree. It's going to be a lot of work, but it will allow me to work from home, which has MAJOR advantages.

Before I take on the task, I'd really like to know if I can access the tagfile base path in SlickEdit.

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: local tag files for networked source?
« Reply #9 on: October 18, 2007, 08:26:29 PM »
Lisa's initial response to your query was concise and correct.

Quote
The location of the workspace file (.vpw) dictates where the tag file goes. So for SlickEdit to use a local tag file, you just need to put the workspace file on a local drive. Then you can still have the project files on the network drive.

You have missed the fact that she is distinguishing the location of the workspace (vpw) and the projects (vpj's).

This is all you have to do. 

1) Create an EMPTY workspace on a local drive.  (Project > New, switch to the Workspaces tab, and select Blank Workspace).

2) Add your existing projects (located on your network drive) to this workspace. (Project > Insert Project into Workspace)

The workspace file, tag file and workspace history will be on your local drive, everything else will be on the remote drive as you require.

There are future plans to be able to specify an alternate location for the workspace tag file.  But, like I said, that is "future version" territory.

Duhhh

  • Community Member
  • Posts: 36
  • Hero Points: 0
Re: local tag files for networked source?
« Reply #10 on: October 26, 2007, 03:43:01 PM »
Thanks for the response, but what I was hoping for was a way to manipulate the base dir. I had already tried the suggestion to put the workspace on the local drive, but this requires me to rebuild the tag file remotely (it takes FOREVER over the network). When I build the tagfile when I am locally connected, it looks like it has relative paths. I was hoping I could COPY this tagfile to my local machine, and then when I'm connected remotely, I could fix-up the base path, and use the tagfile without having to rebuild it. Since the machine where the source lives is a *ix server, and my remote workstation is Windows, getting absolute paths that work both ways is difficult/impossible.

It sounds like I'll be waiting for the "future development."