-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix init-windows C++ codegen include to use codegenConfig.name #15619
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
base: main
Are you sure you want to change the base?
Fix init-windows C++ codegen include to use codegenConfig.name #15619
Conversation
|
@microsoft-github-policy-service agree |
|
/azp run PR |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@NisargaK-21 You have to run refer this |
|
/azp run PR |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
I ran |
You have to run Will be mentioned here |
This change fixes incorrect C++ codegen include generation in the cpp-lib init-windows template by using codegenConfig.name from the user library’s package.json as the source of truth.
Previously, the template inferred codegen spec filenames from the project name (pascalName) or attempted to detect generated files on disk. This produced incorrect includes when the project name and codegen module name differed, particularly for scoped packages and during first-time initialization before codegen output exists.
The fix removes spec filename inference and disk scanning logic, reads codegenConfig.name directly from package.json, passes this value into the cpp-lib templates, and updates the generated C++ header to include Native<codegenConfig.name>Spec.g.h. This aligns the template output with how codegen names generated files and makes the behavior deterministic.
This change only affects generated template output and does not modify runtime behavior.
Microsoft Reviewers: Open in CodeFlow