Comments (6)
Thanks for your issue report. You need to move main.go into a package. Code cannot be built at the root of src/ because that is not a package, it has no name.
On 9 May 2015, at 20:52, laszlothewiz [email protected] wrote:
I set up a simple project:
src/main.go
vendor/src/go-ini/ini.goWhen I run gb build all nothing happens, no files created, no error messages.
I ran gb build -v=true all and got the following:
DEBUG project root "t:\2015\PJT\Golang\CWI Automation"
DEBUG matchPackages: [t:\2015\PJT\Golang\CWI Automation\src] all
DEBUG args: []
DEBUG removing work directory: C:\Users\Laci\AppData\Local\Temp\gb086314939
DEBUG build duration: 976.6us map[]I would be happy to debug this but don't even know where to start.
—
Reply to this email directly or view it on GitHub.
from gb.
Thank you for the quick response!
However, after moving the source files into a folder, the build fails (cwia
is the folder I moved the files to):
FATAL command "build" failed: failed to resolve package "cwia": cannot find package "cwia" in any of:
C:\Go\src\pkg\cwia (from $GOROOT)
t:\2015\PJT\Golang\CWI Automation:t:\2015\PJT\Golang\CWI Automation\vendor\src\cwia (from $GOPATH)
Also, could gb
consider the .go files directly under /src as the main project files and assume the name for them to be the project directory's name?
Eg: ~/someproject/src/main.go
could generate a someproject.exe
This would be ideal for small projects
from gb.
Possibly, but if you put your files in src/someoroject/main.go the we wouldn't have to add a special case
from gb.
That's fine but I moved my files under a subdirectory (cwia
) in /src
and I got the above error when trying to build.
from gb.
Let me take a look tomorrow. There is a known error on windows #27 and another issue for building in src/ directly #46
from gb.
Thanks!
from gb.
Related Issues (20)
- gb should fail early with unknown/unsupported GOOS or GOARCH value
- Error vendoring gb with gb-vendor HOT 2
- gb build does not create bin folder and binary in bin folder HOT 24
- Website needs list of projects using GB
- Gogland (perhaps also others) configuration example HOT 1
- why vendor/src? HOT 1
- gb build fails on centos7 with linking error HOT 6
- have any command copy a package from $GOPATH
- Can't build project in Docker HOT 2
- gb build do not work correctly on windows (can work correctly on linux)
- Build of Go's runtime package fails when cross-compiling with go1.9.4 HOT 6
- horizon HOT 4
- using gb to make a library HOT 2
- Is the gb project dead? HOT 15
- / HOT 1
- gb vendor doesn't work with fish shell HOT 1
- [SOLVED] How to migrate to go modules? HOT 6
- gb + IDE ? HOT 1
- Cross build not working on OSX: cgo_export_static main only allowed in cgo-generated code
- module github.com/constabulary/gb@latest found (v0.4.4), but does not contain package github.com/constabulary/gb/internal/vendor HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gb.