Skip to content

Adding KVStore Examples for Global API #8863

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

Merged
merged 2 commits into from
Nov 28, 2018

Conversation

offirko
Copy link
Contributor

@offirko offirko commented Nov 25, 2018

Description

KVStore Examples for Global API
(https://github.com/ARMmbed/mbed-os-example-kvstore)

Pull request type

[ ] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[X] Docs update
[ ] Test update
[ ] Breaking change

@offirko
Copy link
Contributor Author

offirko commented Nov 25, 2018

@cmonr , @0xc0170 , @AnotherButler , @dannybenor - I'd appreciate your review - thanks.

@dannybenor
Copy link

@MarceloSalazar @ashok-rao @adbridge Please review

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 25, 2018

Repositories should follow what we have in this repo.

@dannybenor
Copy link

@0xc0170 we will do.
BTW, I did not find any example that follows both instructions. https://github.com/ARMmbed/mbed-os-example-blinky is not following any of them.

@offirko
Copy link
Contributor Author

offirko commented Nov 25, 2018

@0xc0170 - added license and contribution information and files

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 26, 2018

BTW, I did not find any example that follows both instructions. https://github.com/ARMmbed/mbed-os-example-blinky is not following any of them.

Correct, the intention is the new repositories should follow it (we check them manually at the moment). We might do a cleanup of current repo in the next feature release (and having automatic check for license + contributing).

It is partially covered here : https://github.com/ARMmbed/mbed-os-5-docs/blob/development/docs/reference/contributing/guidelines/guidelines.md#contributing-guidelines . I'll send an update to the docs to state it explicitly there.

Update: I've sent PR to add it to the docs: ARMmbed/mbed-os-5-docs#848

@0xc0170 0xc0170 requested a review from a team November 26, 2018 10:22
@MarceloSalazar
Copy link

MarceloSalazar commented Nov 26, 2018

@offirko @dannybenor Can you help me to understand the differences between the examples?

I assume mbed-os-example-kvstore is the one that would be used by most developers, whether mbed-os-example-kvstore-class-api is using low-level APIs? is this correct?
Do we really need the latter as an example?
Also it feels there is lots of repetition

@dannybenor
Copy link

@MarceloSalazar The examples are for customers and your are their representative.
We will be more than happy to remove the class API example. Just say the word :)

@offirko
Copy link
Contributor Author

offirko commented Nov 26, 2018

@MarceloSalazar - it kinda reminds fopen/fwrite/fread -vs-open/write/read .. both are used

@cmonr
Copy link
Contributor

cmonr commented Nov 27, 2018

@dannybenor I'm alright with adding another example, but would you/your team be willing to compact these two examples into a single repo? Something like what NFC does with theirs?

Reference: https://github.com/ARMmbed/mbed-os-example-nfc

Similar to @MarceloSalazar's thoughts, it seems like the two are closely related.

@dannybenor
Copy link

They were in a single repo. @MarceloSalazar asked for the separation to support online compiler...

@cmonr
Copy link
Contributor

cmonr commented Nov 27, 2018

They were in a single repo. @MarceloSalazar asked for the separation to support online compiler...

OH. Well then.

@cmonr
Copy link
Contributor

cmonr commented Nov 27, 2018

So here's an idea. No one is saying that we don't want the examples.
For the time being, I'm going to start CI, and if we remove one of the examples, then so be it. This should at least let us progress this PR.

Might need other @ARMmbed/mbed-os-maintainers and @MarceloSalazar to chime in. Didn't know the part about wanting the split for the online compiler, although that sounds odd.

@MarceloSalazar
Copy link

Thanks for splitting the examples. This greatly helps with the review of the docs and application when using both Mbed CLI and Online Compiler. Otherwise, we'd need to do a number of hacks (git clone, delete folders, ets), which is not great for users. We should just use mbed import ...

My main request right now is to clarify the name of the mbed-os-example-kvstore-class-api example to make it a bit more clear what's intended for - this will let us proceed to merge this PR asap. Any ideas?
Later on you can add a bit more context to the docs.

@dannybenor
Copy link

@MarceloSalazar The name reflects exactly what the example is. It is clear that kvstore is the key that you will look for in the documentation if you don't know what it is. I believe people looks for examples like this when they want to use some Mbed OS functionality. Kvstore is the name of this functionality. Recommend to leave the name as is.

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 27, 2018

This will soon complete the CI (expecting green).

Please finalize reviews soon

My addition - also not sure about class-api example - shouldn't this be in docs rather (we provide code snippets in the doxygen docs for class, also docs pages have own documentation where this code can live) ? or will be linked there as own example?

@MarceloSalazar
Copy link

My addition - also not sure about class-api example - shouldn't this be in docs rather (we provide code snippets in the doxygen docs for class, also docs pages have own documentation where this code can live) ? or will be linked there as own example?

I like the idea of code snippets in the docs for this class-api example, as it's a reference for a different kind of users but probably not the example that most people will be using as starting point.

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 27, 2018

Looks like exporters will fail

compiling main.cpp...
linking...
.\.link_script.sct(47): error: L6236E: No section matches selector - no section to be FIRST/LAST.
.\.link_script.sct(51): error: L6236E: No section matches selector - no section to be FIRST/LAST.
Not enough information to list image symbols.
Not enough information to list load addresses in the image map.

There's assembling startup_LPC54114_cm4.S... so why is this failing is weird (blinky example is this one).

I am going to fetch this locally, have seen this failure yesterday somewhere. This indicates there's missing startup file. not related to this PR

cc @OPpuolitaival

@mbed-ci
Copy link

mbed-ci commented Nov 27, 2018

Test run: SUCCESS

Summary: 4 of 4 test jobs passed
Build number : 1
Build artifacts
Build logs

@0xc0170 0xc0170 requested a review from bulislaw November 27, 2018 11:37
@0xc0170
Copy link
Contributor

0xc0170 commented Nov 27, 2018

@bulislaw Please review above comments about class-api example

@bulislaw
Copy link
Member

I agree, I don't like idea of proliferating examples as that introduces maintenance burden. One should be enough and we can extend the docs (not necessarily for 5.11 if there's no time)

@dannybenor
Copy link

OK. I understand now that I know nothing about the goal of the examples. Will be good to get an explanation at some point why we do not want an example for 3 new classes, with customer facing API added in 5.11.
@offirko please remove the link to the class example

@offirko
Copy link
Contributor Author

offirko commented Nov 27, 2018

@offirko offirko changed the title Adding KVStore Examples for Global and Class APIs Adding KVStore Examples for Global API Nov 27, 2018
@0xc0170
Copy link
Contributor

0xc0170 commented Nov 27, 2018

Starting CI now

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 27, 2018

I believe @MarceloSalazar this as approved, so started CI to get this through asap

@mbed-ci
Copy link

mbed-ci commented Nov 27, 2018

Test run: SUCCESS

Summary: 4 of 4 test jobs passed
Build number : 2
Build artifacts
Build logs

@cmonr
Copy link
Contributor

cmonr commented Nov 27, 2018

Restarting export CI job.

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 28, 2018

Restarted exporters job after jenkins was restarted

@0xc0170 0xc0170 merged commit c0108b1 into ARMmbed:master Nov 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants