Skip to content

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

Merged
merged 2 commits into from
Sep 14, 2016
Merged

Removed custom targets from config system #2691

merged 2 commits into from
Sep 14, 2016

Conversation

bogdanm
Copy link
Contributor

@bogdanm bogdanm commented Sep 13, 2016

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).

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).
@bogdanm
Copy link
Contributor Author

bogdanm commented Sep 13, 2016

See for example #2452 and #2230 for a discussion about this.

@sg- @0xc0170 @screamerbg

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)
Copy link
Contributor

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.

@theotherjimmy
Copy link
Contributor

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.
@bogdanm
Copy link
Contributor Author

bogdanm commented Sep 13, 2016

Good point @theotherjimmy, thanks! Fixed.

@theotherjimmy
Copy link
Contributor

@bogdanm That was fast! It all looks good to me.

@pan-
Copy link
Member

pan- commented Sep 13, 2016

@bogdanm Where is the documentation for the targets,json functionality ? Is this only for internal uses ?

@bogdanm
Copy link
Contributor Author

bogdanm commented Sep 13, 2016

@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.

@screamerbg
Copy link
Contributor

LGTM. This will also reduce complexity!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants