Skip to content

Tracking issue for plugin stabilization (plugin, plugin_registrar features) #29597

Closed

Description

@aturon

Tracks stabilization for the plugin and plugin_registrar feature gates.

Activity

  1. added
    T-langRelevant to the language team
    B-unstableBlocker: Implemented in the nightly compiler and unstable.
    on Nov 5, 2015
  2. aturon commented on Nov 5, 2015

    @aturon
    ContributorAuthor

    Current status: awaiting a complete revamp of the plugin system.

    cc @nrc

  3. changed the title [-]Tracking issue for `plugin_registrar`[/-] [+]Tracking issue for plugin stabilization (`plugin`, `plugin_registrar` features)[/+] on Nov 5, 2015
  4. jimmycuadra commented on Jan 7, 2016

    @jimmycuadra
    Contributor

    Is anyone actively working on this? Curious what the status is since using Serde without the need for code generation with syntex on stable Rust is very high on my Rust wishlist. 😃

  5. steveklabnik commented on Jan 7, 2016

    @steveklabnik
    Contributor

    @nrc is

  6. aturon commented on Jan 7, 2016

    @aturon
    ContributorAuthor

    In particular, check out the discussion here, which points to a bunch of blog posts by @nrc amongst other things. He plans to finish the blog series and post an RFC soon.

  7. jimmycuadra commented on Jan 8, 2016

    @jimmycuadra
    Contributor

    Thanks Aaron—I had read a couple of the posts about the macro system but it didn't click that this was intended to replace compiler plugins for the purpose of syntax extensions. It makes sense now, and looks great. I can't wait. :}

  8. knight42 commented on Aug 23, 2016

    @knight42

    Any progress now?

  9. SimonSapin commented on Aug 23, 2016

    @SimonSapin
    Contributor

    Yes! The "Macros 1.1" RFC at rust-lang/rfcs#1681 was accepted. It’s implementation is tracked at #35900.

  10. added a commit that references this issue on Dec 8, 2016
  11. added
    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
    on Jul 22, 2017
  12. SimonSapin commented on Oct 13, 2017

    @SimonSapin
    Contributor

    The one remaining plugin in Servo is a register_late_lint_pass that analyses use of GC-managed types to make sure they’re "rooted" correctly. It traverses expressions HIR expression inside functions and methods, and requires access to the resolved type of these expressions as well as attributes on the definitions of these types. (Looking for custom attributes that indicate which types must be rooted. These attributes also need to be allowed by the compiler.)

    Could this kind of analysis be built on top of RLS? Could that be a way forward for custom lints without relying on unstable rustc internals?

  13. 49 remaining items

  14. crlf0710 commented on Jan 11, 2023

    @crlf0710
    Member

    Specifically, AST code injection.

    For the ast-level things, isn't proc_macros enough? Just execute a proc_macro at the root module of the crate, parse everything, do whatever transform you want to the code, and put them back together as a TokenStream.

  15. dlight commented on Jan 11, 2023

    @dlight

    Specifically, AST code injection.

    For the ast-level things, isn't proc_macros enough? Just execute a proc_macro at the root module of the crate, parse everything, do whatever transform you want to the code, and put them back together as a TokenStream.

    If we could do #![macro_invocations] that wraps around the whole file, this would be much easier

  16. spoutn1k commented on Jan 11, 2023

    @spoutn1k

    Just execute a proc_macro at the root module of the crate, parse everything

    Does that entail tagging every function with a macro ? This project is meant to simplify the analysis of large scientific codebases. The plugin approach removes the need to dig into every twisted codebase, instead just compiling with a secret spice mix plugin to get instrumentation.

  17. blyxyas commented on Jan 13, 2023

    @blyxyas
    Member

    I find that creating a way to use custom inner macros would solve the problem. And if the plugin system is meant to simplify the analysis of large scientific codebases, there should be an alternative. Like custom inner attributes that are applied to every item.

  18. oli-obk commented on Jan 13, 2023

    @oli-obk
    Contributor

    Note that you can already replace rustc with your own by using the RUSTC_WRAPPER env var. This allows you to do your own preprocessing of the file and feed the output of that to the actual rustc. (Keyword "custom driver" if you want to search for ways to still access rustc internals like clippy and miri do)

    The existing plugin API has not been maintained in years.

  19. added 2 commits that reference this issue on Oct 4, 2023
    5079310
    0fcfd98
  20. added a commit that references this issue on Oct 30, 2023
    7e06631
  21. added a commit that references this issue on Oct 30, 2023
    c557db7
  22. added 2 commits that reference this issue on Nov 3, 2023
    6bf6618
    5c462a3
  23. added a commit that references this issue on Nov 3, 2023
    5020f7c
  24. added a commit that references this issue on Nov 10, 2023
    8eca01f
  25. added a commit that references this issue on Nov 16, 2023
    6eaf3f8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-pluginsArea: compiler plugins (removed in https://github.com/rust-lang/rust/pull/116412)B-unstableBlocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCS-tracking-perma-unstableStatus: The feature will stay unstable indefinitely.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions