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/cmd/gomobile: generates an .app even though build fails #12505

Closed
rakyll opened this issue Sep 4, 2015 · 2 comments
Closed

x/mobile/cmd/gomobile: generates an .app even though build fails #12505

rakyll opened this issue Sep 4, 2015 · 2 comments
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile
Milestone

Comments

@rakyll
Copy link
Contributor

rakyll commented Sep 4, 2015

$ rm -rf example.app
$ cat main.go
package main

import (
    "fmt"
    "time"
)

func main() {
    for i := 0; i < 5000*1000; i++ {
        go func() {
            fmt.Println("hello")
            time.Sleep(time.Second)
        }()
    }

}

$ gomobile build -target=ios .
gomobile: github.com/rakyll/gom/example does not import "golang.org/x/mobile/app"

$ stat example.app
16777220 152150587 drwxr-xr-x 8 jbd (5000) 0 272 "Sep  4 15:52:31 2015" "Sep  4 15:52:05 2015" "Sep  4 15:52:05 2015" "Sep  4 15:52:04 2015" 4096 0 0 example.app

Expected output: The build should fail and the .app should not be generated.

@rakyll rakyll self-assigned this Sep 4, 2015
@rakyll rakyll added this to the Unreleased milestone Sep 4, 2015
@rakyll
Copy link
Contributor Author

rakyll commented Sep 14, 2015

/cc @crawshaw @hyangah

The same behavior applies to -target=android as well, the apk is generated even though gomobile build fails with:

gomobile: golang.org/x/mobile/example/hello does not import "golang.org/x/mobile/app"

I am not sure what is the intention behind the current behavior, we can always delete the intermediate app and apk files if x/mobile/app import condition fails. Currently, the error message reads as it is a warning but gomobile build exits with an error.

@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Jul 20, 2017
@changkun
Copy link
Member

gomobile works as expected today, this is fully outdated. Close.

@rsc rsc unassigned rakyll 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
Projects
None yet
Development

No branches or pull requests

3 participants