Closed burtlo closed 12 years ago
I noticed that there are some pull requests open that provide new features. I will attempt to include that functionality.
I also realized that the installation of any build settings of a library will automatically override any existing build settings.
I updated Xcoder to have support to append
the build_settings information specified as of Xcoder version 0.1.7
I also made Xcoder configuration more aware of most of the common configuration settings to make it more intelligent with regard with setting, getting, and appending values. This would solve what pull #7 is attempting to resolve.
Woah, I have no idea why I've left this pull request so long! Sorry @burtlo
@rayh and I actaully know each other, and we've talking about doing this for some time now. The we actually spoke about it, I got this pull request :D I'm just looking over it now.
So, with a Vendorfile of this:
# This is an example Vendorfile for you to start editing and add your
# own dependencies. Check out http://vendorkit.com/documentation for
# more information on how to use this file.
lib "ASIHTTPRequest", "~> 1.8"
lib "JSONKit", "~> 1.4"
I get the following error:
Examining VendorTest.xcodeproj
* Installing file: /Users/keith/.vendor/libraries/remote/ASIHTTPRequest/1.8.1/data/Classes/ASIAuthenticationDialog.h
* Installing file: /Users/keith/.vendor/libraries/remote/ASIHTTPRequest/1.8.1/data/Classes/ASICacheDelegate.h
* Installing file: /Users/keith/.vendor/libraries/remote/ASIHTTPRequest/1.8.1/data/Classes/ASIDataCompressor.h
* Installing file: /Users/keith/.vendor/libraries/remote/ASIHTTPRequest/1.8.1/data/Classes/ASIDataDecompressor.h
* Installing file: /Users/keith/.vendor/libraries/remote/ASIHTTPRequest/1.8.1/data/Classes/ASIDownloadCache.h
* Installing file: /Users/keith/.vendor/libraries/remote/ASIHTTPRequest/1.8.1/data/Classes/ASIFormDataRequest.h
* Installing file: /Users/keith/.vendor/libraries/remote/ASIHTTPRequest/1.8.1/data/Classes/ASIHTTPRequest.h
* Installing file: /Users/keith/.vendor/libraries/remote/ASIHTTPRequest/1.8.1/data/Classes/ASIHTTPRequestConfig.h
* Installing file: /Users/keith/.vendor/libraries/remote/ASIHTTPRequest/1.8.1/data/Classes/ASIHTTPRequestDelegate.h
* Installing file: /Users/keith/.vendor/libraries/remote/ASIHTTPRequest/1.8.1/data/Classes/ASIInputStream.h
* Installing file: /Users/keith/.vendor/libraries/remote/ASIHTTPRequest/1.8.1/data/Classes/ASINetworkQueue.h
* Installing file: /Users/keith/.vendor/libraries/remote/ASIHTTPRequest/1.8.1/data/Classes/ASIProgressDelegate.h
* Installing file: /Users/keith/.vendor/libraries/remote/ASIHTTPRequest/1.8.1/data/Classes/ASIAuthenticationDialog.m
* Installing file: /Users/keith/.vendor/libraries/remote/ASIHTTPRequest/1.8.1/data/Classes/ASIDataCompressor.m
* Installing file: /Users/keith/.vendor/libraries/remote/ASIHTTPRequest/1.8.1/data/Classes/ASIDataDecompressor.m
* Installing file: /Users/keith/.vendor/libraries/remote/ASIHTTPRequest/1.8.1/data/Classes/ASIDownloadCache.m
* Installing file: /Users/keith/.vendor/libraries/remote/ASIHTTPRequest/1.8.1/data/Classes/ASIFormDataRequest.m
* Installing file: /Users/keith/.vendor/libraries/remote/ASIHTTPRequest/1.8.1/data/Classes/ASIHTTPRequest.m
* Installing file: /Users/keith/.vendor/libraries/remote/ASIHTTPRequest/1.8.1/data/Classes/ASIInputStream.m
* Installing file: /Users/keith/.vendor/libraries/remote/ASIHTTPRequest/1.8.1/data/Classes/ASINetworkQueue.m
/Users/keith/.rbenv/versions/1.9.3-falcon/lib/ruby/gems/1.9.1/gems/xcoder-0.1.8/lib/xcode/group.rb:275:in `block in find_or_create_child_object': undefined method `name' for "3AEE8476DF4506821CFAF19F08A9623E363180DFC1903A05":String (NoMethodError)
from /Users/keith/.rbenv/versions/1.9.3-falcon/lib/ruby/gems/1.9.1/gems/xcoder-0.1.8/lib/xcode/group.rb:275:in `each'
from /Users/keith/.rbenv/versions/1.9.3-falcon/lib/ruby/gems/1.9.1/gems/xcoder-0.1.8/lib/xcode/group.rb:275:in `find'
from /Users/keith/.rbenv/versions/1.9.3-falcon/lib/ruby/gems/1.9.1/gems/xcoder-0.1.8/lib/xcode/group.rb:275:in `find_or_create_child_object'
from /Users/keith/.rbenv/versions/1.9.3-falcon/lib/ruby/gems/1.9.1/gems/xcoder-0.1.8/lib/xcode/group.rb:186:in `create_system_framework'
from /Users/keith/Development/vendor/lib/vendor/xcode/project.rb:135:in `block in add_required_frameworks_to_project'
from /Users/keith/Development/vendor/lib/vendor/xcode/project.rb:131:in `map'
from /Users/keith/Development/vendor/lib/vendor/xcode/project.rb:131:in `add_required_frameworks_to_project'
from /Users/keith/Development/vendor/lib/vendor/xcode/project.rb:34:in `install'
from /Users/keith/Development/vendor/lib/vendor/cli/app.rb:92:in `block (2 levels) in install'
from /Users/keith/Development/vendor/lib/vendor/vendor_file/loader.rb:29:in `block in libraries_to_install'
from /Users/keith/Development/vendor/lib/vendor/vendor_file/loader.rb:28:in `each'
from /Users/keith/Development/vendor/lib/vendor/vendor_file/loader.rb:28:in `libraries_to_install'
from /Users/keith/Development/vendor/lib/vendor/cli/app.rb:90:in `block in install'
from /Users/keith/Development/vendor/lib/vendor/cli/app.rb:87:in `each'
from /Users/keith/Development/vendor/lib/vendor/cli/app.rb:87:in `install'
from /Users/keith/.rbenv/versions/1.9.3-falcon/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
from /Users/keith/.rbenv/versions/1.9.3-falcon/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
from /Users/keith/.rbenv/versions/1.9.3-falcon/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor.rb:263:in `dispatch'
from /Users/keith/.rbenv/versions/1.9.3-falcon/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
from /usr/bin/vendor_dev:14:in `<main>'
I've uploaded the library here:
Actually, I changed my mind. Because I want this change so much, I'll accept it at the moment - even though its a little buggy. We'll just fix things up in master.
Oh awesome. I'll take a look at that right now and see what I can do about it.
Franklin Webber
On Thursday, March 22, 2012 at 1:16 PM, Keith Pitt wrote:
Actually, I changed my mind. Because I want this change so much, I'll accept it at the moment - even though its a little buggy. We'll just fix things up in master.
Reply to this email directly or view it on GitHub: https://github.com/keithpitt/vendor/pull/10#issuecomment-4647374
Alright, I had one fix for the work I did in Vendor. Apparently I can't keep Ruby's respond_to straight with Obj-C respondsToSelector and thus responds_to? was born.
There were several more fixes for Xcoder related to appending to null build configuration settings, appending to boolean properties, and frameworks being added incorrectly. When Ray merges and releases all should be right for that basic example.
Franklin Webber
On Thursday, March 22, 2012 at 7:43 PM, Franklin Webber wrote:
Oh awesome. I'll take a look at that right now and see what I can do about it.
Franklin Webber
On Thursday, March 22, 2012 at 1:16 PM, Keith Pitt wrote:
Actually, I changed my mind. Because I want this change so much, I'll accept it at the moment - even though its a little buggy. We'll just fix things up in master.
Reply to this email directly or view it on GitHub: https://github.com/keithpitt/vendor/pull/10#issuecomment-4647374
Oh I realize now that I fixed some other errors that occurred and you had a completely different error. Taking a look at that project you shared now and what I see are some incredibly long unique identifiers for files, folders, and frameworks:
3AEE8476DF4506821CFAF19F08A9623E363180DFC1903A05
versus
53CE980F151BB97200D051AA
In xcoder I made an assumption that the sequence was 24 hexadecimal characters but if I had read further in this one resource the values could be much larger. I will submit a change to xcoder to recognize all hexadecimal lengths that are 24 characters in length or greater to be identifiers.
Alright submitted another pull request to @rayh. However, I see another issue with the file references appearing broken.
Another issue with this project is now the file references are not correct because the paths that I am setting are relative to some point that is not valid. Should be a quick fix.
Awesome dude. You are smashing it!!!
Alright there were two ways to solve it and I took the easier of the two at the moment. I changed all files to be added with their path to be 'SOURCE_ROOT' which will work with the full paths that I gave them.
The reason this project was so different is that all the folders have paths and when the file is source is relative to the group it is relative to the last path/group that is being referenced. This means that if a path is given to the file and the various groups it is composed of are represented in the project as groups with paths, then it should likely strip paths off of the file path. A much more complicated solution.
All the groups that Xcoder adds are not backed with paths so I never ran into this problem. Thanks for the good test project to flesh out these issues.
Oh, I think I have one more issue related to the settings being appended improperly.
lang: error: no such file or directory: '[["[\"[\\\"[\\\\\\\"-ObjC\\\\\\\",\\\",\",",,'
clang: error: no such file or directory: '"\"\\\"\\\\\\\"+lsdd\\\\\\\"]\\\"]\",",,'
clang: error: no such file or directory: '"\"[\\\"-ObjC\\\",\",",,'
clang: error: no such file or directory: '"\"\\\"+lsdd\\\"]\"]",,'
clang: error: no such file or directory: '"[\"-ObjC\",",,'
clang: error: no such file or directory: '"\"+lsdd\"]"],'
clang: error: no such file or directory: '["-ObjC",,'
clang: error: no such file or directory: '"+lsdd"]]'
clang: error: no such file or directory: '[-ObjC,'
clang: error: no such file or directory: '+lsdd]'
I'll see what is happening there.
Alright, while generally I have treated OTHER_LDFLAGS
as a SpaceDelimitedStringProperty. However, it seems that Xcode (4.3.2) and maybe the previous ones will take the space delimited value and convert it to an array. So I guess that property type needs to support both of those types. Xcoder has a pull request open to support arrays and string delimited arrays.
OTHER_LDFLAGS = (
"-ObjC",
"+lsdd",
);
Last nagging problem at the moment is that the files that Xcoder added were duplicates to the files that were already present and I think that is because I am looking for uniqueness on the name attribute; which is not present if the path of the file works out to that location. I am going to fix that in Xcoder to compare the files on name and path.
This above problem caused the new files not to be added to the build sources step.
Alright, the last fix took care of the files that were being added to the sources and resources build phases. I was again assuming that files were going to have names when they all have paths so I'm using that to find the extension type to place the files in their various phases.
This coupled with the last pull request open again xcoder should have vendor install
working again with this example project.
I'll do a release once I'm back home (tonight) as I don't have my laptop with me.
Sent from my iPad
On 23/03/2012, at 7:10 PM, Franklin Webber reply@reply.github.com wrote:
Alright, the last fix took care of the files that were being added to the sources and resources build phases. I was again assuming that files were going to have names when they all have paths so I'm using that to find the extension type to place the files in their various phases.
This coupled with the last pull request open again xcoder should have
vendor install
working again with this example project.
Reply to this email directly or view it on GitHub: https://github.com/keithpitt/vendor/pull/10#issuecomment-4655451
Ray, you're awesome. Thanks.
Franklin Webber
On Saturday, March 24, 2012 at 3:47 PM, Ray Yamamoto Hilton wrote:
I'll do a release once I'm back home (tonight) as I don't have my laptop with me.
Sent from my iPad
On 23/03/2012, at 7:10 PM, Franklin Webber <reply@reply.github.com (mailto:reply@reply.github.com)> wrote:
Alright, the last fix took care of the files that were being added to the sources and resources build phases. I was again assuming that files were going to have names when they all have paths so I'm using that to find the extension type to place the files in their various phases.
This coupled with the last pull request open again xcoder should have
vendor install
working again with this example project.
Reply to this email directly or view it on GitHub: https://github.com/keithpitt/vendor/pull/10#issuecomment-4655451
Reply to this email directly or view it on GitHub: https://github.com/keithpitt/vendor/pull/10#issuecomment-4677236
I recently made some additions on the Xcoder gem to provide support for reading the remaining entities within a project file. I then added write support. Xcoder provides the functionality to generate everything up to and including targets. @rayh mentioned that you were interested in removing the parsing and saving functionality out of Vendor. This would be an answer.
Some examples of using Xcoder to add to an existing project:
I don't believe my implementation of integration is absolutely thorough in providing the same experience the previous work performed. I likely have neglected to remove files when you previously felt that was necessary or made some other assumption. I would love for you to take a look at this pull and see what may be missing or absolutely necessary. I will make any of the necessary changes.
Until @rayh and I finish any conversations about the current merge, https://github.com/rayh/xcoder/pull/9, the commit in my repository burtlo/xcoder @ de183eeaf12fcd911ef6ad9c8df40d0af33d20dc, would likely be how you would need to verify it against a working Xcoder. Afterwards, another version of Xcoder would need to be released to coincide with a release of Vendor.