Comments (7)
I've also raised this in Rust Analyzer forums: https://users.rust-lang.org/t/proc-macros-does-not-work-with-com-crate/53731
I can't understand how one can program without intellisense 🙂 I need to get this working.
from com-rs.
@Ciantic Afaik this has been working fine in the past, but even going back to rust-analyzer
2020-10-05 shows the same issue. Oddly enough jump-to-symbol works in the webview2
example.
Note that IUnknown
is a plain struct here that's not wrapped/generated by proc-macro...
from com-rs.
Edit I see you managed to repro this with all the way to 2020-10-05? Well something is broken in analyzer in that case.
My repro is here:
https://github.com/Ciantic/rust-analyzer-com-rs-failure/blob/master/src/main.rs
It appears after VSCode has started, it takes like a minute for me to appear.
from com-rs.
This was also raised here on Zulip. You'll need to enable both "Load out dirs from check" and "Enable proc macro support".
from com-rs.
@rylev It didn't work, I added it earlier: https://github.com/Ciantic/rust-analyzer-com-rs-failure/blob/master/.vscode/settings.json
Can you fork my repo and fix the example? I can't figure it out.
from com-rs.
Uh, looks like my Zulip thing has gone forward more, Jonas Schievink opened an PR rust-lang/rust-analyzer#7171
And commented that
Ah, the problem is that the interfaces! macro collides with the interfaces module, apparently, so I'm assuming the macro expansion fails early on, but works from the IDE later
So maybe it will be fixed in rust-analyzer itself?
from com-rs.
Edit I see you managed to repro this with all the way to 2020-10-05? Well something is broken in analyzer in that case.
@Ciantic Yup. Could have been (way) longer since I last actively developed on a crate with com-rs
though.
Rebuilt RA at rust-lang/rust-analyzer@861a547 (includes that PR), doesn't solve it (don't think it was intended to, but I have not read into the PR/Zulip yet).
from com-rs.
Related Issues (20)
- Parameters of class implementation should be borrowed, not owned
- Compatibility with Windows SDK / winapi crate HOT 1
- AbiTransferable on complex structures in winapi crate HOT 5
- Drop of COM class not working in webview2 example?
- Future of this crate HOT 6
- Interfaces nested more than 2 levels deep do not compile HOT 1
- Does class! support generic types? HOT 1
- docs.rs failed to build com-0.4.0 HOT 1
- Request to add an "Accessible" example
- Question: How do I get interface vptr from a struct? HOT 2
- com::interfaces! is not clean of clippy warnings HOT 1
- New release? HOT 2
- Generate rust code from IDL/TLB/COM dll? HOT 14
- How to use com-rs? HOT 1
- Could not find `class` in `com` HOT 3
- Support local (not/temporarily heap allocated) class instances
- Incompatible with Windows-rs HOT 4
- This repo is missing important files
- any way to use activex dll?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from com-rs.