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: .app directory disappears if package is called main #15779

Closed
rakyll opened this issue May 20, 2016 · 2 comments
Closed

Comments

@rakyll
Copy link
Contributor

rakyll commented May 20, 2016

Targeting ios, gomobile build cannot name the .app directory correctly if the application is called main. gomobile exists with 1 without any error message.

$ cat main.go
// Copyright 2016 The Go Authors.  All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package main

import "golang.org/x/mobile/app"

func main() {
    app.Main(func(a app.App) {
    })
}


$ gomobile build -target=ios -x .
# ...
mv $WORK/build/Release-iphoneos/main.app ..app
rm -r -f "$WORK"
@rakyll rakyll added this to the Unreleased milestone May 20, 2016
@rakyll rakyll self-assigned this May 20, 2016
@rakyll
Copy link
Contributor Author

rakyll commented May 20, 2016

This is related to the case where pkg.ImportPath is ".".

gomobile build -target=ios <fullpkgname>

works perfectly.

@gopherbot
Copy link

CL https://golang.org/cl/23307 mentions this issue.

@golang golang locked and limited conversation to collaborators May 25, 2017
imWildCat pushed a commit to imWildCat/go-mobile that referenced this issue Apr 10, 2021
Fixes golang/go#15779.

Change-Id: I762e5ce12b8b76da80af73ddae26dbd46241f134
Reviewed-on: https://go-review.googlesource.com/23307
Reviewed-by: David Crawshaw <crawshaw@golang.org>
imWildCat pushed a commit to imWildCat/go-mobile that referenced this issue Apr 11, 2021
Fixes golang/go#15779.

Change-Id: I762e5ce12b8b76da80af73ddae26dbd46241f134
Reviewed-on: https://go-review.googlesource.com/23307
Reviewed-by: David Crawshaw <crawshaw@golang.org>
@rsc rsc unassigned rakyll Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants