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

Fix #4421: Add -C DIR flag #4422

Merged
merged 4 commits into from
Sep 13, 2024
Merged

Conversation

archie2x
Copy link
Contributor

See #4421

Implementation is copied from BigGo 1.22.5 with minor modification.

https://github.com/golang/go/blob/d79c350916c637de911d93af689a5e4e7ab5a5bb/src/cmd/go/main.go#L330

@archie2x archie2x marked this pull request as ready for review August 20, 2024 19:33
@deadprogram
Copy link
Member

Hello @archie2x thanks for the PR. Just wondering if you could add a test of some kind, perhaps?

@archie2x
Copy link
Contributor Author

archie2x commented Sep 6, 2024

Hello @archie2x thanks for the PR. Just wondering if you could add a test of some kind, perhaps?

Absolutely. A test didn't originally seem obvious to me but I think something as simple as tinygo build -C testdata testprogram.go should work. I'll put that together. Should I rebase?

@deadprogram
Copy link
Member

Should I rebase?

Yes, please!

@archie2x
Copy link
Contributor Author

Hello @archie2x thanks for the PR. Just wondering if you could add a test of some kind, perhaps?

Absolutely. A test didn't originally seem obvious to me but I think something as simple as tinygo build -C testdata testprogram.go should work. I'll put that together. Should I rebase?

Please let me know if the attached tests suffice for now. I wasn't familiar with the test framework here. I think there may be some opportunity to cleanup how temp directories are used? I'm getting quite a few in my /tmp when I try to run everything locally.

…hanges directory)

Signed-off-by: Roger Standridge <[email protected]>
@deadprogram deadprogram requested review from dgryski, niaow and aykevl and removed request for niaow September 11, 2024 19:09
tests/testing/chdir/chdir.go Outdated Show resolved Hide resolved
tests/testing/chdir/chdir.go Outdated Show resolved Hide resolved
tests/testing/chdir/chdir.go Show resolved Hide resolved
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.

LGTM. CI passes on Windows now.

@deadprogram
Copy link
Member

Thank you very much for the PR @archie2x and to @dgryski for review.

Now squash/merging.

@deadprogram deadprogram merged commit 5abf1e9 into tinygo-org:dev Sep 13, 2024
33 checks passed
leongross pushed a commit to leongross/tinygo that referenced this pull request Sep 23, 2024
feature: Fix tinygo-org#4421: Add `-C DIR` flag

Signed-off-by: Roger Standridge <[email protected]>
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