Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add purge directive #1258

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 7 commits into from
Dec 29, 2023
Merged

Add purge directive #1258

merged 7 commits into from
Dec 29, 2023

Conversation

grantnelson-wf
Copy link
Collaborator

Summary

After a conversation with Nevkontakte (here), the current goal is to make go1.19 support without generics possible by dropping generic code. To accomplish this, I'm adding a new directive, gopherjs:purge, which will remove parts of the original code without replacing them with something in the overlay/override code. The native code will have the directive for some declaration or specification identifier and both the overlay and original will have that decl/spec removed from it.

This will allow us, in a follow up ticket, to add things into the natives that we want to remove, e.g. type Pointer[T any] struct {} in atomic. This will also help with imports for variable type constraints, e.g. type Foo[T cmp.Ordered](value T).

Dependancies

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.

I left a couple of minor suggestions, but otherwise looks good. Please ping this PR once the other PRs are merged and it is rebased.

build/build.go Outdated Show resolved Hide resolved
build/build_test.go Outdated Show resolved Hide resolved
@nevkontakte
Copy link
Member

All looks good and I've merged #1257. Could you please resolve the conflicts? I'll merge this one then. Thanks!

@grantnelson-wf
Copy link
Collaborator Author

grantnelson-wf commented Dec 29, 2023

Updated and resolved. Thank you!

After these changes, the CI is error in the build is [compiler panic] T has unexpected type *types.TypeParam. So we just need to start tracking down those generics that are getting to the compiler and remove them using prune. (I'm also going to add some code to the compiler that says generics isn't supported and gives some more information to help with this effort.)

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.

Thank you!

@nevkontakte nevkontakte merged commit 38b4d3b into gopherjs:go1.19 Dec 29, 2023
@grantnelson-wf grantnelson-wf deleted the addPurgeDirective branch January 8, 2024 15:51
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.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.