Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPC spec generator should not add deprecated parameters to generated inits #1722

Closed
NicoleYarroch opened this issue Jul 23, 2020 · 0 comments
Assignees
Labels
bug A defect in the library rpc-spec-generator Relating to the RPC spec generator

Comments

@NicoleYarroch
Copy link
Contributor

Bug Report

The RPC spec generator should not add pragmas to suppress deprecated parameters around generated inits. Instead the generated init should not include the deprecated parameter.

For example:
In SDLGetVehicleData.h the generator wraps the generated inits with push/pop pragmas to suppress deprecated warnings when it should not. The init also includes fuelLevel and fuelLevel_State, which are both deprecated.

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- (instancetype)initWithGps:(nullable NSNumber<SDLBool> *)gps speed:(nullable NSNumber<SDLBool> *)speed rpm:(nullable NSNumber<SDLBool> *)rpm fuelLevel:(nullable NSNumber<SDLBool> *)fuelLevel fuelLevel_State:(nullable NSNumber<SDLBool> *)fuelLevel_State instantFuelConsumption:(nullable NSNumber<SDLBool> *)instantFuelConsumption fuelRange:(nullable NSNumber<SDLBool> *)fuelRange externalTemperature:(nullable NSNumber<SDLBool> *)externalTemperature turnSignal:(nullable NSNumber<SDLBool> *)turnSignal vin:(nullable NSNumber<SDLBool> *)vin prndl:(nullable NSNumber<SDLBool> *)prndl tirePressure:(nullable NSNumber<SDLBool> *)tirePressure odometer:(nullable NSNumber<SDLBool> *)odometer beltStatus:(nullable NSNumber<SDLBool> *)beltStatus bodyInformation:(nullable NSNumber<SDLBool> *)bodyInformation deviceStatus:(nullable NSNumber<SDLBool> *)deviceStatus driverBraking:(nullable NSNumber<SDLBool> *)driverBraking wiperStatus:(nullable NSNumber<SDLBool> *)wiperStatus headLampStatus:(nullable NSNumber<SDLBool> *)headLampStatus engineTorque:(nullable NSNumber<SDLBool> *)engineTorque accPedalPosition:(nullable NSNumber<SDLBool> *)accPedalPosition steeringWheelAngle:(nullable NSNumber<SDLBool> *)steeringWheelAngle engineOilLife:(nullable NSNumber<SDLBool> *)engineOilLife electronicParkBrakeStatus:(nullable NSNumber<SDLBool> *)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSNumber<SDLBool> *)cloudAppVehicleID eCallInfo:(nullable NSNumber<SDLBool> *)eCallInfo airbagStatus:(nullable NSNumber<SDLBool> *)airbagStatus emergencyEvent:(nullable NSNumber<SDLBool> *)emergencyEvent clusterModeStatus:(nullable NSNumber<SDLBool> *)clusterModeStatus myKey:(nullable NSNumber<SDLBool> *)myKey;
#pragma clang diagnostic pop
Reproduction Steps
  1. Run the generator script in the "generator" folder of the library.
Expected Behavior

The inits for each class or struct should be generated correctly.

Observed Behavior

If the class or struct has a deprecated parameter, the inits include the deprecated parameters and are wrapped with a push/pop pragma to suppress the deprecated warning.

OS & Version Information
  • iOS Version: n/a
  • SDL iOS Version: 6.6
  • Testing Against: n/a
@NicoleYarroch NicoleYarroch added bug A defect in the library rpc-spec-generator Relating to the RPC spec generator labels Jul 23, 2020
@NicoleYarroch NicoleYarroch self-assigned this Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A defect in the library rpc-spec-generator Relating to the RPC spec generator
Projects
None yet
Development

No branches or pull requests

2 participants