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

Derive the names of tests and anon structs from the name of the type #394

Closed
Manishearth opened this issue Jan 11, 2017 · 0 comments
Closed

Comments

@Manishearth
Copy link
Member

Currently we generate a lot of __bindgen_test_layout_template_9-like functions, as well as use a similar way to create anonymous structs.

We should include the type name in these names. Or put them inside a module that has a name derived from the type. Within the module we can use a counting scheme.

The problem is that a change that introduces a type midway in the file will affect all the other numbers, causing lots of churn. In a recent patch I worked around this by deleting the churn from the patch and renaming the function to __bindgen_test_layout_template_9_TEMPORARY so that it gets fixed in the next sync.

bors-servo pushed a commit that referenced this issue Jul 21, 2017
Use fully disambiguated name instead of a number for layout tests (fixes #394)

These numbers cause tons of churn in the diffs for checked in bindings.

r? @fitzgen
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

No branches or pull requests

1 participant