Fix build error when frozen modules are updated #8633
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
(prints a blank line, expected)
as well as simulating a change to the asyncio frozen submodule:
(which will build the elecfreaks_picoed board)