apidiff icon indicating copy to clipboard operation
apidiff copied to clipboard

[objc] Category line movement generates non-sensical API diff

Open jverkoey opened this issue 7 years ago • 0 comments

Strange changes when category implementations are shifted down in a file.

Repro case

Before

@interface MDCFlexibleHeaderView: UIView
@property(nonatomic, strong) UIView *someView;
@end

@interface MDCFlexibleHeaderView ()

#pragma mark Accessing the header's views

/** Deprecated. Please register views directly to the flexible header. */
@property(nonatomic, strong, nonnull) UIView *contentView;

@end

After

@interface MDCFlexibleHeaderView: UIView
@property(nonatomic, strong) UIView *someView;
@property(nonatomic, strong) UIView *anotherView;
@end

@interface MDCFlexibleHeaderView ()

#pragma mark Accessing the header's views

/** Deprecated. Please register views directly to the flexible header. */
@property(nonatomic, strong, nonnull) UIView *contentView;

@end

Partial generated output

None of the following is expected to be generated:

#### MDCFlexibleHeaderView()

 *new* category: `MDCFlexibleHeaderView()`

 *removed* category: `MDCFlexibleHeaderView()`

 *modified* property: `contentView` in `MDCFlexibleHeaderView()`

 | Type of change: | parent.usr |
|---|---|
| From: | `c:objc(ext)[email protected]@14009` |
| To: | `c:objc(ext)[email protected]@14344` |

jverkoey avatar Sep 20 '18 19:09 jverkoey