-
Notifications
You must be signed in to change notification settings - Fork 427
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
Unify the ESP32 and ESP8266 version. #7
Comments
switching is quite easy ;) it's done by define switch like here: https://github.com/me-no-dev/ESPAsyncWebServer/blob/master/src/ESPAsyncWebServer.h#L31-L39 |
The problem I keep running into is that when I compile for one board and then the other platformio tries to include both libraries, i.e. I have to delete the temporary directories before I can switch. Maybe I am doing something wrong though, but I'd rather not have users have to deal with that.
The development is on a merge request currently ;) Will certainly add a reference when/if merged |
@ivankravets have a clue about this? I would rather @BlackEdder not have to use some sort of both libs into one to make it work. @BlackEdder would be much better if you try to make it work as it should, instead of going the way you went ;) |
@ivankravets You can recreate the issue I mean by running:
The nodemcuv2 build will work, while the esp32 build will fail, because it tries to include ESPAsyncTCP.cpp |
@BlackEdder Just replace See |
Sorry, but that still does not make it possible to compile them both in
order, without having to delete the temporary directories.
As far as I can tell this is because platformio tries to include all
libraries in the temporary build directory, without checking dependencies.
A possible solution would be for platformio to have `env` specific build
directories. Which is also why the solution proposed in
me-no-dev/ESPAsyncWebServer#223 did not work:
```
{
"name":"ESPAsyncWebServer",
"description":"Asynchronous HTTP and WebSocket Server Library for ESP8266
and ESP32",
"keywords":"http,async,websocket,webserver",
"authors":
{
"name": "Hristo Gochkov",
"maintainer": true
},
"repository":
{
"type": "git",
"url": "https://github.com/me-no-dev/ESPAsyncWebServer.git"
},
"version": "1.1.0",
"license": "LGPL-3.0",
"frameworks": "arduino",
"platforms":"espressif8266, espressif32",
"dependencies": [
{
"name": "ESPAsyncTCP",
"platforms": "espressif8266"
},
{
"name": "AsyncTCP",
"platforms": "espressif32"
}
]
}
```
…On Tue, 31 Oct 2017 at 12:38 Ivan Kravets ***@***.***> wrote:
@BlackEdder <https://github.com/blackedder> Just replace ESPAsyncWebServer
with AsyncWebServer in
https://gitlab.com/BlackEdder/painlessMesh/blob/master/examples/webServer/platformio.ini#L17
See
-
https://github.com/me-no-dev/ESPAsyncWebServer/blob/master/espressif8266_library.json
-
https://github.com/me-no-dev/ESPAsyncWebServer/blob/master/espressif32_library.json
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAznrVhaCQI7t3pAVRL9ERcZ8vqH26pHks5sxxS1gaJpZM4QMhdv>
.
|
@BlackEdder Thanks! I see an error. I'll take a look soon and reply here. Temporary solution is to put
|
@ivankravets Thanks! I guess there is no lib_ignore for library.json? That way the library that depends on either |
I'm seeing similar problems as @BlackEdder with library resolution, see platformio/platformio-core#1111. I've also switched to |
This is a bug and we have an issue for that platformio/platformio-core#1153 I'm going to fix it as soon as possible. |
many thanks! works like a charm! |
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions. |
I have a similar problem with VisualMicro. When compiling with ESP8266 or ESP32 it tries to include AsyncTCP.h and ESPAsyncTCP.h in both cases. Should I blame VisualMicro? |
My library works on both ESP32 and ESP8266, but I had trouble getting my project to reliably switch between using AsyncTCP and ESPAsyncTCP depending on the hardware (this was with platformio). In the end I decided to make AsyncTCP also work/compile on ESP8266 hardware. If you are interested the relevant files/changes can be found here:
https://gitlab.com/BlackEdder/painlessMesh/blob/tcp_locking/src/AsyncTCP.h
https://gitlab.com/BlackEdder/painlessMesh/blob/tcp_locking/src/AsyncTCP.cpp
The text was updated successfully, but these errors were encountered: