Comments (2)
Just for reference, the workaround when using the Arduino CLI is:
arduino-cli lib install "OpenMV Arduino RPC" --no-deps
(But then one must install the other valid dependencies manually)
from arduino-lint.
Considerations
There are some factors to consider related to enforcement of LP048:
Dependent libraries might be submitted in parallel
If LP048 was made a requirement for library registry submissions, the library maintainer would need to submit these separately, and they would need to be accepted in the correct order, with the correct timing between submissions to allow the previous submission to propagate into http://downloads.arduino.cc/libraries/library_index.json
So this would make the registry less friendly to the library maintainers, and more work for the registry maintainers.
LP048 is not run by arduino/libraries-repository-engine
For performance reasons, Arduino Lint is configured to skip the download of http://downloads.arduino.cc/libraries/library_index.json (#170) when arduino/libraries-repository-engine
is using it to lint the library releases:
Since LP048 relies on the data from library_index.json
, it is disabled when Arduino Lint is in this mode (#173).
This means that there would be some technical challenges to enforcing LP048 on new releases added to Library Manager.
Previously valid depends
configurations may be broken by external actions
Library maintainers are allowed to remove or rename their libraries. This breaks the depends
fields of any libraries that referenced it.
Conclusion
The problems mentioned above center around the use of the rule by the Library Manager system. If we only want to more strongly encourage people to properly use and maintain the depends
field, LP048 can be configured to be more strict, while keeping it at a warning for Library Manager submissions and disabled for Library Manager releases.
Since the Library Manager system uses Arduino Lint with the --compliance=permissive
flag, this means there are two options for how strict to make Arduino Lint about it:
- Error at both "specification" and "strict" compliance settings
- Error only at the "strict" compliance setting
Even though the Arduino Library Specification does not explicitly state that the referenced libraries must be in Library Manager, I think it is implicit, and thus reasonable to consider an error even at the "specification" setting.
The issue of false positives during development of dependent libraries in preparation for submission to the registry could be mitigated by configuring LP048 as an error only when Arduino Lint is used with the [--library-manager=update
](https://arduino.github.io/arduino-lint/dev/#library-manager-setting
When trying to install such libraries from the IDE 2.0, it will just refuse to install them without providing any error.
This is tracked at arduino/arduino-ide#621
Other fixes could be to implement ways to bypass this check at library installation time in CLI and IDE.
I think the current behavior of Arduino CLI in this situation is reasonable for manual usage. It might be problematic in some cases for automated operations. It could be made to adapt to that similar to how Arduino already handles automatic update checks and post-install script execution by arduino-cli core install
:
My opinion is that the current behavior of Arduino IDE 2.x in this situation is not acceptable.
from arduino-lint.
Related Issues (20)
- Add "zero-length board ID" rule HOT 4
- Please add check for invalid examples e.g. containing no ino file HOT 3
- Question: Why are library names limited to 16 characters? (low prio) HOT 2
- Add maximum file system size rule for libraries
- Add the ability to mute some rules HOT 1
- Broken link in docs HOT 1
- Strict check on libraries should check for header guards or #pragma once HOT 2
- Feature Request: Add ability to exclude certain sub-folders from checks
- Feature request: Support macOS arm64 HOT 5
- Update link LP018 HOT 1
- arduino-lint can't load url from library.properties (http status 503) HOT 3
- New error raised with 1.2.1 while it should not
- My `examples` directory is getting ignored HOT 1
- Change of LP010: Increase character limit for naming Arduino libraries
- Publish Arduino project JSON schemas to "JSON Schema Store"
- Allow test sketches to be outside examples folder HOT 1
- Documentation and linter setup mismatch HOT 1
- Specify link to Github, BitBucket or GitLab as requirement for `url` field HOT 1
- Broken symlinks in libraries results in linter panic HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduino-lint.