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

Preproposal: Shared cache and lifetime cycle at proc_macro context #2961

Closed
zzau13 opened this issue Jul 19, 2020 · 2 comments
Closed

Preproposal: Shared cache and lifetime cycle at proc_macro context #2961

zzau13 opened this issue Jul 19, 2020 · 2 comments

Comments

@zzau13
Copy link

zzau13 commented Jul 19, 2020

It is a poorly worked idea, but I think it could be put to good use.

  • share a RwLock between proc_macros
    With the aim of being able to share intermediate representations and to be able to treat the nested ones.
  • add lifetime synchronization cycle, like webpack or some other bundler
    In order to prioritize
  • Unique identifier for types
    To be able to locate and solve

I think that of the types is currently not possible since they resolve after the proc_macro, but some approach can be tried

@burdges
Copy link

burdges commented Jul 19, 2020

I'd suggest closing this issues and moving any discussion to https://users.rust-lang.org/ and maybe later https://github.com/rust-unofficial if it goes anywhere.

It's extremely messy handle lifetime-like constructs besides the actual lifetimes provided by rustc, even thread local storage sucks rust-random/rand#996 rust-random/rand#968 so really rust should require formal proofs of soundness for such things.

@zzau13
Copy link
Author

zzau13 commented Jul 19, 2020

Ok, I'm closing it and looking for another way more soundness

@zzau13 zzau13 closed this as completed Jul 19, 2020
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

2 participants