-
Notifications
You must be signed in to change notification settings - Fork 34
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
Dependency problem on AVR specific #include. #251
Comments
Can you post the output from the unit test run? The libraries that you list in the config file refer to the names that the library manager would use, not paths on disk. If |
This log is from the DS28CM00 library [this is an ID chip] - https://github.com/RobTillaart/DS28CM00/tree/arduino-ci
The problem 3 is expected and need to be fixed. I will merge [2] and [3] and use conditional compilation. |
@per1234 does the use of I'm tempted to close this as "works as intended", with limiting the set of test platforms & adding preprocessor directives being the proper remedy. But I want to double check that assumption. |
|
Hmm. I'll probably deprioritize this then, sorry Rob. My reasoning here is that it seems fruitless to try and replicate all functions that might exist in any platform library (vs existing in the "core" set of Arduino library functions). I had enough trouble with the AVR side of things, and don't want to go further down that path unless/until I can find a smarter way to do it. I can revisit this if there is movement on arduino/arduino-cli#1090 or arduino/arduino-cli#1092 |
OK, but as the OneWire library is used for several devices / libraries, all these will be affected. If I find a workaround I will let you know. |
I won't close it. It's definitely something that needs to be addressed and the good news is that there are a few ways to address it. I just have to figure out which of the possible workarounds is the appropriate one and/or whether the approach in OneWire is (or isn't) considered a best practice. |
@per1234 regarding "undocumented API", would you say that something like But what assurance do I have that this macro will always be provided by the core? My brief google search for anything in the online arduino reference documentation was unsuccessful. |
This is definitely a problem. It's difficult to say whether some of these things are undocumented because nobody ever got around to documenting them (or even creating a place to document them, since this is not something you would want to expose a beginner to), or if it was only ever intended for internal use by the core library. There is a request for a more comprehensive documentation of the platform interface here: arduino/arduino-cli#985 |
Arduino was intended to learn people to do fun stuff, this level of coding was explicitly the level they wanted to hide, not only for beginners but for everyone. For the libraries / unit test, I can live perfectly with some things that won't work in a unit test. Should not be too much of course, but when developing I often depend on testing with real hardware (sensor etc). The unit tests are most valuable for PR's fro 3rd parties to check they didn't break too much. For me the compilation of examples are the top priority, as these are the starting points for the users of the libs. |
Hi,
am struggling with a library - https://github.com/RobTillaart/DS18B20_INT
The library needs the "OneWire: so I adapted .arduino-ci.yml
The example of the lib now compiles correctly, however the unit test fails on util/crc16.h which is used by the OneWire lib.
The path (on my PC) is ...\Arduino\hardware\tools\avr\avr\include\util\crc16.h but I do not know how to include it in the unit test.
It might be a feature that need to be solved in the future.
For now I will disable the unit test.
The text was updated successfully, but these errors were encountered: