Skip to content
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

Sort JSON Alphabetically #26327

Merged
merged 3 commits into from
May 8, 2023
Merged

Conversation

p0fi
Copy link
Contributor

@p0fi p0fi commented May 2, 2023

📖 Description

This PR only sorts src/app/zap_cluster_list.json alphabetically. New entries could be done at any point of the list and then VSCode or another IDE or tool could then sort it again. This should increase uniformity and maintainability of the codebase by letting a machine sort things rather than human best effort.

🔎 Details

In VSCode the command would be JSON: Sort Document

@CLAassistant
Copy link

CLAassistant commented May 2, 2023

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the app label May 2, 2023
@p0fi p0fi requested a review from bzbarsky-apple May 2, 2023 11:36
@p0fi p0fi self-assigned this May 2, 2023
@github-actions
Copy link

github-actions bot commented May 2, 2023

PR #26327: Size comparison from fa505f6 to 0668cd0

Full report (1 build for cc32xx)
platform target config section fa505f6 0668cd0 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 604042 604042 0 0.0
(read/write) 204156 204156 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197568 197568 0 0.0
.comment 206 206 0 0.0
.data 1468 1468 0 0.0
.debug_abbrev 956764 956764 0 0.0
.debug_aranges 103240 103240 0 0.0
.debug_frame 349432 349432 0 0.0
.debug_info 19559510 19559510 0 0.0
.debug_line 2687404 2687404 0 0.0
.debug_line_str 513 513 0 0.0
.debug_loc 33340 33340 0 0.0
.debug_loclists 1515630 1515630 0 0.0
.debug_ranges 4984 4984 0 0.0
.debug_rnglists 95966 95966 0 0.0
.debug_str 3082308 3082308 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104282 104282 0 0.0
.shstrtab 265 265 0 0.0
.stack 2048 2048 0 0.0
.strtab 479192 479192 0 0.0
.symtab 286736 286736 0 0.0
.text 497636 497636 0 0.0

@github-actions
Copy link

github-actions bot commented May 2, 2023

PR #26327: Size comparison from fa505f6 to 76a6882

Full report (1 build for cc32xx)
platform target config section fa505f6 76a6882 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 604042 604042 0 0.0
(read/write) 204156 204156 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197568 197568 0 0.0
.comment 206 206 0 0.0
.data 1468 1468 0 0.0
.debug_abbrev 956764 956764 0 0.0
.debug_aranges 103240 103240 0 0.0
.debug_frame 349432 349432 0 0.0
.debug_info 19559510 19559510 0 0.0
.debug_line 2687404 2687404 0 0.0
.debug_line_str 513 513 0 0.0
.debug_loc 33340 33340 0 0.0
.debug_loclists 1515630 1515630 0 0.0
.debug_ranges 4984 4984 0 0.0
.debug_rnglists 95966 95966 0 0.0
.debug_str 3082308 3082308 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104282 104282 0 0.0
.shstrtab 265 265 0 0.0
.stack 2048 2048 0 0.0
.strtab 479192 479192 0 0.0
.symtab 286736 286736 0 0.0
.text 497636 497636 0 0.0

@arkq
Copy link
Contributor

arkq commented May 2, 2023

In order to keep this JSON file sorted over time, there has to be a CI task which will enforce that, otherwise it will degrade over time

@p0fi
Copy link
Contributor Author

p0fi commented May 2, 2023

I thought the same! Then I thought we probably don't want to plain sort all json files alphabetically. Then the CI tool would be required to have some kind of list of files which should be sorted and then we would end up having to add a new json file in potentially many places just like you have to do with cluster definition xml files today. This seemed a bit too much for this purpose.

Copy link
Contributor

@bzbarsky-apple bzbarsky-apple left a comment

Choose a reason for hiding this comment

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

This is probably OK, but in practice this will break all the time unless you add a lint for this.

For now that lint could just lint this one file.

@github-actions
Copy link

github-actions bot commented May 8, 2023

PR #26327: Size comparison from 6c0c5ea to 1680e5f

Increases (1 build for cc32xx)
platform target config section 6c0c5ea 1680e5f change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 19609755 19609757 2 0.0
Full report (1 build for cc32xx)
platform target config section 6c0c5ea 1680e5f change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 605090 605090 0 0.0
(read/write) 204164 204164 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197576 197576 0 0.0
.comment 206 206 0 0.0
.data 1468 1468 0 0.0
.debug_abbrev 957621 957621 0 0.0
.debug_aranges 101136 101136 0 0.0
.debug_frame 341512 341512 0 0.0
.debug_info 19609755 19609757 2 0.0
.debug_line 2666632 2666632 0 0.0
.debug_line_str 513 513 0 0.0
.debug_loc 33340 33340 0 0.0
.debug_loclists 1489225 1489225 0 0.0
.debug_ranges 4984 4984 0 0.0
.debug_rnglists 94315 94315 0 0.0
.debug_str 3108982 3108982 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104354 104354 0 0.0
.shstrtab 265 265 0 0.0
.stack 2048 2048 0 0.0
.strtab 483384 483384 0 0.0
.symtab 287328 287328 0 0.0
.text 498612 498612 0 0.0

@andy31415 andy31415 merged commit 5ff309f into project-chip:master May 8, 2023
@p0fi p0fi deleted the sort-cluster-list-json branch June 1, 2023 10:57
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