Skip to content

chore: Update ArduinoJson Package#76

Merged
faustbrian merged 25 commits intoArkEcosystemArchive:masterfrom
sleepdefic1t:chore/arduinojson-v6
Apr 17, 2019
Merged

chore: Update ArduinoJson Package#76
faustbrian merged 25 commits intoArkEcosystemArchive:masterfrom
sleepdefic1t:chore/arduinojson-v6

Conversation

@sleepdefic1t
Copy link
Contributor

Proposed changes

The current Cpp-Crypto library supports ArduinoJson v.5 semantics.

This PR updates to and explicitly forces use of ArduinoJson v.6.10.0.

Specifically, this PR changes the following:

  • updates version in ./circleci/script_arduino.sh.
  • updates version in docs/INSTALL_PLATFORMIO.md.
  • updates version in /platformio.ini.
  • updates version in test/platformio.ini.
  • updates ArduinoJson submodule
  • updates transaction.cpp ArduinoJson semantics.
  • updates test/transaction.cpp ArduinoJson semantics.
  • updates message.cpp ArduinoJson semantics.
  • updates test/message.cpp ArduinoJson semantics.

Types of changes

  • Refactoring (improve a current implementation without adding a new feature or fixing a bug)
  • Build (changes that affect the build system)

Checklist

  • I have read the CONTRIBUTING documentation
  • Lint and unit tests pass locally with my changes

Further comments

This PR also resolves build failure in #74 as noted in #75.

It is [WIP] until I can confirm this will pass all CI test.

- list ArduinoJson as a dependency.
- add Arduino sketch path to config.
- fix the 'platformio_example' path.
The current Cpp-Crypto library supports ArduinoJson v.5 semantics.

This PR updates to and explicitly forces use of ArduinoJson v.6.10.0.

Specifically, this PR changes the following:
- updates version in ./circleci/script_arduino.sh
- updates version in docs/INSTALL_PLATFORMIO.md
- updates version in /platformio.ini
- updates version in test/platformio.ini
- updates ArduinoJson submodule
- updates transaction.cpp ArduinoJson semantics.
- updates test/transaction.cpp ArduinoJson semantics.
- updates message.cpp ArduinoJson semantics.
- updates test/message.cpp ArduinoJson semantics.
@ghost ghost added Complexity: Medium Less than 256 lines changed. Type: Task The issue is a request to setup third-party integrations or any general non-code related tasks. labels Apr 16, 2019
@ghost
Copy link

ghost commented Apr 16, 2019

The ci/circleci: build-linux-default job is failing as of b8a5defa2908ef7718a6112a669fabbe38cada39. Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

@sleepdefic1t
Copy link
Contributor Author

@ciband
This error look familiar at all?

I didn't touch anything with BIP39.

PIO 32/8266 works just fine on macOS;
Linux PIO ESP8266 apparently not so much.

In file included from /home/circleci/.platformio/packages/framework-arduinoespressif8266/tools/sdk/libc/xtensa-lx106-elf/include/string.h:163:0,
from /home/circleci/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/Arduino.h:33,
from .piolibdeps/bip39_ID5886/src/util.h:13,
from .piolibdeps/bip39_ID5886/src/dictionary/english_str.h:4,
from .piolibdeps/bip39_ID5886/src/dictionary/english.h:4,
from .piolibdeps/bip39_ID5886/src/bip39.cpp:2:
.piolibdeps/bip39_ID5886/src/bip39.cpp: In function 'int BIP39::{anonymous}::get_word_index(const char* const*, const string&)':
.piolibdeps/bip39_ID5886/src/bip39.cpp:52:28: error: 'const void*' is not a pointer-to-object type
strcpy_P(w, (char*)pgm_read_ptr_far(&(lexicon[i]))); // NOLINT
^
/home/circleci/.platformio/packages/framework-arduinoespressif8266/tools/sdk/libc/xtensa-lx106-elf/include/sys/string.h:32:57: note: in definition of macro 'strcpy_P'
#define strcpy_P(dest, src)          strncpy_P((dest), (src), SIZE_IRRELEVANT)
^
.piolibdeps/bip39_ID5886/src/bip39.cpp: In function 'BIP39::word_list BIP39::create_mnemonic(std::vector<unsigned char>&, BIP39::language)':
.piolibdeps/bip39_ID5886/src/bip39.cpp:106:31: error: 'const void*' is not a pointer-to-object type
strcpy_P(word, (char*)pgm_read_ptr_far(&(lexicon[position]))); // NOLINT
^
/home/circleci/.platformio/packages/framework-arduinoespressif8266/tools/sdk/libc/xtensa-lx106-elf/include/sys/string.h:32:57: note: in definition of macro 'strcpy_P'
#define strcpy_P(dest, src)          strncpy_P((dest), (src), SIZE_IRRELEVANT)
^
*** [.pioenvs/esp8266/src/test/.piolibdeps/bip39_ID5886/src/bip39.cpp.o] Error 1

@ciband
Copy link
Contributor

ciband commented Apr 16, 2019 via email

@sleepdefic1t
Copy link
Contributor Author

@ciband
Yeah, I'm guessing 8266 Core changed at some point recently.

Tried this fix in bip39 on a Linux instance, seems to resolve issue.

#if defined(ESP8266) |              \
    defined(ARDUINO_SAMD_MKRZERO) | \
    defined(ARDUINO_SAMD_ZERO) |    \
    defined(ARDUINO_SAM_DUE) |      \
    defined(ARDUINO_ARCH_ARC32) |   \
    defined(__TC27XX__) |           \
    (defined(TEENSYDUINO) && (TEENSYDUINO < 139))
#undef pgm_read_ptr
#define pgm_read_ptr(addr) (*(const void **)(addr))
#endif

src: SlashDevin/NeoGPS#112

I'll open a PR in ciband/BIP39 so you can check it out.

@ciband
Copy link
Contributor

ciband commented Apr 16, 2019 via email

@sleepdefic1t sleepdefic1t changed the title [WIP] chore: Update ArduinoJson Package chore: Update ArduinoJson Package Apr 16, 2019
@sleepdefic1t
Copy link
Contributor Author

Final build error in ci/circleci: build-linux-default is related to external BIP39 package.

A PR to resolve that packages build error was submitted @ ciband/bip39#8

This PR should be good to go now 👍

@faustbrian faustbrian merged commit 5b9cd15 into ArkEcosystemArchive:master Apr 17, 2019
@sleepdefic1t sleepdefic1t deleted the chore/arduinojson-v6 branch May 13, 2019 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complexity: Medium Less than 256 lines changed. Type: Task The issue is a request to setup third-party integrations or any general non-code related tasks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants