Repeat module in release firmware?

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
User avatar
water
Posts: 75
Joined: Sun Sep 24, 2017 9:16 am

Repeat module in release firmware?

Post by water » Thu Sep 03, 2020 7:36 am

Code: Select all

help('modules')
__main__ gc uasyncio/stream upip_utarfile
_boot inisetup ubinascii upysh
_onewire machine ubluetooth urandom
_thread math ucollections ure
_uasyncio micropython ucryptolib urequests
_webrepl neopixel uctypes uselect
apa106 network uerrno usocket
btree ntptime uhashlib ussl
builtins onewire uhashlib ustruct
cmath sys uheapq utime
dht uarray uio utimeq
ds18x20 uasyncio/__init__ ujson uwebsocket
esp uasyncio/core umqtt/robust uzlib
esp32 uasyncio/event umqtt/simple webrepl
flashbdev uasyncio/funcs uos webrepl_setup
framebuf uasyncio/lock upip websocket_helper
Plus any modules on the filesystem
Is it have some module path configure incorrect ?
Test on V1.13 ,
ESP32
Last edited by water on Thu Sep 03, 2020 9:06 am, edited 1 time in total.

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Repeat module in release firmware?

Post by jimmo » Thu Sep 03, 2020 8:21 am

Nice find!

This appears to be a misconfiguration in the ESP32 port. uhashlib is added by both objmodule.c and esp32/mpconfigport.h.

It's a quirk of help('modules') that it walks the underlying list of registrations and therefore will see the entry twice, but the rest of the code that uses this list will ignore the duplicate.

I will send a PR to fix this later tonight. Thanks

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Repeat module in release firmware?

Post by jimmo » Thu Sep 10, 2020 1:33 am

OK "later tonight" turned into "next week" but https://github.com/micropython/micropython/pull/6426

User avatar
water
Posts: 75
Joined: Sun Sep 24, 2017 9:16 am

Re: Repeat module in release firmware?

Post by water » Fri Sep 11, 2020 3:40 pm

Thanks.

Post Reply