Git Product home page Git Product logo

Comments (7)

jacobkeeler avatar jacobkeeler commented on July 19, 2024 1

I've run into several small issues (primarily with unit tests) which were caused by the mandatory field being omitted when it really should have been set to false. An example of this is the "GPSData" struct, which has optional parameters in the HMI_API, but not the MOBILE_API (due to omitting the field in each parameter).

Forcing this field to be included would fix those issues and prevent future issues of the same nature (so long as each parameter missing this field is reevaluated when this is implemented).

It seems to me that it would have been significantly clearer if the default value for mandatory was false in the first place. Optional parameters seem like the more likely case, and parameters being optional by default also seems like the more common convention.

I've been told that the reason that true was the original default value was that the mandatory parameter was added after the fact, meaning that optional parameters didn't exist in the protocol to start with. This might introduce complications if the default value were changed directly to false, but it seems counterintuitive to leave it as true.

In any case, I do not think that the change proposed would really affect the verbosity of the spec a great deal (most parameters seem to have the field already), and I believe it would increase the clarity of the spec in many places. As such, I believe this proposal should be accepted.

I am also of the opinion that if this proposal were to be accepted, it should be done to both the MOBILE_API and the HMI_API, and that this convention should be enforced by the InterfaceGenerator so that the field is not omitted in the future.

from sdl_evolution.

stefanek22 avatar stefanek22 commented on July 19, 2024

The proposal makes sense and has been a longstanding housekeeping task in the Mobile API. Till now, the accepted rule has been that if the mandatory flag was not specified, the parameter was mandatory by default. This proposal should remove the implicit rule and clarify the status for all parameters going forward.

from sdl_evolution.

joeljfischer avatar joeljfischer commented on July 19, 2024

My only concern is that this makes the spec considerably more verbose. I would have preferred to have language in the spec that defines that parameters are mandatory by default and only optional parameters are specified as such. All parameters that are mandatory would then not have the mandatory flag at all. That should be just as clear, but would be less verbose.

I believe this proposal should be rejected.

EDIT: Considering the comments below, I have altered my opinion. I would still like to see one or the other of mandatory be a default value and for this to be strictly enforced, but I agree that this proposal is better than the current alternative.

I believe this proposal should be accepted.

from sdl_evolution.

robinmk avatar robinmk commented on July 19, 2024

Agree to the proposal and the same should be applicable to HMI_API as well

from sdl_evolution.

mrapitis avatar mrapitis commented on July 19, 2024

The proposal is reasonable and I agree that the mandatory flag should be explicitly included for each parameter. In the past the omission of the flag has caused confusion among developers and team members.

from sdl_evolution.

theresalech avatar theresalech commented on July 19, 2024

Based on the comments left on this issue, the Steering Committee has accepted this proposal.

from sdl_evolution.

theresalech avatar theresalech commented on July 19, 2024

Issues entered:
Core
RPC

from sdl_evolution.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.