Platform sources for Go
See original GitHub issueIs there a way to have go_binary and go_library to include only the source files compatible with current platform (OS/arch)? The native go build <package>
command does that automatically, but I don’t know how to configure buck to have the same behavior.
For example, the following command shows the list of files included in go build
when I am building the package:
go list -f '{{.GoFiles}}' github.com/jessevdk/go-flags
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Our 5 Favorite Go Open Source Projects - Undo.io
Our 5 Favorite Go Open Source Projects · 1. Kubernetes · 2. Hugo · 3. CoreDNS · 4. CockroachDB · 5. Monzo Bank....
Read more >The Go Programming Language
An open-source programming language supported by Google · Easy to learn and great for teams · Built-in concurrency and a robust standard library...
Read more >A curated list of awesome Go frameworks, libraries and ...
CDS - Enterprise-Grade CI/CD and DevOps Automation Open Source Platform. drone - Drone is a Continuous Integration platform built on Docker, written in...
Read more >Top 7 Golang IDEs for Go Developers - Tabnine
LiteIDE is a simple, open source, cross-platform Go IDE that highly resembles Visual Studio and GCC C++.
Read more >Google Open Source Projects
The Go programming language is an open source project to make programmers more productive. Go is expressive, concise, clean, and efficient.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That functionality doesn’t exist yet. At facebook we wrote a small go utility that creates BUCK files with the correct files based off of build.Package (https://golang.org/pkg/go/build/#Context.Import)
Less than ideal but it works. Buck doesn’t inspect the contents of files so it cannot work the same as
go build
.The native Go compiler does filter files. If you run
go build github.com/jessevdk/go-flags
, only source files in the package compatible with the current platform are included. I am trying to figure out how Buck turns that filtering off and how I can turn it on again. Any hint?