-
Notifications
You must be signed in to change notification settings - Fork 50
feat: Use new enhanced enums for ExitCode #2078
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
base: main
Are you sure you want to change the base?
Conversation
I wrote this patch hoping to make `ExitCode.success.code` usable from within a const expression. But it turns out that it's still not usable within const. However the code is now cleaner after the change, so still offering the patch. I don't think this should break callers in the wild, but feel free to reject the change if you're worried about such.
I think it should be fine to roll out this change even without a major version bump because I do expect it to be non-breaking in practice for all users of this package. @lrhn do you have any concerns? |
Package publishing
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation. |
PR HealthBreaking changes ✔️
Changelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs. Coverage ✔️
This check for test coverage is informational (issues shown here will not fail the PR). API leaks ✔️The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.
License Headers ✔️
All source files should start with a license header. Unrelated files missing license headers
|
Do we expect users to start switching over exit codes? If so, it becomes breaking to add another exit code in the future. Or could anyone already be switching inexhaustible on them. Then this is breaking. (Would be nice to have a shorter syntax for breaking static constants without inducing exhaustion.) |
I’m really not attached to this at all, please feel free to discard. My
original purpose was I wanted ‘ExitCode.success.code’ usable within a const
expression, but it turns out that’s some other dart language limitation.
If this has any reasonable chance of breaking, I doubt it’s worth the
hassle. 🤷🏼♂️
…On Tue, Apr 22, 2025 at 11:43 PM Lasse R.H. Nielsen < ***@***.***> wrote:
Do we expect users to start switching over exit codes? If so, it becomes
breaking to add another exit code in the future.
Or could anyone already be switching inexhaustible on them. Then this is
breaking.
(Would be nice to have a shorter syntax for breaking static constants
without inducing exhaustion.)
—
Reply to this email directly, view it on GitHub
<#2078 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADU2TONFZTJ7QJWLL3RCOT224Y7RAVCNFSM6AAAAAB3UZPWL2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMRTGIZTAMRTGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
*lrhn* left a comment (dart-lang/tools#2078)
<#2078 (comment)>
Do we expect users to start switching over exit codes? If so, it becomes
breaking to add another exit code in the future.
Or could anyone already be switching inexhaustible on them. Then this is
breaking.
(Would be nice to have a shorter syntax for breaking static constants
without inducing exhaustion.)
—
Reply to this email directly, view it on GitHub
<#2078 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADU2TONFZTJ7QJWLL3RCOT224Y7RAVCNFSM6AAAAAB3UZPWL2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMRTGIZTAMRTGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I wrote this patch hoping to make
ExitCode.success.code
usable from within a const expression. But it turns out that it's still not usable within const. However the code is now cleaner after the change, so still offering the patch.I don't think this should break callers in the wild, but feel free to reject the change if you're worried about such.