-
Notifications
You must be signed in to change notification settings - Fork 3k
Remove hiding of config errors related to ROM regions. #12007
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
Remove hiding of config errors related to ROM regions. #12007
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, @madchutney please review
Into next release, please. |
Means 6.0 in this case ? Or is this 5.15rc2? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not having pass if you catch it, but why not at least to log the error if you catch.
As it is now, it would bomb up with ConfigException error, wouldn't it be better if this bombs rather with message like "config error in ROM regions" ?
Running a misconfigured build with this results into the following. It does already give the error string (missing bootloader img file named missing_file.bin)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine for 5.15.1, 5.15.0 is in code freeze for OS and tools.
Means this gets 6.0 label then |
CI started |
The error note is definitely good enough as is. We need it to 5.15.1 and 6.0. |
There's no 5.15.1 , so if this in 5.15, it should be in rc2. |
Would it make sense to remove the error-hiding also from few places below the change in this PR: |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
@JammuKekkonen Let us know how to proceed |
@JammuKekkonen Can you clean up other 3 exception pass please ? I've reviewed them, they really silent the errors coming from the config system. Thanks @TeroJaasko. |
Currently any misconfiguration of, for example, bootloader feature will cause the build system to just silently drop it and continue building which can lead to completed builds of something the user didn't want to build in worst case and failing builds after compilation (=wasted time) in the best.
@0xc0170 removed the remaining 3 try-excepts |
@madchutney Should be better now? |
CI started |
Test run: FAILEDSummary: 3 of 4 test jobs failed Failed test jobs:
|
@JammuKekkonen Nice one, this now uncovers some devices that did not define device_name but enabled bootloader. List of all targets with failures:
I checked only few. For instance, Another error, this one does not seem to be valid (should be fixed here): This might need more work. |
We should fix what can be fixed, but mostly for now - just remove the bootloader is supported attribute, if it really isn't. The ROM_START is required, in my opinion though. If it's missing, it can't work/bootloader will not compile. But, it's often trivial to add. If that's the only thing that blocks it. However, we could sort of consider those issues to be separate issues - the silent failure we have had previously is much worse. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should fix it
@@ -895,62 +895,52 @@ def add_regions(self): | |||
"""Add regions to the build profile, if there are any. | |||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
""" | |
""" | |
if not getattr(self.target, "bootloader_supported", False): | |
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit msg (explanation):
tools: regions only if bootloader is supported
We removed catching and passing, we want to know for any misconfiguration if a bootloader
is supported. Regions function should check if a bootloader is supported. In case not, just return.
Otherwise we catch any error.
This should help us to uncover missing regions or other config error (in case bootloader
is enabled via bootloader_supported set to true).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not able to push to your branch . I tested this for WIZWIKI_W7500
, it builds without an error. but target like TB_SENSE_1
fails with a proper error - bootloader can't be enabled due to configuration error.
I tried to catch proper config exception but it is not easy the way config is executed (not that clear what with/without bootloader should work), I found this check as the best one to do prior doing any region work (it is done in config anyway later but then we are deeply in already bootoader case).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IF we can test this commit, we should get reduce list of targets that are not supporting bootloader properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@madchutney please review
@JanneKiiskila @JammuKekkonen is not responding (tried various IM), is he OoO today? I am wondering if I should create new PR as a replacement for this one (I can't commit to his branch) |
Description
Currently any misconfiguration of bootloader feature will cause the build system
to just silently drop it and continue building which can lead to completed
builds of something the user didn't want to build in worst case and failing
builds after compilation (=wasted time) in the best.
Summary of change
Remove the silent recovery of the config errors and let the Exception flow through resulting in a meaningful error message to the user.
Pull request type
Test results
Reviewers
@teetak01
Release Notes
Summary of changes
Impact of changes
Migration actions required