Skip to content

Conversation

@ydnar
Copy link
Contributor

@ydnar ydnar commented Aug 20, 2024

Fixes running tests without -target=wasip1, e.g.:

GOOS=wasip1 GOARCH=wasm tinygo test ./...

@ydnar ydnar requested a review from dgryski August 20, 2024 23:56
@ydnar ydnar self-assigned this Aug 20, 2024
Copy link
Member

@dgryski dgryski left a comment

Choose a reason for hiding this comment

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

Approving for now to fix CI issues, but a better fix exists.

@dgryski dgryski merged commit 336b9b3 into tinygo-org:dev Aug 21, 2024
@deadprogram
Copy link
Member

Is this fix urgent enough to justify a patch release?

Copy link
Member

@aykevl aykevl left a comment

Choose a reason for hiding this comment

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

  • Options is what is passed on the command line or via environment variables.
  • Target is what is loaded from targets/*.json (or constructed at runtime for Linux/MacOS/Windows and some wasm targets).

A cleaner fix would be to use config.GOOS(). The Config struct is the one source of truth given the two inputs which might conflict. (And in this case, it just returns config.Target.GOOS so the fix is correct).

@ydnar
Copy link
Contributor Author

ydnar commented Aug 21, 2024

I'll make a new PR that uses that API.

I think I want to understand the differences between wasip1 and wasip2 w/r/t directories, Cwd, etc. Will talk with @dgryski to understand.

I think post second patch it's worth shipping a new release.

@deadprogram
Copy link
Member

deadprogram commented Aug 21, 2024

I think post second patch it's worth shipping a new release.

OK, sounds like a plan.

@ydnar ydnar deleted the ydnar/wasi-rel-abs branch August 26, 2024 19:40
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.

4 participants