ODataOrgDemo.xcodeproj: ODataEntity.h: Method name referenced in property setter attribute must end with ':'
teeqemm opened this issue · 8 comments
Hi,
I cannot compile any of the sample apps, instead I get several dozend errors... it seems that the setter methods are not properly declared (a setter method takes one argument, so it's supposed to be setSomeValue instead of setSomeValue:).
Cheers,
Thomas
CompileC /Users/teeqemm/Library/Developer/Xcode/DerivedData/ODataOrgDemo-gkofidkcljsjqgftzehuzmkbkkpj/Build/Intermediates/MSODataLib.build/Debug-iphonesimulator/MSODataLib.build/Objects-normal/i386/ResourceBox.o Context/ResourceBox.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/teeqemm/Downloads/OData-OData4ObjC-67ed00a/framework/src/MSODataLib
setenv LANG en_US.US-ASCII
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang -x objective-c -arch i386 -fmessage-length=0 -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -std=c99 -Wno-trigraphs -fpascal-strings -O0 -Wreturn-type -Wparentheses -Wswitch -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-shorten-64-to-32 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -fexceptions -fasm-blocks -mmacosx-version-min=10.6 -gdwarf-2 -Wno-sign-conversion -fobjc-abi-version=2 -fobjc-legacy-dispatch "-DIBOutlet=attribute((iboutlet))" "-DIBOutletCollection(ClassName)=attribute((iboutletcollection(ClassName)))" "-DIBAction=void)attribute((ibaction)" -D__IPHONE_OS_VERSION_MIN_REQUIRED=40000 -iquote /Users/teeqemm/Library/Developer/Xcode/DerivedData/ODataOrgDemo-gkofidkcljsjqgftzehuzmkbkkpj/Build/Intermediates/MSODataLib.build/Debug-iphonesimulator/MSODataLib.build/MSODataLib-generated-files.hmap -I/Users/teeqemm/Library/Developer/Xcode/DerivedData/ODataOrgDemo-gkofidkcljsjqgftzehuzmkbkkpj/Build/Intermediates/MSODataLib.build/Debug-iphonesimulator/MSODataLib.build/MSODataLib-own-target-headers.hmap -I/Users/teeqemm/Library/Developer/Xcode/DerivedData/ODataOrgDemo-gkofidkcljsjqgftzehuzmkbkkpj/Build/Intermediates/MSODataLib.build/Debug-iphonesimulator/MSODataLib.build/MSODataLib-all-target-headers.hmap -iquote /Users/teeqemm/Library/Developer/Xcode/DerivedData/ODataOrgDemo-gkofidkcljsjqgftzehuzmkbkkpj/Build/Intermediates/MSODataLib.build/Debug-iphonesimulator/MSODataLib.build/MSODataLib-project-headers.hmap -I/Users/teeqemm/Library/Developer/Xcode/DerivedData/ODataOrgDemo-gkofidkcljsjqgftzehuzmkbkkpj/Build/Products/Debug-iphonesimulator/include -I/usr/include/libxml2 -I/usr/include/libxml2/libxml -I/Users/teeqemm/Library/Developer/Xcode/DerivedData/ODataOrgDemo-gkofidkcljsjqgftzehuzmkbkkpj/Build/Intermediates/MSODataLib.build/Debug-iphonesimulator/MSODataLib.build/DerivedSources/i386 -I/Users/teeqemm/Library/Developer/Xcode/DerivedData/ODataOrgDemo-gkofidkcljsjqgftzehuzmkbkkpj/Build/Intermediates/MSODataLib.build/Debug-iphonesimulator/MSODataLib.build/DerivedSources -F/Users/teeqemm/Library/Developer/Xcode/DerivedData/ODataOrgDemo-gkofidkcljsjqgftzehuzmkbkkpj/Build/Products/Debug-iphonesimulator -include /Users/teeqemm/Library/Developer/Xcode/DerivedData/ODataOrgDemo-gkofidkcljsjqgftzehuzmkbkkpj/Build/PrecompiledHeaders/MSODataLib_Prefix-bfvlmgsrblucftdupyusipholzir/MSODataLib_Prefix.pch -MMD -MT dependencies -MF /Users/teeqemm/Library/Developer/Xcode/DerivedData/ODataOrgDemo-gkofidkcljsjqgftzehuzmkbkkpj/Build/Intermediates/MSODataLib.build/Debug-iphonesimulator/MSODataLib.build/Objects-normal/i386/ResourceBox.d -c /Users/teeqemm/Downloads/OData-OData4ObjC-67ed00a/framework/src/MSODataLib/Context/ResourceBox.m -o /Users/teeqemm/Library/Developer/Xcode/DerivedData/ODataOrgDemo-gkofidkcljsjqgftzehuzmkbkkpj/Build/Intermediates/MSODataLib.build/Debug-iphonesimulator/MSODataLib.build/Objects-normal/i386/ResourceBox.o
In file included from /Users/teeqemm/Downloads/OData-OData4ObjC-67ed00a/framework/src/MSODataLib/Context/ResourceBox.h:18:
In file included from /Users/teeqemm/Downloads/OData-OData4ObjC-67ed00a/framework/src/MSODataLib/Context/ResourceBox.m:18:
/Users/teeqemm/Downloads/OData-OData4ObjC-67ed00a/framework/src/MSODataLib/Interfaces/ODataEntity.h:34:77: error: method name referenced in property setter attribute must end with ':'
@Property ( nonatomic, assign , getter=getChangeOrder, setter=setChangeOrder) NSInteger changeOrder;
Are you using ios 5? We don't support 5 yet, but really want to.
If you get it to work, please send me a patch. If you don't want to take the time, that's Ok too. I will be working on this in the new year (on vacation now).
If you are using ios 4, then I'm really sorry, and will try to debug it with you as soon as I get back.
Thanks for the bug report. I hope to address it more completely in Jan.
Arlo
Sent from my Windows Phone
From: teeqemm
Sent: 12/27/2011 2:56 AM
To: arlobelshee
Subject: [OData4ObjC] ODataOrgDemo.xcodeproj: ODataEntity.h: Method name referenced in property setter attribute must end with ':' (#3)
Hi,
I cannot compile any of the sample apps, instead I get several dozend errors... it seems that the setter methods are not properly declared (a setter method takes one argument, so it's supposed to be setSomeValue instead of setSomeValue:).
Cheers,
Thomas
CompileC /Users/teeqemm/Library/Developer/Xcode/DerivedData/ODataOrgDemo-gkofidkcljsjqgftzehuzmkbkkpj/Build/Intermediates/MSODataLib.build/Debug-iphonesimulator/MSODataLib.build/Objects-normal/i386/ResourceBox.o Context/ResourceBox.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/teeqemm/Downloads/OData-OData4ObjC-67ed00a/framework/src/MSODataLib
setenv LANG en_US.US-ASCII
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang -x objective-c -arch i386 -fmessage-length=0 -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -std=c99 -Wno-trigraphs -fpascal-strings -O0 -Wreturn-type -Wparentheses -Wswitch -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-shorten-64-to-32 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -fexceptions -fasm-blocks -mmacosx-version-min=10.6 -gdwarf-2 -Wno-sign-conversion -fobjc-abi-version=2 -fobjc-legacy-dispatch "-DIBOutlet=attribute((iboutlet))" "-DIBOutletCollection(ClassName)=attribute((iboutletcollection(ClassName)))" "-DIBAction=void)attribute((ibaction)" -D__IPHONE_OS_VERSION_MIN_REQUIRED=40000 -iquote /Users/teeqemm/Library/Developer/Xcode/DerivedData/ODataOrgDemo-gkofidkcljsjqgftzehuzmkbkkpj/Build/Intermediates/MSODataLib.build/Debug-iphonesimulator/MSODataLib.build/MSODataLib
-generated-files.hmap -I/Users/teeqemm/Library/Developer/Xcode/DerivedData/ODataOrgDemo-gkofidkcljsjqgftzehuzmkbkkpj/Build/Intermediates/MSODataLib.build/Debug-iphonesimulator/MSODataLib.build/MSODataLib-own-target-headers.hmap -I/Users/teeqemm/Library/Developer/Xcode/DerivedData/ODataOrgDemo-gkofidkcljsjqgftzehuzmkbkkpj/Build/Intermediates/MSODataLib.build/Debug-iphonesimulator/MSODataLib.build/MSODataLib-all-target-headers.hmap -iquote /Users/teeqemm/Library/Developer/Xcode/DerivedData/ODataOrgDemo-gkofidkcljsjqgftzehuzmkbkkpj/Build/Intermediates/MSODataLib.build/Debug-iphonesimulator/MSODataLib.build/MSODataLib-project-headers.hmap -I/Users/teeqemm/Library/Developer/Xcode/DerivedData/ODataOrgDemo-gkofidkcljsjqgftzehuzmkbkkpj/Build/Products/Debug-iphonesimulator/include -I/usr/include/libxml2 -I/usr/include/libxml2/libxml -I/Users/teeqemm/Library/Developer/Xcode/DerivedData/ODataOrgDemo-gkofidkcljsjqgftzehuzmkbkkpj/Build/Intermediates/MSODataLib.build/Debug-iphonesimulator
/MSODataLib.build/DerivedSources/i386 -I/Users/teeqemm/Library/Developer/Xcode/DerivedData/ODataOrgDemo-gkofidkcljsjqgftzehuzmkbkkpj/Build/Intermediates/MSODataLib.build/Debug-iphonesimulator/MSODataLib.build/DerivedSources -F/Users/teeqemm/Library/Developer/Xcode/DerivedData/ODataOrgDemo-gkofidkcljsjqgftzehuzmkbkkpj/Build/Products/Debug-iphonesimulator -include /Users/teeqemm/Library/Developer/Xcode/DerivedData/ODataOrgDemo-gkofidkcljsjqgftzehuzmkbkkpj/Build/PrecompiledHeaders/MSODataLib_Prefix-bfvlmgsrblucftdupyusipholzir/MSODataLib_Prefix.pch -MMD -MT dependencies -MF /Users/teeqemm/Library/Developer/Xcode/DerivedData/ODataOrgDemo-gkofidkcljsjqgftzehuzmkbkkpj/Build/Intermediates/MSODataLib.build/Debug-iphonesimulator/MSODataLib.build/Objects-normal/i386/ResourceBox.d -c /Users/teeqemm/Downloads/OData-OData4ObjC-67ed00a/framework/src/MSODataLib/Context/ResourceBox.m -o /Users/teeqemm/Library/Developer/Xcode/DerivedData/ODataOrgDemo-gkofidkcljsjqgftzehuzmkbkkpj/Build/Interm
ediates/MSODataLib.build/Debug-iphonesimulator/MSODataLib.build/Objects-normal/i386/ResourceBox.o
In file included from /Users/teeqemm/Downloads/OData-OData4ObjC-67ed00a/framework/src/MSODataLib/Context/ResourceBox.h:18:
In file included from /Users/teeqemm/Downloads/OData-OData4ObjC-67ed00a/framework/src/MSODataLib/Context/ResourceBox.m:18:
/Users/teeqemm/Downloads/OData-OData4ObjC-67ed00a/framework/src/MSODataLib/Interfaces/ODataEntity.h:34:77: error: method name referenced in property setter attribute must end with ':'
@Property ( nonatomic, assign , getter=getChangeOrder, setter=setChangeOrder) NSInteger changeOrder;
Reply to this email directly or view it on GitHub:
#3
Hi Arlo,
I'm using Xcode 4.2.1 and the problem seems to be independent from the deployment target (probably Apple changed the behavior of the LLVM compiler). Anyway, the fix is simple: just replace the setter declaration in the header files from
@Property ( nonatomic, assign , getter=getChangeOrder, setter=setChangeOrder) NSInteger changeOrder;
to
@Property ( nonatomic, assign , getter=getChangeOrder, setter=setChangeOrder:) NSInteger changeOrder;
(please note the ':' at the end of the setter method name) - the header files look somewhat generated, so maybe you can easily modify the code generation instead of me changing all the files manually ;-)
Cheers,
Thomas
I'm using XCode 4.0.2. I expect you are right about the cause (Apple changed compiler behavior).
You're right: that file is code generated. The generator is in Framework/odatagen. It does a bunch of XSLT to generate those files.
I'll see whether the colon is back-compat to previous versions of XCode, then post a fix.
Same issue here. I hope this is solved soon, if only to prevent having to maintain a separate branch only for this.
The fix is easy, but the testing is taking time. I need to check on both old and new XCode. And I've not got Lion on my main dev machine.
Am trying to get something checked in tomorrow.
Arlo
Sent from my Windows Phone
From: Joan-Lluch
Sent: 1/8/2012 1:47 PM
To: arlobelshee
Subject: Re: [OData4ObjC] ODataOrgDemo.xcodeproj: ODataEntity.h: Method name referenced in property setter attribute must end with ':' (#3)
Same issue here. I hope this is solved soon, if only to prevent having to maintain a separate branch only for this.
Reply to this email directly or view it on GitHub:
#3 (comment)
Hi Arlobelshee,
Thank you very much for your quick reply !
I don't think the issue is with Lion, but with the new LLVM 3.0 compiler. The new compiler is more 'picky' than the older GCC 4.2 (fortunately, in some occasions), but the code compiles just fine with GCC 4.2, with or without the ':' after the setter method names, so from my early observation, just adding colons after the 'setters' should fix the issue in all cases.
For testing, you should be able to install Xcode 4.2 in Snow Leopard too. I have a MacBook with Lion and an iMac with Snow Leopard and I was able to reproduce the issue in both of them (as long as I left the default LLVM 3.0 compiler selected)
Regards,
I've pushed a half of a fix. In the process, however, I found some serious stupid in the code. I have to fix it before I can finish the fix.
This fix updates the code generator to generate valid code. Next I have to re-run it against the various OData servers and regenerate the code. I'll do that tomorrow. But there's an unrelated bug that is currently blocking my doing this right now.
This should now build on latest XCode. Please see whether I've fixed everything. At this point the code generator is correct (at least as far as this defect is concerned - there are others). So if you find more missing colons, please send me a pull request / patch.