Skip to content

feat: add macro expansion capability to Analysis and Indexer#559

Open
Draggu wants to merge 1 commit into
expert-lsp:mainfrom
Draggu:expand-macros
Open

feat: add macro expansion capability to Analysis and Indexer#559
Draggu wants to merge 1 commit into
expert-lsp:mainfrom
Draggu:expand-macros

Conversation

@Draggu
Copy link
Copy Markdown
Contributor

@Draggu Draggu commented Apr 8, 2026

Close #517 #536

This PR uses Spitfire expand to get macro expansions in Analysis, then indexer can visit expanded asts too. There is assumption that all generataed code will be pointing to whole macro call. Making it more precise is complex and can be done on top of this PR

@Draggu Draggu marked this pull request as draft April 8, 2026 12:59
@Draggu
Copy link
Copy Markdown
Contributor Author

Draggu commented Apr 8, 2026

Seems like it won't work on 1.16 due to missing Macro.Env functions. I'm reluctant to copy-paste their polyfill though

@Draggu Draggu marked this pull request as ready for review April 9, 2026 10:49
@katafrakt
Copy link
Copy Markdown
Member

Regarding the polyfills, I personally think that if it's only Elixir 1.16 that's affected and it's basically a new functionality, it would be ok to guard around the version and not offer this for Elixir 1.16 users. Not sure what others think.

@doorgan
Copy link
Copy Markdown
Contributor

doorgan commented Apr 23, 2026

I agree with @katafrakt

@doorgan doorgan self-requested a review April 29, 2026 15:58
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

Successfully merging this pull request may close these issues.

References not found if function is imported by use

3 participants