-
Notifications
You must be signed in to change notification settings - Fork 55
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: add shim for js #60
Conversation
49fa8c6
to
d6ab566
Compare
How is this expected to be used? |
It's a shim so that programs built using the console package can compile against GOOS=js as well. |
@paralin can you add a little bit more context to this issue. We don't currently have any ongoing efforts to support |
@dmcgowan The bubbletea TUI packages import containerd/console. I recently submitted several PRs to projects adding shims so that the build will complete if GOOS=js and GOARCH=wasm with reasonable defaults. I think it makes sense in general to make the package at least build cleanly with that GOOS. Even if the functions are all shims. |
@paralin if this library is being used for a platform other than what is explicitly supported, our normal pattern is to include a |
@dmcgowan okay, applied the change. |
0f5f87b
to
554c552
Compare
console_other.go
Outdated
@@ -0,0 +1,35 @@ | |||
// +build !darwin,!freebsd,!linux,!netbsd,!openbsd,!solaris |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please gofmt with Go 1.17
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AkihiroSuda If I do that, the license checker will fail. I previously sent the PR with it formatted that way, and the test failed. The containerd license checker expects this format and doesn't allow the other one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: Check file headers
run: ../project/script/validate/fileheader ../project/
working-directory: src/github.com/containerd/console
I updated the linters and licence-checker in #61, and formatted with go1.17 |
@thaJeztah @AkihiroSuda Fixed & rebased, apologies for the delay! |
Adds console_other to support not-supported platforms. Fixes build with: env GOOS=js GOARCH=wasm go build -trimpath . Signed-off-by: Christian Stewart <christian@paral.in>
Supports GOOS=js GOARCH=wasm go build containerd-console now has a shim for js as well: containerd/console#60 Update that dependency. Signed-off-by: Christian Stewart <christian@paral.in>
Supports GOOS=js GOARCH=wasm go build containerd-console now has a shim for js as well: containerd/console#60 Update that dependency. Signed-off-by: Christian Stewart <christian@paral.in>
Supports GOOS=js GOARCH=wasm go build containerd-console now has a shim for js as well: containerd/console#60 Update that dependency. Signed-off-by: Christian Stewart <christian@paral.in>
Supports GOOS=js GOARCH=wasm go build containerd-console now has a shim for js as well: containerd/console#60 Update that dependency. Signed-off-by: Christian Stewart <christian@paral.in>
Fixes build with:
env GOOS=js GOARCH=wasm go build -trimpath .