-
Notifications
You must be signed in to change notification settings - Fork 121
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
[Accepted with Revisions] SDL 0234 - Proxy Library RPC Generation #741
Comments
First of all I support this proposal. Obviously this proposal is not mentioned in #742 or vice versa but if both proposal are accepted it should be noted that the JavaScript library should be included with the code generator.
I guess we could have the repo rpc_spec added as a git submodule. This would be handy as it's clear what rpc spec version each library is based of.
I want to note that https://github.com/smartdevicelink/sdl_core/tree/master/tools/InterfaceGenerator exist. So we already have core doing what this proposal is suggesting. Having code generation for Core, iOS and Java we have 3 (in future also JavaScript we have 4) platforms of code generation.
I believe I don't understand this point. Are you saying the XML parsing code is identical and the code that exports RPC classes is different per platform? I would suggest to have the parsing code to be part of the rpc_spec repository and this repository should be a git submodule. Otherwise we would have identical copies of source files in each repo adding unnecessary maintenance burden. |
| 1 / 3. I agree with this and would like to have it as a revision. That way we have an rpc version tagged and can reuse the XML parser and only need to create change the code generator. |
Just for my own understanding, the idea is to have a separate repo that can generate code for various platforms. Then that code would be added to the projects? Or are you intending this parser be part of each library (or added as a dependency) that builds the RPC classes at compile time? Is this only used when updated RPC specs or every compile? Will the parser also create tests for the RPCs or will we manually write tests? |
I understand that the proposal is a bit confusing. The is the current iteration of the idea:
|
|1/3. Agreed. |2. I'm concerned that we're stuffing unnecessary things into the libraries (sample code, RPC class generators) that are irrelevant for actual implementations. I think we should strongly consider making this its own repository. |4. Agreed. Automatically generating unit tests for generated RPCs/classes goes against the principle of unit testing :) Unit tests should be manually created. |
|2. To just briefly touch on the sample code thing – that's a common practice in iOS library circles because it allows testing of the library while developing the library through running the example app which builds and links the library code. Every iOS library that has example code that I'm aware of does this. Otherwise you'd have to symlink or use submodules and it just gets much messier. Regarding the RPC class generators. The main reason for not putting it into its own repository is: a. Theres little to no code overlap, so it doesn't really gain us anything. b. If the generator is in a different repository, there's "secret knowledge" about the library that someone needs to know to, for example, update an RPC. c. If that repository was added as a submodule, it would contain unrelated RPC generators. d. If the repository is not added as a submodule, then we would need to generate the code, then copy and paste in the new code whenever we want to generate updated code. This is less ideal than simply setting up the script to replace the existing files when the generator is run. Based on all of these factors, I think it makes much more sense to have the RPC generator in each app library's repository. EDIT: The only alternative I can think of to not have it in each individual repository would be to have it in the |
@joeljfischer I can get behind putting the RPC generators in each library's repository for the reasons you mentioned. -- I'm still against putting sample projects into the library repositories for two main reasons, but my opinion about this should have no impact to this particular proposal. Perhaps this should be decided on a per-library basis to accommodate the best practices of creating modules for each target platform/language.
|
The Steering Committee voted to approve this proposal with the following revision: there will be parsing code in each repository, and the rpc spec will be a submodule that pins which rpc spec will be used in each version of the library. |
@joeljfischer please advise when a new PR has been entered to update the proposal to reflect the agreed upon revisions. I'll then merge the PR so the proposal is up to date, and update issues in the respective repositories for implementation. Thanks! |
Proposal has been updated to include requested revisions, and implementation issues have been entered: |
Additional impacted platforms: |
Hello SDL community,
The review of "SDL 0234 - Proxy Library RPC Generation" begins now and runs through May 28, 2019. The proposal is available here:
https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0234-proxy-rpc-generation.md
Reviews are an important part of the SDL evolution process. All reviews should be sent to the associated Github issue at:
#741
What goes into a review?
The goal of the review process is to improve the proposal under review through constructive criticism and, eventually, determine the direction of SDL. When writing your review, here are some questions you might want to answer in your review:
Please state explicitly whether you believe that the proposal should be accepted into SDL.
More information about the SDL evolution process is available at
https://github.com/smartdevicelink/sdl_evolution/blob/master/process.md
Thank you,
Theresa Lech
Program Manager - Livio
[email protected]
The text was updated successfully, but these errors were encountered: