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

x/mobile: example ivy demo on ios should not require a Go installation #48694

Closed
robpike opened this issue Sep 30, 2021 · 8 comments
Closed

x/mobile: example ivy demo on ios should not require a Go installation #48694

robpike opened this issue Sep 30, 2021 · 8 comments
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@robpike
Copy link
Contributor

robpike commented Sep 30, 2021

The ")demo" special command runs an interactive demonstration of ivy's abilities, but only prints an error message about the lack of a Go compiler when on iOS.

Fix that. Might require a change to how the demo runs in ivy proper, but should be isolatable to mobile if that makes more sense.

@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Sep 30, 2021
@gopherbot gopherbot added this to the Unreleased milestone Sep 30, 2021
@mknyszek mknyszek added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 4, 2021
@mknyszek
Copy link
Contributor

mknyszek commented Oct 4, 2021

@robpike
Copy link
Contributor Author

robpike commented Oct 4, 2021

Actually it's probably my job to fix this.

@robpike robpike self-assigned this Oct 5, 2021
@ydnar
Copy link

ydnar commented Oct 5, 2021

@robpike does it work on macOS?

@robpike
Copy link
Contributor Author

robpike commented Oct 5, 2021

Yes, provided there is a Go compiler installed.

robpike added a commit to robpike/ivy that referenced this issue Oct 12, 2021
Instead of making it a separate program, stitch it in to the binary itself,
meaning that the demo can be run without a Go compiler. The idea was
to make it easier for mobile users to see the demo, (see
golang/go#48694), but that may be a
false hope as I/O on mobile does everything possible to avoid the
Unix idea of stdin and stdout.

Still, it does clean up the way the demo works, and allows us to
remove the runner and explain about it.

Use embedding to interpolate the script into the code. We could use
go generate to avoid needign such a modern feature of Go, but
meh.
@robpike
Copy link
Contributor Author

robpike commented Oct 12, 2021

robpike/ivy@adacf8f

was done with the intent of helping here, but I naively assumed that the window on iOS had stdin and stdout. Silly me. Still the refactoring may help. The way the mobile connection works now is easy but inflexible.

I might just put in a mechanism so the )demo command can know we're on mobile and give other directions for the demo.

@robpike robpike changed the title x/mobile: example ivy demo should not require a Go installation x/mobile: example ivy demo on ios should not require a Go installation Oct 12, 2021
@robpike
Copy link
Contributor Author

robpike commented Oct 12, 2021

Important note: There is a Demo menu item on Android and it works fine, but on iOS there is only a Help button. The right thing to do is probably to find a way provide a similar Demo button or menu item on iOS. In either case, as mentioned earlier, the )demo special command could tell the user what to do on mobile.

@robpike
Copy link
Contributor Author

robpike commented Oct 12, 2021

I just pushed an update to ivy to clarify things a bit: robpike/ivy@670bccd

The solution I am committing to is to have the demo be run by the wrapper, as it is on Android. So we need a Demo button on iOS. I'll reach out to the community for help.

@gopherbot
Copy link

Change https://golang.org/cl/357977 mentions this issue: example/ivy/ios: enable demo functionality

@rsc rsc unassigned robpike Jun 23, 2022
@golang golang locked and limited conversation to collaborators Jun 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants