CHCSVParser icon indicating copy to clipboard operation
CHCSVParser copied to clipboard

In xcode 6 beta4 building shows a couple of warnings

Open philosopherdog opened this issue 11 years ago • 12 comments

  1. CHCSVParser.m:862:1: Designated initializer missing a 'super' call to a designated initializer of the super class
  2. CHCSVParser.m:863:18: Designated initializer should only invoke a designated initializer on 'super'

philosopherdog avatar Aug 04 '14 20:08 philosopherdog

I noticed this too in Xcode 6 and I've fixed it in my fork and created a pull request. See https://github.com/davedelong/CHCSVParser/pull/68

edwardmp avatar Sep 10 '14 13:09 edwardmp

Hopefully it gets merged in!

philosopherdog avatar Sep 11 '14 16:09 philosopherdog

I hope so too, but the warnings are pretty harmless but nonetheless annoying.

edwardmp avatar Sep 11 '14 17:09 edwardmp

Yeh, please merge this. Quite an aggressive warning by X-Code though.

rhummelmose avatar Oct 21 '14 12:10 rhummelmose

Not a big issue.. but I would love to see it fixed!

yoasha avatar Nov 28 '14 07:11 yoasha

Bumb. I believe in zero-warnings code policy.

jomnius avatar Dec 12 '14 21:12 jomnius

I'm just looking this problem over again. The issue is that - (instancetype)initWithObjects:(const id [])objects forKeys:(const id<NSCopying> [])keys count:(NSUInteger)cnt is the designated initializer in the superclass and this subclass overrides this method and calls an overridden convenience initializer from this overridden designated initializer. So, we've switched the designated initializer from that found in the superclass to the subclass. I'm not entirely sure how to solve this, but one workaround is to override this method with an NSAssert to prevent it from being called directly from CHCSVParser. You could just comment out this overridden designated initializer but then I suppose it's possible that somebody could call this method from CHCSVParser and generate an unexpected result. Please let me know your thoughts, if that seems like a reasonable approach I'll do a pull request with the solution.

philosopherdog avatar Jan 31 '15 16:01 philosopherdog

I am no longer seeing warnings in Xcode 6, so I guess this issue can be closed @davedelong.

edwardmp avatar Feb 28 '15 16:02 edwardmp

I'm still seeing it in the release version of Xcode 6.

philosopherdog avatar Feb 28 '15 18:02 philosopherdog

You are right; my dependency manager still used my own fixed branch. It seems @davedelong has implemented a fix, however CocoaPods.spec is still set to the tag 2.1.0 of July 2014 so any commits after that are not included. If @davedelong would release a new tag, the warnings would disappear.

edwardmp avatar Feb 28 '15 19:02 edwardmp

As a workaround you could temporarily use this in your Podfile: pod 'CHCSVParser', :git => 'https://github.com/davedelong/CHCSVParser.git'

This just uses the master branch instead of tags

edwardmp avatar Feb 28 '15 19:02 edwardmp

Ok, cool. @edwardmp thanx for the info.

philosopherdog avatar May 28 '15 17:05 philosopherdog