-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Dev 5.3 Micropython bindings #746
Conversation
@kisvegabor Looks like a squash merge would be best here. Otherwise there are going to be a lot of commits in the history. |
@embeddedt squash merge loses history. Why is it important to you to "save" a few commits? Are you willing to lose valuable history for that? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kisvegabor you would need to fix the makefile on lv_mpy project if you move Micropython files.
@amirgon Thank you very much! Ok, I'll fix makefiles we merge it. However I can compile it:
Seems reasonable because this the content of the file: void foo(char * const * arg) {
arg += 1;
(*arg) += 1;
}
void foo2(char ** const arg) {
arg += 1;
(*arg) += 1;
} Have I missed something when moved the project? Regarding the commit history, I agree with @amirgon. The commit messages are clear. I like to see the curve of the development. |
@kisvegabor I'm not sure. I've noticed you updated pycparser version. Could this be related? |
I added submodule again and it cloned the latest version of pycparser. I examined it and found that the issue should be that the pycparser is compiled in Eclipse (I tried to build the PC simulator project with the updates). pycparser has an example and a test folder where there are some "strange" things even an other It seems pycparser is not intended to add to a project this way because the IDE will collect and compile all c files. I can imagine three solutions:
|
@kisvegabor I actually never tried to compile pycparser examples. On Micropython you have to specify explicitly the .c files you want to compile, so I don't see why someone would "accidentally" compile pycparser. |
If you just use lvgl (not to generate mpy bindings but to develop a GUI) the source of pycparser will be in lvgl. |
@kisvegabor Then we also have a problem with Are you sure this is the default behavior in Eclipse - build whatever .c file it finds in whatever subdirectory? |
@amirgon I'm sure that this is the default behavior not only in Eclipse but in the majority of the IDEs. I work this way all the time. Just create a C file, write something in it and build. You can exclude some folders somehow from the build but that is different every IDE and needs extra steps. @embeddedt Can you confirm it? |
@kisvegabor Not in MSVC. There you have to explicitly add a file to a "project" in order for it to compile, which is in my opinion a more sane approach than compiling any file on the disk. Anyway, if that is really the case, I would like to suggest another option: Move the entire |
In Eclipse-based IDEs, you can press F5 to refresh the files from the file system. The other solution is to add links to the folders (or maybe for files) one by one but is hidden deeply in the project properties.
So it would be a new repo for all the bindings? I don't expect that we will have more than 5 bindings in the long term (Mpy, Python, Lua?, Rust?) so it's still reasonable to keep them in one place. I created the repo here: https://github.com/littlevgl/lv_bindings |
@kisvegabor We can start with one repo. You can always split it in the future. Having at least Python and Micropython in the same repo makes sense, not sure what other bindings are on the way. Anyone started working on some other bindings?
Ok. You are going to move all the commit history as well, right? |
Ok, I agree.
I don't know, but I found the Python binding accidentally too. So who knows :)
My view is to completely remove the |
@kisvegabor I think it's important to keep the commit history, for the reasons I mentioned above as a response to @embeddedt. |
@amirgon |
@kisvegabor Ok, I'll give it a try. |
@kisvegabor Yes, it's default behavior to compile everything found in the sub directory. You can exclude files though. @amirgon When squash merging we can retain the history inside the one commit message. We would lose access to individual changes though. I think @kisvegabor should decide, it's his project. |
I vote for leaving the history. The main reason is to show the volume of the work. For example, I often add commits like these:
These 3 commits might change only 5 lines of code. It wouldn't be fair to have only one commit for a huge update like this. |
@kisvegabor That's true. Let's do it that way then. |
Splitting the repos caused git history rewrite. |
…d by LV_ENABLE_GC macro defined in lv_conf.h. When enabled, lv_conf.h should also define LV_MEM_CUSTOM_REALLOC, LV_MEM_CUSTOM_GET_SIZE, LV_GC_INCLUDE and LV_GC_ROOT
…dded support to Symbols using the numstr technique of encoding the characters as a number in an enum. Globals: register them directly witout the need for constructor to access them. Updated example code. Updated lv_mpy.c
…ine funcs, this exposes them to Micropython. If enum member is a number (as in OPA), prefix it by underscore to create a valid python attribute. Bugfix: when returning to a struct by value, copy it first. lv_mpy.c renamed to lv_mpy_example.c since the actual lv_mpy.c should be generated by the build script automatically based on current H files and lv_conf.h
…hem, not instead of them
…d to another repository and history rewritten
It seems good to me now. lvgl is compiling in Eclipse too and the history seems good as well. |
@kisvegabor Could you |
@amirgon Done. |
@kisvegabor Nice. |
Merged! |
@kisvegabor Great! |
Yes. I merged the |
@kisvegabor Sure, just please make sure you move it with all the history. |
GitHub has a |
No description provided.