Skip to content

Version restriction for installing library #105

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

Open
s-celles opened this issue Jan 4, 2019 · 4 comments
Open

Version restriction for installing library #105

s-celles opened this issue Jan 4, 2019 · 4 comments
Labels
type: enhancement Proposed improvement

Comments

@s-celles
Copy link

s-celles commented Jan 4, 2019

Hello,

I noticed in doc:

 $ arduino-cli lib install "WiFi101"

install latest "registered" library named WiFi101.

I wonder if it's currently possible to restrict version of library to install a library using a command line like

 $ arduino-cli lib install "ArduinoJson<6.0.0,>=5.0.0"

or simply

 $ arduino-cli lib install "ArduinoJson<6.0.0"

Such a command could install latest version between 5.0.0 (include) and 6.0.0 (exclude)
ie, currently 5.13.4.

This is quite similar to Python requirements.txt syntax.
See https://www.python.org/dev/peps/pep-0440/#compatible-release and https://stackoverflow.com/questions/8795617/how-to-pip-install-a-package-with-min-and-max-version-range

Installing a given version should also be considered (or documented)

 $ arduino-cli lib install "ArduinoJson==5.13.4"

Specifying an "unregistered" library could also be supported (with care) ( #128 )

https://stackoverflow.com/questions/16584552/how-to-state-in-requirements-txt-a-direct-github-source

Kind regards

PS : related issue arduino/Arduino#5795
PS2 : installing several differents versions of a library could be done using environments #108

@phd
Copy link
Contributor

phd commented Feb 22, 2021

Installing a given version should also be considered (or documented)

 $ arduino-cli lib install "ArduinoJson==5.13.4"

You can install a specific version of a library with:

$ arduino-cli lib install "[email protected]"

@s-celles
Copy link
Author

Thanks @phd . That's an interesting improvement of arduino-cli.
But I don't think version restriction are currently implemented (ie lib version number lower than a given version number and greater than an other one)

@ubidefeo
Copy link

@silvanocerza do we support this?
Might be an interesting one if we don't :)

@silvanocerza
Copy link
Contributor

I like this, would be something nice to have. I think it would be feasible but I'd have to investigate a bit first just to be sure.

@per1234 per1234 reopened this Mar 30, 2021
per1234 added a commit that referenced this issue Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

6 participants