-
Notifications
You must be signed in to change notification settings - Fork 3k
Removed custom targets from config system #2691
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
Conversation
Custom targets were the origin of a number of issues with the mbed tools, so it was decided that they need to be removed. This PR does just that (and moves the "custom_targets" part of the config system tests into a separate, per-test "targets.json" file to preserve the test functionality).
if os.path.isfile(os.path.join(full_name, "targets.json")): | ||
set_targets_json_location(os.path.join(full_name, "targets.json")) | ||
else: # uset the regular set of targets | ||
set_targets_json_location(Target._Target__targets_json_location_default) |
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'm pretty sure you can leave off the argument to set_targets_json_location
and have the same behavior. This would prevent you from relying on a 'hiden' class variable.
LGTM. 👍 |
The previous code used a variable that was internal to the Target class. This commit removes the argument to `set_targets_json_location` completely, which forces Target to use the default locatio internally.
Good point @theotherjimmy, thanks! Fixed. |
@bogdanm That was fast! It all looks good to me. |
@bogdanm Where is the documentation for the |
@pan-: that was a function added to support the online build system, and now found another use in the tests for the configuration system. It's not really for internal use only, but I don't think we really want to encourage people to use it. I might be wrong though. |
LGTM. This will also reduce complexity! |
Custom targets were the origin of a number of issues with the mbed
tools, so it was decided that they need to be removed. This PR does just
that (and moves the "custom_targets" part of the config system tests
into a separate, per-test "targets.json" file to preserve the test
functionality).