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 C2 backend to produce Header objects #492

Merged
merged 4 commits into from
Jun 8, 2024

Conversation

Manishearth
Copy link
Contributor

This way they can be directly consumed by cpp2 instead of doing a cpp2-c2 folder. This is part of the plan for #427

it was necessary when generating a type had a bunch of impl-to-decl and impl-to-result-header deps, but that is no longer the case and we can simplify things. We can reintroduce a HeaderContext if we need in the future.
@Manishearth Manishearth requested a review from sffc June 7, 2024 23:58
_ => unreachable!("unknown AST/HIR variant"),
};
// Todo(breaking): We can remove this requirement
// and users will be forced to import more types
if let Some(id) = id {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is the main actual behavioral change here. Foo.h no longer imports all impl header files for its method dependencies

@@ -1,7 +1,11 @@
#include <stdio.h>
#include <assert.h>

#include "include/ICU4XLocale.h"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

(this is because of the change at the bottom of ty.rs)

@Manishearth Manishearth merged commit 7a590f3 into rust-diplomat:main Jun 8, 2024
6 checks passed
@Manishearth Manishearth deleted the c2-refactor-headers branch June 8, 2024 00:58
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