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

WIP implement a machine readable print-type-info API #43761

Closed
wants to merge 1 commit into from

Conversation

Gankra
Copy link
Contributor

@Gankra Gankra commented Aug 9, 2017

This is very messy, with some commented out stuff and some TODOs. I'm posting this now to get feedback on the approach, and so someone can tell me where stuff should go or if I'm doing some things fundamentally wrong. Note that I'm currently clobbering -Zprint-type-sizes to avoid doing driver plumbing atm.

Background Proposal (doesn't completely match impl, see below)

Draft Documentation

Sample output on gecko/gfx/webrender_bindings

Differences from background proposal:

  • Added Opaque, PrimitiveInt, and PrimtiveFloat kinds
  • Removed support for "General" enums, as binding to them in a stable way will be hard (can be done in later versions without breaking, per draft docs)
  • Backpedaled on "squashing" Rust concepts into C concepts; consumer is expected to do this themselves (see "builtin syntax" in docs)
    • Consequently suppressed more forms from being emitted (see "ommitted builtins" in docs)
  • Expected to emit every path a type can be found under (e.g. core::option::Option and std::option::Option)

TODO

  • get Visibility of types (help)
  • get type/path aliases (help!)
  • emit whether a given type is "transparent" for ABI purposes? (Box == *mut)
  • set this up as a "target format" flag, instead of -Zprint-type-sizes
  • capture public types that aren't used anywhere in the code?
  • ensure primtives are always output? (clike enums may be emitted with otherwise unused primitive base-types)

@rust-highfive
Copy link
Collaborator

r? @arielb1

(rust_highfive has picked a reviewer for you, use r? to override)

@Gankra
Copy link
Contributor Author

Gankra commented Aug 9, 2017

cc @eddyb @eqrion

@aidanhs aidanhs added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 10, 2017
@bors
Copy link
Contributor

bors commented Aug 11, 2017

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

@arielb1 arielb1 added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 15, 2017
@arielb1
Copy link
Contributor

arielb1 commented Aug 22, 2017

What's the status of this PR? Do you need any help (I won't be available until this Monday)?

@Gankra
Copy link
Contributor Author

Gankra commented Aug 27, 2017

Hey @arielb1 sorry I pivoted off this a bit and then went on vacation. Tomorrow I get back to work and, unless I get some information stating otherwise, this should be my top priority.

@arielb1
Copy link
Contributor

arielb1 commented Sep 5, 2017

Hi @gankro are you still working on this? Just a ping to make sure it isn't getting lost.

@carols10cents
Copy link
Member

Hiii Ganksy, triage procedure says a PR with >14 days of no author activity gets closed as inactive. Feel free to reopen when you have a chance to get back to this!

@carols10cents carols10cents added S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 11, 2017
@Gankra
Copy link
Contributor Author

Gankra commented Sep 11, 2017

Yeah I'll get back to this once I've got all the fires in webrender put out!

@eddyb
Copy link
Member

eddyb commented Sep 11, 2017

I have a branch in progress which if I get out soon would provide a much better baseline for this.

@Gankra
Copy link
Contributor Author

Gankra commented Oct 18, 2017

@eddyb's branch became #45225, for reference.

@Gankra
Copy link
Contributor Author

Gankra commented Oct 18, 2017

(continuing this work is blocked on that PR)

@RReverser
Copy link
Contributor

@gankro Given that the referenced PR was merged couple of months ago, are there any other blockers for this one left? (apart from free time, of course 😄 )

@Gankra
Copy link
Contributor Author

Gankra commented Feb 26, 2018

My enum RFC combined with cbindgen relieves a lot of pressure on this, and i'm recovering on indeterminate-length leave right now, so if you're interested I suggest taking this over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants