I should start off by saying that I am new to using PlatformIO.
Problem Definition
I have developed several custom “libraries” for a ESP solution. These libraries are on GitHub. There is a dependency of one on another - the “Switch” library uses the “Timer” library (and others).
Switch
|
|-----> Timer#~v1.0.0
I would like to be able to specify the version of the Timer library used by “Switch” in the library json manifest under “dependencies”.
I have been able to make it work without version specifications, but can’t quite get the syntax to work with version.
What I have done to-date
I have setup 3 releases of library “Timer” in GitHub (which I’m new to too!) with tags v1.0.0, v1.0.1 & v1.0.2.
What works
But does not specify version.
Switch library manifest:
"dependencies": {
"MQTTClient": "https://github.com/*myUsername*/MQTTClient.git",
"Timer": "https://github.com/*myUsername*/Timer.git",
"MUX_TCA9539": "https://github.com/*myUsername*/MUX_TCA9539.git"
},
I’ve tried several options to specify the version with no success - example follows.
What doesn’t
"dependencies": {
"MQTTClient": "https://github.com/*myUsername*/MQTTClient.git",
"Timer": "https://github.com/*myUsername*/Timer.git#~1.0.0",
"MUX_TCA9539": "https://github.com/*myUsername*/MUX_TCA9539.git"
},
I get the following error.
Library Manager: Switch@1.0.0+sha.0d62ac4 has been installed!
Library Manager: Resolving dependencies...
Library Manager: Installing git+https://github.com/*myUsername*/Timer.git#~1.0.0
git version 2.45.2.windows.1
Cloning into 'C:\Users\user\.platformio\.cache\tmp\pkg-installing-8c8fozly'...
warning: Could not find remote branch ~1.0.0 to clone.
fatal: Remote branch ~1.0.0 not found in upstream origin
VCSBaseException: VCS: Could not process command ['git', 'clone', '--recursive', '--depth', '1', '--branch', '~1.0.0', 'https://github.com/*myUsername*/Timer.git', 'C:\\Users\\user\\.platformio\\.cache\\tmp\\pkg-installing-8c8fozly']
* The terminal process "C:\Users\user\.platformio\penv\Scripts\platformio.exe 'run', '--environment', 'nodemcuv2OTA'" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.
I’m hoping that it is a simple syntax error on my part or I haven’t setup the versions correctly in GitHub.
Any assistance will be much appreciated.