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

Migrate procmacros support to the v1-v2 compatibility mode of PMS #452

Open
mkaput opened this issue Mar 10, 2025 · 0 comments
Open

Migrate procmacros support to the v1-v2 compatibility mode of PMS #452

mkaput opened this issue Mar 10, 2025 · 0 comments
Assignees

Comments

@mkaput
Copy link
Member

mkaput commented Mar 10, 2025

TODO:

  • Obtain somehow information about the mapping of attribute to it's plugin version (i.e. from scarb, on defined macros request?)
  • Modify proc_macro_server_types to allow v1/v2 requests (different proc-macro-server request formats)
  • Using 1. and 2. point send the request in appropriate format for expansion to proc-macro-server

Testing scenarios

  1. test with a package that has dependency on proc macro that uses old API
  2. test with a package that has dependency on proc macro that uses new API
  3. test with a package that has dependency on both mentioned proc macros

In all of the above cases:

  • check if macros expand correctly via Cairo: Recursively expand (...) command from command palette
  • check if an invalid code treated with macros generates reasonable diagnostics
  • check if any package has only macros it directly depends on available(exception: re-export-cairo-plugins)
  • check if diagnostics are correctly mapped
  • check if goto/hover etc. work correctly (also related to mappings)

Note

Keep in mind macros may take a while to be calculated especially on large projects like OZ. Spinner is your friend in assessing whether any other calculations are still going on.

@mkaput mkaput converted this from a draft issue Mar 10, 2025
@mkaput mkaput changed the title Test procmacros migration effort in Scarb with LS Migrate procmacros support to procmacros & PMS v2 Mar 10, 2025
@mkaput mkaput changed the title Migrate procmacros support to procmacros & PMS v2 Migrate procmacros support to the v1-v2 compatibility mode of PMS Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

2 participants