Skip to content

Comments

CLI: use StatusResponse.as_dict() in JSON command#1102

Open
PerchunPak wants to merge 1 commit intomasterfrom
cli-use-query-dataclass
Open

CLI: use StatusResponse.as_dict() in JSON command#1102
PerchunPak wants to merge 1 commit intomasterfrom
cli-use-query-dataclass

Conversation

@PerchunPak
Copy link
Member

No description provided.

@PerchunPak PerchunPak requested a review from ItsDrike February 7, 2026 13:40
"Dinnerbone",
"Djinnibone",
"Steve",
],
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't really consider adding new fields to JSON as a breaking change, but we can postpone this PR until v13

Copy link
Member

Choose a reason for hiding this comment

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

Hm, I'm not sure, I mean, it depends on how people are using this output, it could be breaking (if used with some kind of strict parsing into specific fields, where all have to be consumed), or it might not be (more likely).

The change of port from str to int might also be breaking.

I don't know how we should treat these kind of changes in the CLI. I think most people that rely on the kind of consumption where this would be breaking are likely using mcstatus as a library, rather than calling it via CLI, and generally, I think most people that are using it as CLI are doing so from simple bash scripts where these changes very likely wouldn't be braking, so I don't think it'd be particularly wrong to release this without a braking change. Though I also wouldn't mind postponing until the next major release.

Copy link
Member Author

@PerchunPak PerchunPak Feb 7, 2026

Choose a reason for hiding this comment

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

I'd like to postpone it after all, this is purely an internal QOL change

@ItsDrike ItsDrike added a: script Changes to the executable CLI script t: revision Complete or partial rewrite of something (code cleanup, performance improvements, etc.) labels Feb 7, 2026
@PerchunPak PerchunPak marked this pull request as draft February 7, 2026 16:06
@ItsDrike ItsDrike added the m: breaking This introduces backwards compatibility breaking changes to the public API label Feb 7, 2026
@PerchunPak PerchunPak added the m: do-not-merge The PR can be reviewed, but cannot be merged now label Feb 12, 2026
@ItsDrike ItsDrike removed the m: do-not-merge The PR can be reviewed, but cannot be merged now label Feb 14, 2026
Update tests with new fields

Remove unused import
@PerchunPak PerchunPak force-pushed the cli-use-query-dataclass branch from 88d7a49 to 170cca9 Compare February 14, 2026 22:53
@PerchunPak PerchunPak marked this pull request as ready for review February 14, 2026 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: script Changes to the executable CLI script m: breaking This introduces backwards compatibility breaking changes to the public API t: revision Complete or partial rewrite of something (code cleanup, performance improvements, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants