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

Supporting web-sys and other packages with generated bindings #1150

Closed
chinedufn opened this issue Apr 15, 2019 · 7 comments
Closed

Supporting web-sys and other packages with generated bindings #1150

chinedufn opened this issue Apr 15, 2019 · 7 comments
Labels

Comments

@chinedufn
Copy link
Contributor

Auto generated bindings such as those in web-sys don't show up in auto complete.

So, for example: if you typed:

fn main () {
  web_sys::WebG
}

You'd expect the auto completion to suggest WebGlRenderingContext, but it doesn't suggest anything.


Here are some related issues in intellij-rust (I include them because my uneducated assumption is that rust-analyzer has the same challenge. If they're unrelated I'd be happy to remove the links!)

intellij-rust/intellij-rust#1908
intellij-rust/intellij-rust#3131


Cheers!

@chinedufn chinedufn changed the title Supporting generated bindings Supporting web-sys and other packages with generated bindings Apr 15, 2019
@edwin0cheng
Copy link
Member

edwin0cheng commented Apr 16, 2019

I think this issue related to following things RA is missing / still developing right now:

  • proc_macro
  • allow register internal macro in ra_mbe , related rustc code : link
  • Support target/......../out directory in ra_vfs ?!
  • how to handle std::env ? It is quite tricky..

@jrvidal
Copy link
Contributor

jrvidal commented Apr 16, 2019

Re: env!(...)/std::env... how would one even go about that? Does cargo expose that information in any way?

@matklad
Copy link
Member

matklad commented Apr 16, 2019

how would one even go about that?

We should have a white-list of environmental variables that are exposed to analyzer as an input:

#[salsa::input]
fn env_var(&self, crate: CrateId, name: SmolStr) -> SmolStr

Note that we have a CrateId parameter there as well: env vars could be different for various crates.

@matklad matklad added the E-hard label Apr 18, 2019
@chinedufn
Copy link
Contributor Author

Are there any open issues related to some of the things that are necessary for this to be possible that I can follow?
Thanks so much!

@lnicola
Copy link
Member

lnicola commented Jun 25, 2019

@chinedufn I guess #1428 wouldn't hurt here.

@matklad
Copy link
Member

matklad commented Oct 7, 2019

Let's close this in favor of more specific #1964

@matklad matklad closed this as completed Oct 7, 2019
@CGMossa
Copy link

CGMossa commented Jun 2, 2020

This is still relevant, I think #4150 is the most recent issue that is related to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants