Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Updating Decl's FullNames #1350

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

Merged
merged 6 commits into from
Dec 19, 2024
Merged

Conversation

grantnelson-wf
Copy link
Collaborator

@grantnelson-wf grantnelson-wf commented Nov 19, 2024

The blocking analysis was looking up the generic name for a declaration and may have been finding the function variable declaration (used for storing all instances of a generic function). To fix this we need the declarations to have better full names.

Changes:

  • I added some methods used to generate names that could be used to lookup decls in most cases. In some cases it would be difficult to get a unique name, e.g. init functions, when performing a lookup in an Archive. Fortunately, those cases have no need to be looked up (yet or ever as far as I can figure).

  • Updated the unit-tests that were using regular expression matching of the JS code to instead use these new names.

  • Added t.Helper() calls into info_test.go assert methods, as asked for in Fixing issues in analysis around generics #1351 (comment)

This is related to #1013 and #1270

@grantnelson-wf grantnelson-wf self-assigned this Nov 19, 2024
@grantnelson-wf grantnelson-wf force-pushed the setDeclNames branch 4 times, most recently from 406458e to 6b7259d Compare November 19, 2024 22:58
@grantnelson-wf grantnelson-wf marked this pull request as ready for review December 9, 2024 17:56
Copy link
Member

@nevkontakte nevkontakte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be worth adding a sanity check somewhere that no archive has two decls with the same full name.

@grantnelson-wf grantnelson-wf merged commit 289ebba into gopherjs:master Dec 19, 2024
10 checks passed
@grantnelson-wf grantnelson-wf deleted the setDeclNames branch December 19, 2024 16:44
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.

3 participants