Skip to content
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

tinygo: add relative and absolute --dir options to wasmtime args #4431

Merged
merged 7 commits into from
Sep 17, 2024

Conversation

ydnar
Copy link
Contributor

@ydnar ydnar commented Aug 22, 2024

This normalizes the --dir arguments passed to wasmtime for both wasip1 and wasip2 when running tinygo test or tinygo run. The additional --dir and PWD arguments will now be reflected when using -x.

@dgryski
Copy link
Member

dgryski commented Aug 26, 2024

I think there is some code in the waisp1 or wasip2 branch that detects "something" (will need to double check) based on the first or last --dir option provided. Are we breaking anything else by effectively having two names for each directory in the module path here?

@ydnar ydnar marked this pull request as ready for review August 26, 2024 19:41
@ydnar
Copy link
Contributor Author

ydnar commented Aug 26, 2024

I think there is some code in the waisp1 or wasip2 branch that detects "something" (will need to double check) based on the first or last --dir option provided. Are we breaking anything else by effectively having two names for each directory in the module path here?

It worked for the tests I ran. Did you discover anything?

@dgryski
Copy link
Member

dgryski commented Aug 26, 2024

No, I was just wondering because I know I had issues with argument ordering. I didn't see any failures, but I can run my larger test corpus and see what falls out.

@aykevl
Copy link
Member

aykevl commented Aug 27, 2024

@ydnar did you get any further with this PR?
You could try running the test locally (make test GOTESTPKGS=. GOTESTFLAGS="-v -run=Build"), maybe it'll give some more information as to what goes wrong?

@ydnar
Copy link
Contributor Author

ydnar commented Aug 27, 2024

I haven't. I'll try that!

@ydnar ydnar force-pushed the ydnar/wasi-rel-abs-part-deux branch from 75ae352 to 0743587 Compare September 15, 2024 20:52
@deadprogram
Copy link
Member

@ydnar looks like CI still failing here:
https://github.com/tinygo-org/tinygo/actions/runs/10874218316/job/30180223920?pr=4431#step:19:33

Possible timeout?

@ydnar ydnar force-pushed the ydnar/wasi-rel-abs-part-deux branch from 0743587 to 2aa50b4 Compare September 16, 2024 16:56
@ydnar
Copy link
Contributor Author

ydnar commented Sep 17, 2024

Looks like a logic error on my part. Fixed!

I wanted -x to accurately reflect the arguments passed to wasmtime, but I initially failed to account for the difference between running go test and go run in the section where I moved the --dir arguments to. The last commit fixes this.

@ydnar ydnar self-assigned this Sep 17, 2024
@deadprogram
Copy link
Member

@ydnar LGTM do you want to squash these commits yourself, or would you prefer that I do it for you?

@ydnar
Copy link
Contributor Author

ydnar commented Sep 17, 2024

Is squash merge okay?

@deadprogram deadprogram merged commit 5a014dd into tinygo-org:dev Sep 17, 2024
17 checks passed
@deadprogram
Copy link
Member

Is squash merge okay?

Done. Thank you very much!

leongross pushed a commit to leongross/tinygo that referenced this pull request Sep 23, 2024
…ygo-org#4431)

main: add relative and absolute --dir options to wasmtime args
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