Skip to content

Conversation

@SidneyCogdill
Copy link
Contributor

Deprecates PR #301. Resolves issue #300.

This does the following changes:

  • Rename CMake project and target names, as well as their generated config file names.
  • Add the CMake target alias with namespace prefix. This has the advantage that if the target name is missing, CMake will early fail at configure time instead of at build time.
  • Modify the Proxy 4 implementation to reference pro::v4:: instead of pro::.
  • Rename C++ module name.
  • Rename macro names.
  • Add shim headers.

Note: This does NOT make it possible for Proxy 3 and Proxy 4 to work within the same project. The reason is due to the use of inline namespace v4 in Proxy 4 while Proxy 3 declares everything under pro:: namespace. When both versions are included, the error reference to 'XXX' is ambiguous will be emitted.

I've locally tested to confirm that removing the inline from inline namespace makes it possible for both Proxy 3 and Proxy 4 to compile within the same TU (which also confirms that all implementations now correctly reference the pro::v4 namsepace, unlike #301 which won't compile when inline is removed from inline namespace).

This will also make sure that a future Proxy 5 will work with Proxy 4 together, as long as the user explicitly requests the pro::v4:: / pro::v5:: namespace.

This PR does not include the necessary tests to verify running Proxy 3 (3.3.0 tag) and Proxy 4 at the same time. However, that can be added in a separate PR if it's desired. Doing so will require introducing a new feature gate macro that controls the use of inline of inline namespace.

Please, look at the individual commits, instead of the 20 changed files as a whole. I've made sure that each commit correctly tracks the incremental changes. It happens that GitHub doesn't correctly track the changes and thinks that I wrote the entire proxy/v4/proxy.h myself.

@mingxwa mingxwa requested review from guominrui and tian-lt June 3, 2025 05:50
Copy link
Member

@mingxwa mingxwa left a comment

Choose a reason for hiding this comment

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

LGTM

@mingxwa mingxwa requested a review from Copilot June 4, 2025 09:11
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR renames the Proxy library to Proxy 4, updating the CMake project, target names, module imports, and documentation accordingly. Key changes include updating C++ module import statements (from proxy to proxy.v4), revising CMake configuration files to use the new target and namespace (msft_proxy::proxy4), and updating documentation and README references.

Reviewed Changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/cpp20_modules/main.cpp Changed module import from “proxy” to “proxy.v4”.
tests/cpp20_modules/foo.cpp Updated module import to “proxy.v4”.
tests/cpp20_modules/CMakeLists.txt Revised target linking to use msft_proxy::proxy4_module.
include/proxy/v4/*.h, *.ixx Introduced new header and module interface files under the “v4” namespace.
cmake/* Removed outdated Proxy target scripts and introduced new Proxy4 target/configuration files.
docs/* and README.md Updated documentation and examples to refer to proxy4.
CMakeLists.txt Renamed the project and updated target names/export configurations accordingly.

@mingxwa mingxwa merged commit 33fb7aa into microsoft:main Jun 5, 2025
8 checks passed
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.

3 participants