truebit / xUnique

merge Xcode project file is so easy
https://fclef.wordpress.com
Other
1.5k stars 117 forks source link

Cannot run after adding new library #33

Closed ericksli closed 8 years ago

ericksli commented 8 years ago

I have been using xUnique for a while in a project and it works. However, after I added new library to my project and xUnique fails to run.

Here is the terminal output and the version of xUnique is 4.0.4:

Uniquify and Sort
uniquify PBXProject
uniquify PBX*Group and PBX*Reference*
uniquify XCConfigurationList
uniquify XCConfiguration
uniquify Subprojects
uniquify PBXContainerItemProxy
Traceback (most recent call last):
  File "/usr/local/bin/xunique", line 11, in <module>
    sys.exit(main())
  File "/Library/Python/2.7/site-packages/xUnique.py", line 546, in main
    xunique.unique_project()
  File "/Library/Python/2.7/site-packages/xUnique.py", line 188, in unique_project
    self.__unique_project(self.root_hex)
  File "/Library/Python/2.7/site-packages/xUnique.py", line 360, in __unique_project
    self.__unique_group_or_ref(project_ref_parent_hex, product_group_hex)
  File "/Library/Python/2.7/site-packages/xUnique.py", line 476, in __unique_group_or_ref
    self.__unique_group_or_ref(current_hex, child_hex)
  File "/Library/Python/2.7/site-packages/xUnique.py", line 478, in __unique_group_or_ref
    self.__unique_container_item_proxy(parent_hex, self.nodes[current_hex]['remoteRef'])
  File "/Library/Python/2.7/site-packages/xUnique.py", line 414, in __unique_container_item_proxy
    new_container_item_proxy_hex = self.__set_to_result(parent_hex, container_item_proxy_hex, ('isa', 'remoteInfo'))
  File "/Library/Python/2.7/site-packages/xUnique.py", line 138, in __set_to_result
    current_node = self.nodes[current_hex]
KeyError: u'BA71442ECABF543ABF1A5CE64B2C7E50'
truebit commented 8 years ago

please update your xunique to latest and try again. I catched several exception in following versions. See https://github.com/truebit/xUnique/releases for more details(notice that 4.1.0 changed generation method of MD5, all md5 would change)

ericksli commented 8 years ago

I am using version 4.1.4 now but i still get the error message. The key BA71442ECABF543ABF1A5CE64B2C7E50 is related to ReactiveCocoa.

/* Begin PBXReferenceProxy section */
        3B91206B9132C26D0861F93834146C87 /* ReactiveCocoa.framework */ = {
            isa = PBXReferenceProxy;
            fileType = wrapper.framework;
            path = ReactiveCocoa.framework;
            sourceTree = BUILT_PRODUCTS_DIR;
        };
        301BF370837AE403CF96799AEBF33B6E /* ReactiveCocoaTests.xctest */ = {
            isa = PBXReferenceProxy;
            fileType = wrapper.cfbundle;
            path = ReactiveCocoaTests.xctest;
            sourceTree = BUILT_PRODUCTS_DIR;
        };
        3B91206B9132C26D0861F93834146C87 /* ReactiveCocoa.framework */ = {
            isa = PBXReferenceProxy;
            fileType = wrapper.framework;
            path = ReactiveCocoa.framework;
            sourceTree = BUILT_PRODUCTS_DIR;
        };
        301BF370837AE403CF96799AEBF33B6E /* ReactiveCocoaTests.xctest */ = {
            isa = PBXReferenceProxy;
            fileType = wrapper.cfbundle;
            path = ReactiveCocoaTests.xctest;
            sourceTree = BUILT_PRODUCTS_DIR;
        };
        3B91206B9132C26D0861F93834146C87 /* ReactiveCocoa.framework */ = {
            isa = PBXReferenceProxy;
            fileType = wrapper.framework;
            path = ReactiveCocoa.framework;
            sourceTree = BUILT_PRODUCTS_DIR;
        };
        3B91206B9132C26D0861F93834146C87 /* ReactiveCocoa.framework */ = {
            isa = PBXReferenceProxy;
            fileType = wrapper.framework;
            path = ReactiveCocoa.framework;
            remoteRef = BA71442ECABF543ABF1A5CE64B2C7E50 /* PBXContainerItemProxy */;
            sourceTree = BUILT_PRODUCTS_DIR;
        };
truebit commented 8 years ago

could you please send me your project.xcodeproj file via email? you could find it from LICENSE file

truebit commented 8 years ago

According to the project file you sent to me, your project file seems not correct:

/* Begin PBXTargetDependency section */
    00D4FBB81D1001E80041D56B /* PBXTargetDependency */ = {
        isa = PBXTargetDependency;
        name = "ReactiveCocoa-iOS";
        targetProxy = 00D4FBB71D1001E80041D56B /* PBXContainerItemProxy */;
    };
    00D4FBBC1D1001F00041D56B /* PBXTargetDependency */ = {
        isa = PBXTargetDependency;
        name = "Result-iOS";
        targetProxy = 00D4FBBB1D1001F00041D56B /* PBXContainerItemProxy */;
    };
    08562BAF75F66FB9EA7BFACB65F67D61 /* PBXTargetDependency */ = {
        isa = PBXTargetDependency;
        name = "Result-iOS";
    };
    2C5EF3EEAB2EB72A7B590F49401CD7B9 /* PBXTargetDependency */ = {
        isa = PBXTargetDependency;
        name = "ZXingObjC-iOS";
        targetProxy = A57EEEB4D4463277BA533C7BB959C81F /* PBXContainerItemProxy */;
    };
    70CE47A366D15A7797019CCE8CAC0365 /* PBXTargetDependency */ = {
        isa = PBXTargetDependency;
        name = "ReactiveCocoa-iOS";
    };
 /* End PBXTargetDependency section */

PBXTargetDependency should contain targetProxy, but two of them not

truebit commented 8 years ago

If this issue still exists, please comment and open