You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
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.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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