[cfe-dev] patch: scan-build/set-xcode-analyzer

Jeff Olson jolson474 at gmail.com
Tue Apr 22 06:29:00 PDT 2014


Whoops, missed the mailing list last night.

On Apr 21, 2014, at 7:25 PM, Jeff Olson <jolson474 at gmail.com> wrote:

> Thanks! And thanks for the additional information (I was wondering why no one else had reported an issue).  I didn't see this on my home machine either after you pointed it out (just my work laptop).  I did some additional research, and it appears that if you run xcode-select --switch and then pass in a path with a trailing slash, you will get a trailing slash back out when running --print-path as well.  
> 
> Tab-completion puts trailing slashes on by default in bash (at least in my terminal), so I am guessing that is how I started seeing that behavior.  So... probably a good tweak to the script in case anyone else ends up modifying their path and uses a trailing slash as well.
> 
> Thanks again for applying the change.  Appreciate it (and the rest of the awesome that is this project).
> 
> - Jeff
> 
> 
> 
> On Apr 21, 2014, at 9:20 AM, Ted Kremenek <kremenek at apple.com> wrote:
> 
>> Hi Jeff,
>> 
>> Thanks for the patch!
>> 
>> On Apr 15, 2014, at 1:45 PM, Jeff Olson <jolson474 at gmail.com> wrote:
>> 
>>> The set-xcode-analyzer python script has a bug that prevents it from working with Xcode 5.x because the path returned from the call to xcode-select ends in a trailing /  (and also a newline, if anyone cares).  In any case, as a result, when line 103 attempts to trim off the /Developer portion of the path using os.path.dirname, it instead only trims off the last / and as a result the script is unable to modify the xcspec file under Xcode.app/Contents/PlugIns/.   
>> 
>> Interesting.  I’m not seeing that behavior myself.  For me xcode-select prints out a path that does not end in a trailing ‘/‘.
>> 
>>> 
>>> There are multiple ways to fix this, but I thought that calling .rsplit on the right-most /Developer was the most direct way of implementing what the comment describes as the intended action.
>>> 
>>> From reading the site, my understanding is that mailing the attached svn diff output as a patch file is the best way to contribute fixes back.  Let me know if there is anything else I can do. 
>>> 
>>> Thanks!
>>> Jeff Olson
>>> 
>> 
>> Your interpretation is correct.  I’m wondering why there is a discrepancy between what you and I are seeing with the output of xcode-select, but the patch seems safe and does address the problem you are seeing.
>> 
>> Committed in r206752!
> 





More information about the cfe-dev mailing list