
I am having a doubt regarding a project structure.
I am having a project PROJ-1 that makes use of SWCs created by an another project PROJ-2
The PROJ-2 make use of some classes (diagram:- A, B, C ) present at some other location on my desktop ( I actually make use of those classes ( A,B,C) , as i generally need them in all projects) .
But now, i am facing a situation, where PROJ-1 too needs those classes. I fear if i make use of those classes again in PROJ-1, then it would mess up ( As the swcs coming from PROJ-2 are already using those classes (A,B,C) )
What should i do now ??
Thanks.
Vishwas.
You should fragment the “shared” classes to a separate swc lib altogether, that can be used by both proj1 and proj2.
It is a VERY bad idea to compile the same classes directly into proj1 that are already inside the swc generated from proj2. It won’t give CTE’s or RTE’s since the FP will automatically use the class definitions that it encounters first but the big problem is in usage.
If anything changes in one of those classes, but you forget to re-compile one of both projects, you’ll be running into very erratic behaviour. For instance proj2 compiles and runs perfectly on it’s own, but the moment you run the binary of proj1 it will behave differently since it will use the definition of the class as it was compiled into proj1.