Closed mathieucarbou closed 5 months ago
You're talking about CI or are you just using the library?
You're talking about CI or are you just using the library?
Just pointing to the library (master branch) in platfeformio causes this huge download since the esp-idf sample is there.
Note: this is a git operation, caused by the gitmodule file.
The problem is that pointing to a git repo seems to force platformio to resolve the git modules, even in sample fodlers like we see in the screenshot.
Would it be possible to delete this gitmodule file and instead have the downloaded dependencies done in the CI files ?
So the 'build time' is actually download time. Nonetheless it obviously is unnecessary and highly undesirable. Not sure how to solve though. I'm looking into this!
Question: how did you install the library?
So the 'build time' is actually download time. Nonetheless it obviously is unnecessary and highly undesirable. Not sure how to solve though. I'm looking into this!
Question: how did you install the library?
Yes, git download time. But the arduino project is huge. Even on an optical fiber connection it takes time.
I am pointing to: https://github.com/bertmelis/espMqttClient
(there is no release yet containing this example).
One other way to solve that would be to add a section like that in library.json to limit what gets exported:
"export": {
"include": [
"examples",
"src",
"library.json",
"library.properties",
"LICENSE",
"README.md"
]
}
this would only solve it for releases but not solve it for someone pointing directly to a branch or tag in the git repo.
As a workaround, you can point to the zip file from the main branch instead of the git link. This can be added to the docs imho.
As I understand (with limited reading into the topic), fetching the submodules is hardcoded into platformio. So if you really want to use git, you can still just clone the repo manually without recursion and point to the directory in your platformio.ini
This is a hard nut to crack.
As a workaround, you can point to the zip file from the main branch instead of the git link. This can be added to the docs imho.
As I understand (with limited reading into the topic), fetching the submodules is hardcoded into platformio. So if you really want to use git, you can still just clone the repo manually without recursion and point to the directory in your platformio.ini
This is a hard nut to crack.
That's not practical... The whole point of allowing to point to a branch directly is to easily allow to test or apply fixes and grab them in another project for exemple.
For example, in my projects, I am currently pointing to my branch of espMqttClient which contains the changes for the library.json.
I'll just remove the esp-idf CI workflow and with that also the submodules.
The introduction of the latest comit (885e631f1669aaaeb88098811aace215a43d01b8) causes a huge build time on platformio because it is going through the example to also download their dependencies which includes the whole platform. That is a Gb of download.
Using: