Update diplomat to using cpp lib name#581
Merged
Manishearth merged 4 commits intoboa-dev:mainfrom Sep 18, 2025
Merged
Conversation
ebc077f to
1bd20c3
Compare
1bd20c3 to
c24b2dc
Compare
Manishearth
added a commit
to rust-diplomat/diplomat
that referenced
this pull request
Sep 18, 2025
Fixes #688, fixes #920. Projects are strongly encouraged to use this to avoid namespace pollution. With this change, C++ projects setting `lib_name` will use that as a toplevel namespace. Further namespaces produce sub-namespaces (e.g. ICU4X could have `lib_name = icu4x` and `namespace = properties` on some of its code for `icu4x::properties::blah`) Switching from namespaces to lib_name does not change the actual code too much EXCEPT `diplomat_runtime.h` will now be `libname::diplomat` and will have a lib-scoped include guard. This is overall better for everyone. This does not affect the nanobind backend, currently. Followup: #957 See this in action: - ICU4X: unicode-org/icu4x#6957 - temporal_rs: boa-dev/temporal#581
Contributor
Author
|
Note: this moves Diplomat over to a git hash. I can cut a release pretty quickly when needed, but I don't want to preemptively do that, to minimize the number of breaking changes between now and ICU4X 2.1, so we don't have to do another breaking diplomat release when ICU4X 2.1 comes out. |
Member
|
How long until ICU4X 2.1? |
Contributor
Author
|
@nekevss mid-October. To be clear, this does not block us on ICU4X 2.1. I am merely hoping to wait until the last moment for Diplomat 0.13.0 so that if there are other breaking Diplomat changes they can make their way in. When temporal_rs needs a Diplomat release for 0.1.0, I'll make one, and when ICU4X needs a Diplomat release hopefully we can make a minor release but if not we can always make a major one. |
nekevss
approved these changes
Sep 18, 2025
hubot
pushed a commit
to v8/v8
that referenced
this pull request
Sep 19, 2025
Prepares the code for boa-dev/temporal#581 This will make it easier for multiple Diplomat-based projects to coexist in the same project (necessary if we ever move the Intl code over to ICU4X). The only real change is that the `diplomat` namespace is now `temporal_rs::diplomat` Bug: 401065166 Change-Id: I6a6a6964b68b8e82af2247bb5d5573725c4fb3dd Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6967084 Commit-Queue: Manish Goregaokar <manishearth@google.com> Reviewed-by: Rezvan Mahdavi Hezaveh <rezvan@chromium.org> Cr-Commit-Position: refs/heads/main@{#102614}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on rust-diplomat/diplomat#956
V8: https://chromium-review.googlesource.com/c/v8/v8/+/6967084