Skip to content

Commit 3a68d2f

Browse files
committed
Fix build error when frozen modules are updated
When a frozen module was added or updated, a build error would occur during CI: `KeyError: 'FROZEN_MPY_DIRS'`. In e40abda I decided that it should be an error if all the expected keys were not defined in the board settings dict. I made this change and all seemed to be well; however, my testing did not exercise the case that a frozen module was changed. It turns out that FROZEN_MPY_DIRS was not being set in the board settings dict because the output of print-FROZEN_MPY_DIRS was "FROZEN_MPY_DIRS =" (which does not match the regular expression) instead of "FROZEN_MPY_DIRS = " (with a trailing space). This change fixes the problem by ensuring that an undefined or empty variable still prints with a space character after the equal character. Tested by running locally: ``` python3 -c 'import shared_bindings_matrix; print(shared_bindings_matrix.get_settings_from_makefile("ports/atmel-samd", "trinket_m0")["FROZEN_MPY_DIRS"])' ``` (prints a blank line, expected) as well as simulating a change to the asyncio frozen submodule: ``` python3 -c 'import shared_bindings_matrix; print(shared_bindings_matrix.get_settings_from_makefile("ports/atmel-samd", "trinket_m0")["FROZEN_MPY_DIRS"])' ``` (which will build the elecfreaks_picoed board)
1 parent 87163de commit 3a68d2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/circuitpy_defns.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,4 +877,4 @@ invalid-board:
877877
# Print out the value of a make variable.
878878
# https://stackoverflow.com/questions/16467718/how-to-print-out-a-variable-in-makefile
879879
print-%:
880-
@echo $* = $($*)
880+
@echo "$* = "$($*)

0 commit comments

Comments
 (0)