Unexpected result of parsing xcconfig files
PhilCai1993 opened this issue · comments
For example, the OTHER_LDFLAGS
in the xcconfig file looks like below:
...
OTHER_LDFLAGS=$(inherited) -ObjC -filelist $(PODS_ROOT)/Pods-MyApp.xcconfig.LinkFile.list -l"IGListKit" -l"Whatever"
...
And after parsing xcconfig using Xcodeproj::Config
, the items of OTHER_LDFLAGS
are out of order.
(Maybe we shouldn't use Set
and sort
here:https://github.com/CocoaPods/Xcodeproj/blob/master/lib/xcodeproj/config.rb#L124)
XCCONFIG = Xcodeproj::Config.new("path/to/myapp.xcconfig")
other_linker_flags = XCCONFIG.other_linker_flags
simple = other_linker_flags[:simple]
puts "simple", simple
puts "OTHER_LDFLAGS", XCCONFIG.to_hash["OTHER_LDFLAGS"]
simple
#<Set: {"$(inherited)", "-ObjC", "-filelist", "$(PODS_ROOT)/Pods-MyApp.xcconfig.LinkFile.list"}>
OTHER_LDFLAGS
$(PODS_ROOT)/Pods-MyApp.xcconfig.LinkFile.list $(inherited) -ObjC -filelist -l"IGListKit" -l"Whatever"
Expected:
$(inherited) -ObjC -filelist $(PODS_ROOT)/Pods-MyApp.xcconfig.LinkFile.list $(inherited) -ObjC -filelist -l"IGListKit" -l"Whatever" -l"IGListKit" -l"Whatever"