Workspaces broken in NS3?
DHawthorne
Posts: 4,584
I like to keep my modules in their own folders as if they were separate projects. In NS2, if you put them in the workspace that way, the compiler had no trouble finding them. When I converted over to NS3 and made a minor update to an existing project, I noticed two things:
1) My folder paths were all wrong for the files not inside the current project folder. It lost the folder relationship and treated them all like sub-folders of the project folder, when in fact they were at the same hierarchical level. This is annoying, but it's a one-time-per-project fix, and I can deal with that.
2) No matter how or where I had the modules defined in the workspace, when I tried to compile the main program, it said it couldn't find the tko files. Even when I went into the compiler settings and added the folders as module paths, it couldn't find them. Even if I opened them from the prject tree, compiled them separately, then tried to compile the main program, it couldn't find them. The only way I could make it compile was if I made a local copy of the tko inside the actual project folder.
I really don't like this. I much prefer to have my modules update when I edit the original module source, and not have a lot of variants floating around in various other project files. If I absolutely got to have an older version customized to the project (in which case, how modular is that?), I can deal with an exception here or there, but I don't want to make it the rule. So am I missing something, or is this really broken? And if it's intended, why the heck did they change something as basic as this?
1) My folder paths were all wrong for the files not inside the current project folder. It lost the folder relationship and treated them all like sub-folders of the project folder, when in fact they were at the same hierarchical level. This is annoying, but it's a one-time-per-project fix, and I can deal with that.
2) No matter how or where I had the modules defined in the workspace, when I tried to compile the main program, it said it couldn't find the tko files. Even when I went into the compiler settings and added the folders as module paths, it couldn't find them. Even if I opened them from the prject tree, compiled them separately, then tried to compile the main program, it couldn't find them. The only way I could make it compile was if I made a local copy of the tko inside the actual project folder.
I really don't like this. I much prefer to have my modules update when I edit the original module source, and not have a lot of variants floating around in various other project files. If I absolutely got to have an older version customized to the project (in which case, how modular is that?), I can deal with an exception here or there, but I don't want to make it the rule. So am I missing something, or is this really broken? And if it's intended, why the heck did they change something as basic as this?
0
Comments
I never noticed this because I always do as you describe not wanting to do. I always put all files pertinent to that project within its folder. I have master copies of modules/includes and track them by version number.
the reason for doing it this way is that there are times when someone other than me might need the folder on a site. That way they don't have to keep track of where everything is on any given project and can just grab the one folder.
I can see how this would be a problem...
I don't have subfolders set up in there, do you perhaps have each module in its own folder? I don't know if the compiler automatically searches subdirectories
I must repeat, I really dislike this paradigm, and I do not understand why they changed it. It totally screws my hierarchy of organization that I have been working with for years.
I agree and don't understand the problem as well. After all, when one imports a module into the project, the path should just come along as a raw pathway to the file. as long as the file in reference doesn't move, who cares where it is? This is standard operating proceedure for almost all applications I can think of. (Including the other development environments I work in like XCode and NetBeans)
I personally have never ran into the issue myself because (as I said before) I keep all my files within the resident project folder, common or otherwise. But, I do agree that there's nothing wrong with your method and am puzzled as to why the new NS does this...
Makes me glad I'm still using 2.8.
Well now, on a possibly related note... I've been getting quite a few crashes which, quite frankly, scare the crap out of me.
They are not lock-up type crahses per se. And I've not seen this quite enough to predict it. But, what happens is I'm sitting there, coding, minding my own business and suddenly NS3 wigs out on me. All the nicely color coded source code turns all black and I get an error message saying (paraphrasing) unable to find ns keyword definitions file. autoentry is unable to perform task. This error is undismissable. If you click okay, it come right back up again. This might be due to the fact that it has to do this error for every possible instnace of a keyword in my code. ( on my current project of over 50K lines, that's going to be quite a few keyword errors.)
This happens out of the blue and has happened about 4 times to me on different projects.
It smacks of what Dave's describing in that there seems to be a problem with NS3s ability to keep and manage file pathways within a project. And this smacks of an issue with the .NET framework.