Comments (7)
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.
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.
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.
Agree to the proposal and the same should be applicable to HMI_API as well
from sdl_evolution.
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.
Based on the comments left on this issue, the Steering Committee has accepted this proposal.
from sdl_evolution.
from sdl_evolution.
Related Issues (20)
- [Withdrawn] SDL 0330 - App Service Subscription Resumption HOT 8
- [Accepted] Revise SDL-0296 Possibility to update video streaming capabilities during ignition cycle HOT 9
- [Withdrawn] Revise SDL 0280 - Adding new parameter of requiresAudioSupport and BluetoothDeviceAddress HOT 14
- [Withdrawn] SDL 0331 - Add new SDL System Structure using Mediation Application for middle/low-end class model of Powered Two Wheeler and low-cost vehicle models HOT 22
- [Accepted with Revisions] SDL 0332 - Additional Video Streaming Capabilities Validation HOT 8
- [Accepted] SDL 0333 - Handle Scenario Where no Valid Cert is Available HOT 18
- [Accepted with Revisions] SDL 0334 - Transform SetDisplayLayout requests into UI.Show for HMIs HOT 5
- [Accepted with Revisions] SDL 0335 - Limit TextField Length According to HMI Capabilities HOT 16
- [Accepted] SDL 0336 - Strict Versioning for Outgoing Core Messages HOT 16
- [Accepted] SDL 0337 - Reject PROPRIETARY/HTTP SystemRequests when PTU is not in progress HOT 3
- [Accepted] SDL 0338 - Remove Unused Files From SDL Core HOT 1
- [Accepted] SDL 0338 Revisions - Remove Unused Files From SDL Core HOT 1
- [Accepted] SDL 0339 - Replace `thread::Thread` implementation with `std::thread` from C++11 HOT 8
- [Accepted] SDL 0340 - ATF Selenium Support HOT 10
- [Accepted] SDL 0341 - Add Generic HMI Plugin Support HOT 26
- [Accepted] SDL 0342 - Remove Policy Mode Option From SDL Core HOT 6
- [Withdrawn] SDL 0343 - Add Notifications for Required App Support HOT 31
- [Accepted] SDL 0338 Revisions - Remove Unused Files From SDL Core HOT 1
- [Accepted] SDL 0344 - Use Promises in Server Logic of SDL Policy Server HOT 2
- [Accepted] SDL 0345 - Android 12 Issues HOT 26
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sdl_evolution.