Bug 347188 - Internal builder may fail if the tool has inputs from the project options
Summary: Internal builder may fail if the tool has inputs from the project options
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build-managed (show other bugs)
Version: 8.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-25 12:13 EDT by Alex Freidin CLA
Modified: 2020-09-04 15:16 EDT (History)
3 users (show)

See Also:


Attachments
Patch (1.09 KB, patch)
2011-05-25 12:15 EDT, Alex Freidin CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Freidin CLA 2011-05-25 12:13:18 EDT
Build Identifier: M20100909-0800

If a tool is defined to receive an input from the value of a project option, the build may fail with internal builder.
The project option contains one or more input files. The problem is that the user may define them with a build directory relative syntax, e.g. ../src/file.in. This case is not handled. Specifically, when BuildDescription.calculateInputs() calls BuildDescription.addInput(String,BuildIOType), the latter calls addInput(IPath, BuildIOType) whose JavaDoc says "path IPath relative to the project, or absolute filesystem location". Passing an IPath with "../" syntax then causes an exception. In other words, an input with "../" syntax should be translated into a valid IPath before the call.



Reproducible: Always
Comment 1 Alex Freidin CLA 2011-05-25 12:15:26 EDT
Created attachment 196571 [details]
Patch

Translate a path with a relative syntax into a valid IPath.