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

sourcebundle: remove the option to append anything into a diagnostic that will then panic #64

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

liamcervante
Copy link
Member

This PR removes the Append function from the diagnostics supported by the source bundle package.

This function accepts any argument, but will then panic if the user passes in an unsupported type. The only supported types are the Diagnostic type and the Diagnostics type, both of which can be handled normally via the inbuilt append function. I think this function exists solely to allow a non-compile time safe way of appending diagnostics which isn't actually a useful thing to have or support.

Note, this is a breaking change so when upgrading callers will need to update their usage of these diagnostics to use the append function instead of the now-removed Append function.

@liamcervante liamcervante requested a review from a team August 20, 2024 10:00
@liamcervante liamcervante merged commit 18b3dde into main Aug 21, 2024
9 checks passed
@liamcervante liamcervante deleted the liamcervante/compile-time-safe-diags branch August 21, 2024 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants