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

Refactor HandleResult type aliases #152

Closed
wants to merge 2 commits into from

Conversation

runesoerensen
Copy link
Contributor

@runesoerensen runesoerensen commented Nov 11, 2024

This PR shows how the nearly identical HandleResult type aliases used in the SDK and NuGet layers can be removed (either by using a shared alias for a LayerLogResult, or aliases for BuildpackLayerRef and BuildLog) defined in the layers module.

The HandleResult type aliases were introduced during the switch to bullet_stream, which added significant complexity to some function signatures that needed to pass the output/log back and forth (causing clippy to balk).

Defining one or more generic type aliases reduces some duplication, and potentially increases readability (compared to disabling that lint). Curious to hear thoughts on how we can/should approach this?

@runesoerensen runesoerensen added the skip changelog Skip the check-changelog check label Nov 11, 2024
@runesoerensen runesoerensen changed the title Extract HandleResult aliases as LayerLogResult Extract HandleResult type aliases Nov 11, 2024
@runesoerensen runesoerensen changed the title Extract HandleResult type aliases Refactor HandleResult type aliases Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip changelog Skip the check-changelog check
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant