Skip to content
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

Drop "stage" ending for dev/platform to avoid issue with compatibility #1173

Closed
andig opened this issue Nov 8, 2017 · 5 comments
Closed
Milestone

Comments

@andig
Copy link

andig commented Nov 8, 2017

Coming from #1170 I've noticed that https://github.com/adafruit/DHT-sensor-library does not support espressif8266 as platform, only arduino.

For multi-platform pio builds that require ldf_compat_mode=2 that will be a problem (Platform incompatible library).

Registering a "foreign" library is already possible using pio lib register according to http://docs.platformio.org/en/latest/userguide/lib/cmd_register.html.

It would be helpful if there was a mechanism to specify additional properties for these foreign libraries like additional supported platforms.

@ivankravets
Copy link
Member

It should help #1170 (comment)

@ivankravets
Copy link
Member

We will remove _stage prefix for eps8266 dev/platform soon. It depends on PIO Core 3.5

@ivankravets ivankravets added this to the 3.5.0 milestone Nov 8, 2017
@ivankravets ivankravets changed the title pio lib register should allow additional attributes Drop "stage" ending for dev/platform to avoid issue with compatibility Nov 8, 2017
@andig
Copy link
Author

andig commented Nov 9, 2017

@ivankravets even when _stage is dropped, DHT still doesn't support e.g. esp8266 as you can reproduce when setting lib_compat_mode=2.

The problem with multi-platform builds is that I need the lib_compat_mode=2 e.g. for ESPAsyncWebserver and its 2 different platform dependencies. When setting this DHT is ignored.

I think we still need some kind of mechanism to provide additional compatibility information for non-pio libraries. Maybe user can file issues against the library registry?

@andig
Copy link
Author

andig commented Nov 9, 2017

Here's an example:

[platformio]

[common_env_data]
lib_deps=
  ESPAsyncWebServer@^1.1
# Use git version for _stage compatibility (https://github.com/me-no-dev/ESPAsyncWebServer/issues/281)
#  https://github.com/me-no-dev/ESPAsyncWebServer.git
  OneWire@^2.3
  DHT Sensor Library@^1.3
  DallasTemperature@^3.7
  ArduinoJson@^5.1

[env:esp8266]
platform=https://github.com/platformio/platform-espressif8266.git#feature/2.4.0-rc2
board=esp12e
framework=arduino
# lib_compat_mode=1 allows non-git versions of DHT and ESPAsyncWebServer@^1.1
lib_compat_mode=1
lib_ldf_mode=deep
lib_deps=
  ${common_env_data.lib_deps}
  ESPAsyncTCP@^1.1.2
lib_ignore=
  AsyncTCP

[env:esp32]
# use stage version for added SPIFFS support
platform=espressif32_stage
board=featheresp32
framework=arduino
# lib_compat_mode=2 to avoid including ESPAsyncTCP
lib_compat_mode=2
lib_ldf_mode=deep
lib_deps=
  ${common_env_data.lib_deps}
  https://github.com/bbx10/DNSServer_tng
  AsyncTCP@^1.0
#  https://github.com/me-no-dev/AsyncTCP.git
lib_ignore=
  ESPAsyncTCP

The esp32 needs lib_compat_mode=2 or it will include ESPAsyncTCP which breaks the build.

Unfortunately, with lib_compat_mode=2 it does no longer include DHT (this has changed during the 3.5 pre release versions):

Library Dependency Graph
|-- <OneWire> v2.3.2
|-- <DallasTemperature> v3.7.7
|   |-- <OneWire> v2.3.2
|-- <ArduinoJson> v5.11.2
|-- <AsyncTCP> v1.0.0
|-- <WiFi> v1.0
|-- <HTTPClient> v1.1
|   |-- <WiFiClientSecure> v1.0
|   |   |-- <WiFi> v1.0
|   |-- <WiFi> v1.0
|-- <ArduinoOTA> v1.0
|   |-- <WiFi> v1.0
|   |-- <Update> v1.0
|   |-- <ESPmDNS> v1.0
|-- <ESPmDNS> v1.0
|-- <FS> v1.0
|-- <DNSServer> v1.1.0
|   |-- <WiFi> v1.0
|-- <SPIFFS> v1.0
|   |-- <FS> v1.0

Again, build breaks due to missing DHT.

So either additional compatibility can be specified for DHT or it needs to make an assumption to be compatible if not specified otherwise.

@ivankravets
Copy link
Member

Done!

ivankravets added a commit that referenced this issue Dec 28, 2017
… issue #1236, issue #1235, issue #953, issue #1118, issue #1107, issue #1196, issue #1179, issue #1161, issue #1126, issue #104, issue #1033, issue #1034, issue #1175, issue #1173, issue #1155, issue #1188, issue #1111, issue #1153, issue #1150, issue #1145, issue #1139, issue #1137, issue #1170, issue #1157, issue #1102, issue #1105, issue #1140, issue #1154, issue #1066, issue #1038, issue #1054, issue #1055, issue #1061, issue #1017)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants