Skip to content

FIX #4409 : Use go os/user unless baremetal #4410

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

Closed
wants to merge 1 commit into from

Conversation

archie2x
Copy link
Contributor

@archie2x archie2x commented Aug 14, 2024

See #4409

src/os/user is currently taken from tinygo sources in all cases

This change:

  • pulls in tinygo/src/os/user only when baremetal
  • uses go version otherwise
  • defines the osusergo build tag which uses a pure-go implementation of os/user
  • separates the declaration of types and errors to user.go and (stubbed) implementations to unimplemented_user.go
  • (re)imports GO1.22.6/src/os/user/user.go to tinygo/src/os/user/user.go

Should add stubbed user.{LookupId,LookupGroupId}() ?
Are there other cases where tinygo's version of this package should be used?

@aykevl
Copy link
Member

aykevl commented Aug 14, 2024

Did you see #4324?

@archie2x
Copy link
Contributor Author

Did you see #4324?

Nope! Doh!

@archie2x archie2x closed this Aug 14, 2024
@archie2x archie2x deleted the archie2x-os/user branch August 19, 2024 16:12
@leongross
Copy link
Contributor

thanks for working on this @aykevl!

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