Originally created by @ThibaultVlacich on GitHub (Sep 6, 2016).
Hello,
I have a very strange bug with CoreStore. I'm using it through Cocoapods, and if I'm adding the "DEBUG" flag, I start getting that kind of errors from CoreStore :
CoreStore/Saving and Processing/BaseDataTransaction.swift:455:63: Use of undeclared type 'GCDQueue'
CoreStore/Saving and Processing/BaseDataTransaction.swift:447:18: Could not infer type for 'childTransactionQueue'
...
Here what I've added to my Podfile to have the debug flags :
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'CoreStore'
target.build_configurations.each do |config|
if config.name == 'Debug'
config.build_settings['OTHER_SWIFT_FLAGS'] = '-D SWIFT_DEBUG -DDEBUG'
else
config.build_settings['OTHER_SWIFT_FLAGS'] = ''
end
end
end
end
end
I also tried -D DEBUG instead of -DDEBUG without success. Just having the -D SWIFT_DEBUG works (in the means that it compiles), but I do not have any logging from CoreStore.
So that means that I can't use the CoreStore logger (because there is an #if DEBUG before every logging action). Any idea how I can fix that and have a working logger ?
Originally created by @ThibaultVlacich on GitHub (Sep 6, 2016).
Hello,
I have a very strange bug with CoreStore. I'm using it through Cocoapods, and if I'm adding the "DEBUG" flag, I start getting that kind of errors from CoreStore :
```
CoreStore/Saving and Processing/BaseDataTransaction.swift:455:63: Use of undeclared type 'GCDQueue'
CoreStore/Saving and Processing/BaseDataTransaction.swift:447:18: Could not infer type for 'childTransactionQueue'
...
```
Here what I've added to my Podfile to have the debug flags :
```
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'CoreStore'
target.build_configurations.each do |config|
if config.name == 'Debug'
config.build_settings['OTHER_SWIFT_FLAGS'] = '-D SWIFT_DEBUG -DDEBUG'
else
config.build_settings['OTHER_SWIFT_FLAGS'] = ''
end
end
end
end
end
```
I also tried `-D DEBUG` instead of `-DDEBUG` without success. Just having the `-D SWIFT_DEBUG` works (in the means that it compiles), but I do not have any logging from CoreStore.
So that means that I can't use the CoreStore logger (because there is an `#if DEBUG` before every logging action). Any idea how I can fix that and have a working logger ?
adam
added the fixed label 2025-12-29 15:23:45 +01:00
I think the problem is you are overwriting the OTHER_SWIFT_FLAGS instead of appending to it. CoreStore declares -D USE_FRAMEWORKS that it uses to conditionally-import GCDKit
But you're right, I should probably declare DEBUG within CoreStore itself.
@JohnEstropia commented on GitHub (Sep 6, 2016):
Hi, thanks for the feedback!
I think the problem is you are overwriting the `OTHER_SWIFT_FLAGS` instead of appending to it. CoreStore declares `-D USE_FRAMEWORKS` that it uses to conditionally-import GCDKit
```
#if USE_FRAMEWORKS
import GCDKit
#endif
```
Try adding
```
config.build_settings['OTHER_SWIFT_FLAGS'] = '-D SWIFT_DEBUG -D DEBUG -D USE_FRAMEWORKS'
```
But you're right, I should probably declare DEBUG within CoreStore itself.
@ThibaultVlacich commented on GitHub (Sep 7, 2016):
Indeed, thanks ! I should have checked the podspec file to see that.
I can make you a pull request to add the DEBUG flag in Debug config if you want.
@ThibaultVlacich commented on GitHub (Sep 7, 2016):
Indeed, thanks ! I should have checked the podspec file to see that.
I can make you a pull request to add the DEBUG flag in Debug config if you want.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @ThibaultVlacich on GitHub (Sep 6, 2016).
Hello,
I have a very strange bug with CoreStore. I'm using it through Cocoapods, and if I'm adding the "DEBUG" flag, I start getting that kind of errors from CoreStore :
Here what I've added to my Podfile to have the debug flags :
I also tried
-D DEBUGinstead of-DDEBUGwithout success. Just having the-D SWIFT_DEBUGworks (in the means that it compiles), but I do not have any logging from CoreStore.So that means that I can't use the CoreStore logger (because there is an
#if DEBUGbefore every logging action). Any idea how I can fix that and have a working logger ?@JohnEstropia commented on GitHub (Sep 6, 2016):
Hi, thanks for the feedback!
I think the problem is you are overwriting the
OTHER_SWIFT_FLAGSinstead of appending to it. CoreStore declares-D USE_FRAMEWORKSthat it uses to conditionally-import GCDKitTry adding
But you're right, I should probably declare DEBUG within CoreStore itself.
@ThibaultVlacich commented on GitHub (Sep 7, 2016):
Indeed, thanks ! I should have checked the podspec file to see that.
I can make you a pull request to add the DEBUG flag in Debug config if you want.
@JohnEstropia commented on GitHub (Sep 7, 2016):
That is awesome! Thanks!
@JohnEstropia commented on GitHub (Sep 7, 2016):
@ThibaultVlacich pushed your code to v2.0.5 👍