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(hydro_deploy)!: use buildstructor to handle excessive Deployment method arguments, fix #1364 #1366

Merged
merged 2 commits into from
Jul 31, 2024

Conversation

MingweiSamuel
Copy link
Member

Adds new method Deployment::AzureHost

BREAKING CHANGE: Changes syntax for Deployment::GcpComputeEngineHost

#[buildstructor::buildstructor]
impl Deployment {
#[allow(clippy::too_many_arguments)]
#[builder(entry = "GcpComputeEngineHost", exit = "add")]
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if it is possible to have exit be just drop (or is that asking for too much haha)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm it is theoretically possible but the macro isn't implemented to support it -- also I think that would be too fancy. Though the macro ought to mark the struct #[must_use] BrynCooke/buildstructor#189

Copy link
Member Author

Choose a reason for hiding this comment

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

Perhaps should be called GcpComputeEngineHostBuilder and .build()

…loyment` method arguments, fix hydro-project#1364

Adds new method `Deployment::AzureHost`

BREAKING CHANGE: Changes syntax for `Deployment::GcpComputeEngineHost`
Copy link
Member

@shadaj shadaj left a comment

Choose a reason for hiding this comment

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

Way nicer than before!

@MingweiSamuel MingweiSamuel merged commit 8856c85 into hydro-project:main Jul 31, 2024
13 checks passed
@MingweiSamuel MingweiSamuel deleted the buildstructor branch July 31, 2024 17:55
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