Skip to content

[WIP] Template instantiation layout test name mangling #620

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

Conversation

fitzgen
Copy link
Member

@fitzgen fitzgen commented Apr 7, 2017

work in progress fix for #619

It seems we aren't ever getting the mangled name out of libclang for template instantiations in practice, so we're hitting the fallback behavior (master's current behavior) 100% of the time :-/

Someone feel free to steal this from me, I'm not planning on investigating further in the near future.

fitzgen added 4 commits April 6, 2017 15:24
This commit defines a new set of assertion macros that are only checked in
testing/CI when the `testing_only_extra_assertions` feature is enabled. This
makes it so that *users* of bindgen that happen to be making a debug build don't
enable all these extra and expensive assertions.

Additionally, this removes the `testing_only_assert_no_dangling_items` feature,
and runs the assertions that were previously gated on that feature when the new
`testing_only_extra_assertions` feature is enabled.
This replaces various `unwrap` calls with `expect` calls that have better
diagnostic messages if/when they fail.
@fitzgen
Copy link
Member Author

fitzgen commented Apr 7, 2017

cc @upsuper @Manishearth

@bors-servo
Copy link

☔ The latest upstream changes (presumably #621) made this pull request unmergeable. Please resolve the merge conflicts.

@emilio
Copy link
Contributor

emilio commented Apr 7, 2017

I suspect the "completely instantiated template" check may not work as greatly for non-functions?

@upsuper
Copy link
Contributor

upsuper commented May 16, 2017

Can we give this a higher priority? It is pretty painful to land patches when you push the numbers a bit via including a new file...

@fitzgen
Copy link
Member Author

fitzgen commented May 16, 2017

I don't personally have the cycles to work on this. Feel free to take over.

emilio added a commit to emilio/rust-bindgen that referenced this pull request May 19, 2017
This should be good enough, following the pattern of anonymous items, and should
prevent most of the current noise in stylo updates.

Closes rust-lang#620
Fixes rust-lang#619
@emilio
Copy link
Contributor

emilio commented May 19, 2017

I put some other approach to this in #708

emilio added a commit to emilio/rust-bindgen that referenced this pull request May 20, 2017
This should be good enough, following the pattern of anonymous items, and should
prevent most of the current noise in stylo updates.

Closes rust-lang#620
Fixes rust-lang#619
bors-servo pushed a commit that referenced this pull request May 20, 2017
codegen: Reuse the next_child_local_id hack for template instantiations.

This should be good enough, following the pattern of anonymous items, and should
prevent most of the current noise in stylo updates.

Closes #620
Fixes #619
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.

5 participants