Skip to content

Conversation

@Legend-Master
Copy link
Contributor

Wrap the generated context code in a function to make rust analyzer faster, this is probably a hack but it works 😂

Before:

before.mp4

After:

after.mp4

@Legend-Master Legend-Master requested a review from a team as a code owner November 13, 2025 03:13
@github-project-automation github-project-automation bot moved this to 📬Proposal in Roadmap Nov 13, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 13, 2025

Package Changes Through a1bf4f5

There are 1 changes which include tauri-codegen with patch

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
tauri-codegen 2.5.0 2.5.1
tauri-macros 2.5.0 2.5.1
tauri-build 2.5.1 2.5.2
tauri 2.9.2 2.9.3

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@FabianLars
Copy link
Member

How did you come up with the idea to wrap it in a function?

@Legend-Master
Copy link
Contributor Author

Legend-Master commented Nov 13, 2025

How did you come up with the idea to wrap it in a function?

It was quite a journey 😂 So basically I was wondering why the completion's so slow in that function a long time ago, and I found out if I remove this macro, the problem goes away, then I tried to poke around all sorts of different methods but nothing worked so I left it until now

The only things I noticed that worked before were

  1. Remove all the capability staffs
  2. Move the entire generate_context macro to a function (by the way, a closure doesn't work here)

I was trying to put up a documentation on how to improve this by letting rust analyzer ignore this macro with rust-analyzer.procMacro.ignored but thought I'd give it a final shot here we are 🙃

@Legend-Master Legend-Master merged commit 8e3bd63 into tauri-apps:dev Nov 13, 2025
19 checks passed
@github-project-automation github-project-automation bot moved this from 📬Proposal to 🔎 In audit in Roadmap Nov 13, 2025
@Legend-Master Legend-Master deleted the wrap-generate-context branch November 13, 2025 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🔎 In audit

Development

Successfully merging this pull request may close these issues.

2 participants