Skip to content

Conversation

@willtrnr
Copy link
Contributor

@willtrnr willtrnr commented Jan 14, 2025

Changes the type_name_domain config to behave closer to the way extern_path does.

This allows setting more than 1 path to domain mappings.

The original behavior of clearing previous mappings didn't make a lot of sense to me, but perhaps it was working as intended. If that's the case, then this would be a feature instead of a fix I guess.

BREAKING CHANGE: The configuration for domain names of messages is now cumulative. All calls to prost_build::Config::type_name_domain are now concatenated. The previous behavior was that only the arguments of the last call were used. If you do multiple calls to type_name_domain, you need to remove all but the last call to maintain the same behavior.

Copy link
Contributor

@caspermeijn caspermeijn left a comment

Choose a reason for hiding this comment

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

I agree, this makes more sense. Thanks for your contribution.

This is a breaking change, so it has to wait for the next major release.

BREAKING CHANGE: The configuration for domain names of messages is now cumulative. All calls to prost_build::Config::type_name_domain are now concatinated. The previous behaviour is that only the arguments of the last call was used. If you do multiple calls to type_name_domain, you need to remove all but the last call to maintain the same behaviour.

@caspermeijn caspermeijn added this pull request to the merge queue Feb 12, 2025
Merged via the queue into tokio-rs:master with commit a2e8f57 Feb 12, 2025
16 checks passed
@willtrnr willtrnr deleted the fix_cumulative_type_name_domain branch February 12, 2025 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants