Skip to content

Format targets.json to put the items of large lists on their own line #8717

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 1 commit into from Nov 14, 2018
Merged

Format targets.json to put the items of large lists on their own line #8717

merged 1 commit into from Nov 14, 2018

Conversation

ghost
Copy link

@ghost ghost commented Nov 12, 2018

Description

When rebasing a feature branch there are an irritating number of merge conflicts caused by the device_has field in targets.json solely because all features are included on the same line.

The PR formats the targets.json file to include each device feature and similar json lists on a new line to stop this happening so much.

Pull request type

[ ] Fix
[X] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Copy link
Contributor

@kjbracey kjbracey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't read the diff, but idea is so correct I'm just approving immediately.

@0xc0170 0xc0170 requested review from theotherjimmy and a team November 12, 2018 14:13
Copy link
Contributor

@cmonr cmonr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ever had one of those moments where you think "huh. Why didn't I think of that before?"

@cmonr
Copy link
Contributor

cmonr commented Nov 12, 2018

I wonder how many rebases bringing in this PR will cause.

I much prefer this tho.

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 minimize conflicts when touching targets code

Is this updating all labels/macros/device_has ? I noticed some labels were still on the same line. Just checking the "rules" we should follow - if we use "one attribute per line" for all of them.

@kjbracey
Copy link
Contributor

I'm sure I have seen this submitted once before in a PR, but I think the timing was bad - lots of other target changes coming in at the same time.

When you do it, you're going to get the mother of all merge conflicts, so just need to find a moment when there won't be too many other things needing rebasing.

@ghost
Copy link
Author

ghost commented Nov 12, 2018

Is this updating all labels/macros/device_has ? I noticed some labels were still on the same line. Just checking the "rules" we should follow - if we use "one attribute per line"

I think I only caught ones that had lines longer than >80. It should be formatted more thoroughly, I'll go back and fix any it missed.

@cmonr
Copy link
Contributor

cmonr commented Nov 13, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Nov 13, 2018

Build : SUCCESS

Build number : 3607
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/8717/

Triggering tests

/morph test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Nov 13, 2018

@mbed-ci
Copy link

mbed-ci commented Nov 13, 2018

@cmonr
Copy link
Contributor

cmonr commented Nov 13, 2018

Note: This PR is now a part of a rollup PR (#8733).

In order to expidite remaining CI testing, this PR has been bundled into the above rollup PR.

No further work is needed here, as once that PR is merged, this PR will also be closed and marked as merged.

If any more commits are made in this PR, this PR will remain open and have to go through CI on its own.

@0xc0170 0xc0170 merged commit 4551d94 into ARMmbed:master Nov 14, 2018
@0xc0170 0xc0170 removed the needs: CI label Nov 14, 2018
@cmonr cmonr removed the rollup PR label Nov 14, 2018
@adbridge
Copy link
Contributor

This is causing strange merge conflicts with 5.10 so pushing out to 5.11

@ghost ghost deleted the refactor-targets-formatting branch December 5, 2018 16:47
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.

6 participants