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

Support load fixing on struct members (dotexpr) instead of just callexpr #1972

Merged

Conversation

aaronsky
Copy link
Contributor

@aaronsky aaronsky commented Nov 6, 2024

What type of PR is this?

Bug fix

What package or component does this PR mostly affect?

For example:

all

What does this PR do? Why is it needed?

The changes introduced by #1164 largely support what I need – automatic loading of non-rule symbols from known loads – except it only supports CallExpr. For imported struct fields, these are not automatically picked up, and the ergonomics of getting them loaded in Gazelle has been tricky for me. I am hoping this is a reasonable fix to this.

Which issues(s) does this PR fix?

Fixes #1971

Other notes for review

I haven't written Go in a while so please forgive the mess.

@aaronsky aaronsky marked this pull request as ready for review November 6, 2024 14:56
@aaronsky aaronsky force-pushed the aaronsky/fix-loads-struct-members branch from 02d1508 to b45f10d Compare November 8, 2024 20:59
@fmeum fmeum force-pushed the aaronsky/fix-loads-struct-members branch from b45f10d to 25b2e3b Compare November 10, 2024 12:30
@fmeum fmeum enabled auto-merge (squash) November 10, 2024 12:30
@fmeum fmeum merged commit f3bc93d into bazel-contrib:master Nov 10, 2024
14 checks passed
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.

FixLoad should load fields on structs, not just helper functions or rules
2 participants