Skip to content

[go1.20] Added temporary generics override for time formatting #1280

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 1 commit into from
Apr 1, 2024

Conversation

grantnelson-wf
Copy link
Collaborator

@grantnelson-wf grantnelson-wf commented Mar 26, 2024

All these overrides are temporary while generics development is in progress.

A few methods in time use generics to allow string or []byte to be used for formatting and parsing. To make these work I copied the method that needed to be temporarily replaced, then changed the generic parameter to any. The only complication is that one of these methods returns a generic type, meaning anything calling it has to have the value cast and thus overwritten too.

This is part of #1270. After these changes (and removing var _ = &Pointer[int]{} from sync/atomic/type.go:40) running go1.20.14 install -v && gopherjs build -v net/http results in:

go1.20.14/src/os/file_unix.go:119:1: gopherjs: //go:linkname can not insert local implementation into an external package "net"
../../../../../sdk/go1.20.14/src/os/proc.go:75:21: too many arguments in call to runtime_beforeExit
        have (int)
        want ()

@grantnelson-wf grantnelson-wf changed the base branch from master to go1.20 March 26, 2024 20:54
@grantnelson-wf grantnelson-wf marked this pull request as ready for review March 26, 2024 21:26
@nevkontakte nevkontakte merged commit 32a8a96 into gopherjs:go1.20 Apr 1, 2024
@grantnelson-wf grantnelson-wf deleted the tempTimeFix branch April 2, 2024 18:05
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