Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

folder reference with same name has conflict hash value after xunique #47

Open
ZSaberLv0 opened this issue Jun 9, 2018 · 2 comments
Open

Comments

@ZSaberLv0
Copy link

to reproduce:

  1. in XCode, add folder to a group,
    choose Create folder references instead of the default Create groups
  2. add another folder with same name, to the same group
  3. run xunique
  4. the folder reference with same name would result same hash values,
    cause others disappear from XCode

note: when add same folder ref to different group, this issue won't happen

PS:

  • why I need folder reference with same name:
    • add generated source files
    • add header and sources references for convenient for code browsing,
      headers and sources are come from many sub modules with same folder structure
  • why not add to different group:
    • that requires additional group and section names in pbxproj file
    • when sub modules changes, the pbxproj file changes,
      further more, the order of the sections in pbxproj file would change,
      causing the pbxproj file more inconvenient to manage by version control,
      especially when the pbxproj file are generated by script files
@truebit
Copy link
Owner

truebit commented Jun 15, 2018

Sorry for the late reply.
Do you know what's the entry for folder references in Xcode project file? something starts with PBX???, like PBXGroup for groups.

@ZSaberLv0
Copy link
Author

it's something like this

/* Begin PBXBuildFile section */
		04FE6AFC20D37C48008D2E1A /* zfsrc in Resources */ = {isa = PBXBuildFile; fileRef = 04FE6AFB20D37C48008D2E1A /* zfsrc */; };
		04FE6AFE20D37CFC008D2E1A /* zfsrc in Resources */ = {isa = PBXBuildFile; fileRef = 04FE6AFD20D37CFB008D2E1A /* zfsrc */; };
...
/* Begin PBXFileReference section */
		04FE6AFB20D37C48008D2E1A /* zfsrc */ = {isa = PBXFileReference; lastKnownFileType = folder; name = zfsrc; path = ../../../../../ZF/ZFCore/zfsrc; sourceTree = "<group>"; };
		04FE6AFD20D37CFB008D2E1A /* zfsrc */ = {isa = PBXFileReference; lastKnownFileType = folder; name = zfsrc; path = ../../../../../ZF/ZFAlgorithm/zfsrc; sourceTree = "<group>"; };
...
/* Begin PBXGroup section */
		E26189EC36AF05F05B0E5289D2564D10 /* ProjectFiles */ = {
			isa = PBXGroup;
			children = (
				04FE6AFB20D37C48008D2E1A /* zfsrc */,
				04FE6AFD20D37CFB008D2E1A /* zfsrc */,
...
/* Begin PBXResourcesBuildPhase section */
		83745D09F71B763541FB81C529246249 /* Resources */ = {
			isa = PBXResourcesBuildPhase;
			buildActionMask = 2147483647;
			files = (
				04FE6AFE20D37CFC008D2E1A /* zfsrc in Resources */,
				04FE6AFC20D37C48008D2E1A /* zfsrc in Resources */,

note:

  • when added as folder reference, it also adds to Copy Bundle Resources in Build Phases,
    but for header and source files, it's not we want and typically we would remove it manually in Build Phases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants