Is it safe to combine examples of stable and latest version?

TeaElse
Posts: 9
Joined: Mon Feb 18, 2019 10:11 am

Is it safe to combine examples of stable and latest version?

Postby TeaElse » Wed Feb 20, 2019 1:49 pm

Hello,

I am usually working with examples and libraries from the stable version.
But ocassionally there are functionalities that I need which are only available in the latest version.

Is it safe to combine examples from stable with the ones from latest or are there too many dependencies within the many components?


What I just tried was to compile the code of http_server/simple example (from latest) in the esp-idf enviroment from the stable version (there I would like to add a UART handler later).
To make it compile without errors I had to add the esp_http_server and replace the nvs_flash component.
This does work so far without any problems. (I work with eclipse)


Many thanks!
-TeaElse

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Is it safe to combine examples of stable and latest version?

Postby ESP_Angus » Wed Feb 20, 2019 10:25 pm

Hi TeaElse,
Is it safe to combine examples from stable with the ones from latest or are there too many dependencies within the many components?
Using an older example project with a newer ESP-IDF (same major version) should always be OK. This is because we do Semantic Versioning so we try not to make breaking changes to APIs. There may be breaking changes in new major versions (these will be documented in the release notes), but for 3.x versions there shouldn't be any breaking changes moving to a newer version.
What I just tried was to compile the code of http_server/simple example (from latest) in the esp-idf enviroment from the stable version (there I would like to add a UART handler later).
It sounds like in this case you're using a newer example (from latest) with an older ESP-IDF. This may not work because (as you've found) the example may call APIs in the newer ESP-IDF which aren't in the older ESP-IDF.
To make it compile without errors I had to add the esp_http_server and replace the nvs_flash component.
It sounds like what you're doing here is moving components from inside newer ESP-IDF into a project based on older ESP-IDF. (BTW, just in case you didn't know, you can do this by copying the newer components into your project's components folder - you shouldn't need to modify the ESP-IDF itself if you don't want to.)

This is unsupported. Noone has tested the combination of components you are using, we have no way of knowing if they'll trigger some otherwise non-existent bug. So if things go wrong, you're on your own. That said, it may work perfectly.

What I would recommend you do is check out the v3.2 release branch. v3.2 is currently in beta and we're doing final tests for a release. This version should be more stable than master, and is supported if you report a bug.

You can read more about the different branches and versions in the ESP-IDF docs: https://docs.espressif.com/projects/esp ... sions.html

TeaElse
Posts: 9
Joined: Mon Feb 18, 2019 10:11 am

Re: Is it safe to combine examples of stable and latest version?

Postby TeaElse » Thu Feb 21, 2019 10:17 am

Thank you for your help!
Good to know. So I'll try that v3.2. Guess it cant be that bad bad if its already in final testing.

I got a problem though with getting that Version.
First I tried to get it like this:

Code: Select all

cd ~/esp
git clone -b v3.2 --recursive https://github.com/espressif/esp-idf.git
which doesnt work(see log below) so I tried to get the current stable version(v3.1.3) and update it to v3.2. following the steps described in your link.

Code: Select all

cd $IDF_PATH
git fetch
git checkout release/v3.2
git pull
git submodule update --init --recursive
This gets 3.2 but after the last command it seems like I end up with the latest(master) branch again.
After this prcedure I get v3.3-dev-264-g8a69ffc36.
The Version of the lastest(master) branch I checked out is v3.3-beta1-328-gabea9e4c0-dirty.

Code: Select all

Mullner@DESKTOP-DT6TJ2T MINGW32 ~/esp3_2
$ git clone -b v3.2 --recursive https://github.com/espressif/esp-idf.git
Klone nach 'esp-idf' ...
fatal: Remote-Branch v3.2 nicht im Upstream-Repository origin gefunden

$ git clone -b v3.1.3 --recursive https://github.com/espressif/esp-idf.git
[...]
[everything works, no errors]

$ cd esp-idf/

$ git describe --tags --dirty
v3.1.3

$ git fetch

$ git checkout release/v3.2
Checke Dateien aus: 100% (1900/1900), Fertig.
M       components/aws_iot/aws-iot-device-sdk-embedded-C
M       components/bt/lib
M       components/esp32/lib
M       components/mbedtls/mbedtls
Vorherige Position von HEAD war cf5dbadf4 Merge branch 'bugfix/backtrace_from_interrupts_backport_v3.1' into 'release/v3.1'
Branch 'release/v3.2' folgt nun Remote-Branch 'release/v3.2' von 'origin'.
Zu neuem Branch 'release/v3.2' gewechselt [changed to new v3.2 branch]

$ git pull
Bereits aktuell. [already up to date]

$ git submodule update --init --recursive
Submodul 'components/asio/asio' (https://github.com/espressif/asio.git) für Pfad 'components/asio/asio' in die Konfiguration eingetragen.
Submodul 'components/expat/expat' (https://github.com/libexpat/libexpat.git) für Pfad 'components/expat/expat' in die Konfiguration eingetragen.
Submodul 'components/lwip/lwip' (https://github.com/espressif/esp-lwip.git) für Pfad 'components/lwip/lwip' in die Konfiguration eingetragen.
Submodul 'components/mqtt/esp-mqtt' (https://github.com/espressif/esp-mqtt.git) für Pfad 'components/mqtt/esp-mqtt' in die Konfiguration eingetragen.
Submodul 'components/protobuf-c/protobuf-c' (https://github.com/protobuf-c/protobuf-c) für Pfad 'components/protobuf-c/protobuf-c' in die Konfiguration eingetragen.
Klone nach '/home/Mullner/esp3_2/esp-idf/components/asio/asio' ...
Klone nach '/home/Mullner/esp3_2/esp-idf/components/expat/expat' ...
Klone nach '/home/Mullner/esp3_2/esp-idf/components/lwip/lwip' ...
Klone nach '/home/Mullner/esp3_2/esp-idf/components/mqtt/esp-mqtt' ...
Klone nach '/home/Mullner/esp3_2/esp-idf/components/protobuf-c/protobuf-c' ...
Submodul-Pfad: 'components/asio/asio': '55efc179b76139c8f9b44bf22a4aba4803f7a7bd' ausgecheckt
Submodul-Pfad: 'components/aws_iot/aws-iot-device-sdk-embedded-C': '299183238ffe7a3e6a5ca0af9db19c10eaca62cf' ausgecheckt
Submodul-Pfad: 'components/bt/lib': 'f71810666b7f4ef27eb07ee111f13f8bf98ac3ed' ausgecheckt
Submodul-Pfad: 'components/esp32/lib': 'd922cf25d4fa6b051cb822fce911430a87e87197' ausgecheckt
Submodul-Pfad: 'components/expat/expat': '968b8cc46dbee47b83318d5f31a8e7907199614b' ausgecheckt
Submodul-Pfad: 'components/lwip/lwip': 'e2a24de6603c896a5ddacac296c0304002376eae' ausgecheckt
Submodul-Pfad: 'components/mbedtls/mbedtls': '19eb57f7f7b2f4312d497ddbcb5f104fc6877c70' ausgecheckt
Submodul-Pfad: 'components/mqtt/esp-mqtt': 'a7b1cea5b3e246298607a8c64447765297626f36' ausgecheckt
Submodul-Pfad: 'components/protobuf-c/protobuf-c': 'dac1a65feac4ad72f612aab99f487056fbcf5c1a' ausgecheckt

$ git describe --tags --dirty
v3.3-dev-264-g8a69ffc36

$ cd ../../espMaster/esp-idf/	[comparing this version to a master-branch I checked out recently]

$ git describe --tags --dirty
v3.3-beta1-328-gabea9e4c0-dirty


I must be doing something wrong here..

TeaElse
Posts: 9
Joined: Mon Feb 18, 2019 10:11 am

Re: Is it safe to combine examples of stable and latest version?

Postby TeaElse » Wed Feb 27, 2019 7:36 am

I now got the program "sourcetree" which makes it a little easier for me, since I am new to git.

I now got the version with the tag "3.2-beta1".

Is that a good version to work with?
/the one you referred to as "v3.2 release branch"?

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 139 guests