[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-dev] Issue in BuildDescription.java when computing absolute path
|
While implementing a proprietary C++ toolchain I stumbled on a issue
which to my understanding is a bug. I haven't entered a bug yet because I
cannot provide a use case outside of the proprietary toolchain. The
issue appeared when the cdt internal builder call an external class to
resolve the output Name associated to the ouput type of the C++
compiler. This external class can be optionally defined in the element
NameProvider of the outputType associated to the Compiler tool. This
happens when the output resource is calculated in private method
addOutputs(...) at line 993 of file BuildDescription.java. The issue
only happens when the output file resource provided by the external
class is an absolute path in which case the checking line of code if(outFullPath.isAbsolute())
is true. This might be why the issue never poped-up yet since when the
output file is computed by the CDT builder the path is relative.
At line 1007,1008,1009 the current code is:
outProjPath = outProjPath.removeFirstSegments(projLocation.segmentCount());
outFullPath = projLocation.append(outProjPath.removeFirstSegments(projLocation.segmentCount()));
outWorkspacePath = fProject.getFullPath().append(outProjPath);
It should be
outFullPath = projLocation.append(outProjPath.removeFirstSegments(projLocation.segmentCount()));
outProjPath = outProjPath.removeFirstSegments(projLocation.segmentCount());
outWorkspacePath = fProject.getFullPath().append(outProjPath);
The
first 2 lines are reversed which each other. The reason is rather
obvious. When I made the change I got ride of my issue with absolute
path. I hope a commiter can lot a it and make the change before the
Kepler release.
Thanks
GuyDISCLAIMER:
Privileged and/or Confidential information may be contained in this
message. If you are not the addressee of this message, you may not
copy, use or deliver this message to anyone. In such event, you
should destroy the message and kindly notify the sender by reply
e-mail. It is understood that opinions or conclusions that do not
relate to the official business of the company are neither given
nor endorsed by the company.
Thank You.