-
Notifications
You must be signed in to change notification settings - Fork 132
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
sloeber.cfg is not enough for version control #1425
Comments
First of all: it is great to see the version control functionality is used
I agree to that. This is why #1268 is named "Better support for version control"
Given this issue consider to add
I'm saying "consider to add" because of following reasons
So in the LED_Display2 snapshot the examples and extra folders should be excluded by default. I do not understand the pForth problem you mention FYI I tried to record the importing of the project but it did not contain a sloeber.cfg :-( |
First - let me say thank you for your reply, and for your work on Sloeber. As a long time Eclipse user on embedded systems, I really appreciate the effort that has gone into this, and I'd prefer not to have to move to VSCode :-)
Agreed. It would be better not to have to exclude library example folders manually. Even though I've been doing this for a long time, it still took me several hours to realise what was going on; I almost gave up.
Sorry for my bad explanation. Let me try again. There might be "user" sources files or folders with source files that cannot be built on the Arduino. For example in pForth there is:
These need to be excluded in the Eclipse build. Just deleting these files/folders is possible, but generally is a bad idea because you are effectively forking the code for different use cases. Hence the normal option is to use Resource Configuration->Exclude form build in Eclipse. There is another "user" use-case for this:
I haven't added the sloeber.cfg to GitHub. I wanted you to convert this from the native Arduino IDE format to Sloeber, and hence it would add the libraries, etc. and duplicate what I saw. I don't think this matters too much - you understand the problems I saw (example library files).
I understand. On a standard embedded Eclipse CDT project I commit the .project and .cproject files into Git. Although they are not very easy to review (and on big projects causes merge conflicts), this is standard practice - I'm sort of surprised Sloeber is taking a different approach. (cproject especially is pain, but basically is unavoidable). References: |
Worked great on my system. rofl
Well .... lets say ... I do not always agree with CDT/eclipse policies views. Given that Arduino IDE and Sloeber both can start from a ino and add the boards and menu options I thought storing this info is a first good step to get version control easier to use. Given that it is a human readable text file it is less of a problem to convince repository owners to add it to the repository (compared to .project .cproject .sproject and the settings folder).
We are here in the area of what Sloeber calls private libraries and private hardware. Private libraries and hardware on the other hand can by anything from a zip file to a version controlled repository.
I see this as a realistic scenario. I'd doubt it is frequent though and probably a consequence of bad housekeeping. And less priority than multiple versions of the same library and support for libraries in the sloeber.cfg file. |
Bug Summary
Sloeber.cfg does not include information about folders or files excluded from the build.
Environment
Sloeber 4.4.0.202102222152 io.sloeber.product null
OS: MacOS 11.6
Bug Description
To get a project previously built under Arduino IDE to build in Sloeber, some Library folders that need to be excluded. This is both entire libraries and some sub-folders of libraries (e.g. examples). This is not obvious, but it possible to resolve with some thought in Sloeber.
However a simple project in version control cannot be created that can be built without a lot of work or instructions because sloeber.cfg doesn't contain the information about excluded files/folders. This is the bug reported here. (although the library problem might be a separate bug or something to consider.)
Additionally user source files and folders that should be excluded are also not recorded. This basically the same bug as above.
To Reproduce
To reproduce clone this project and add new project to Sloeber. The configure to mbed_nano/2.6.1 with the Board as 'Arduino Nano 33 BLE'.
See the folders here that are excluded:
This is the same in any project, in this case it's a pForth build where some files and folders are not applicable (for other platforms).
Expected behaviour
We should record excluded files/folders in the project settings so other users can easily rebuild from a cloned project.
Potential Workaround
Add .project and .cproject into version control.
References to Existing issues about version control
The text was updated successfully, but these errors were encountered: