https://github.com/encoredev/go
Encore's rolling fork of Go with added automatic tracing & instrumentation
https://github.com/encoredev/go
distrbuted-tracing encore go golang hacktoberfest
Last synced: about 1 month ago
JSON representation
Encore's rolling fork of Go with added automatic tracing & instrumentation
- Host: GitHub
- URL: https://github.com/encoredev/go
- Owner: encoredev
- Created: 2020-08-25T07:35:14.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2025-04-02T14:40:03.000Z (2 months ago)
- Last Synced: 2025-04-30T21:05:56.957Z (about 1 month ago)
- Topics: distrbuted-tracing, encore, go, golang, hacktoberfest
- Language: Go
- Homepage: https://encore.dev
- Size: 207 MB
- Stars: 12
- Watchers: 5
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Encore Rolling Go Fork
This is [Encore's](https://github.com/encoredev/encore) rolling fork of Go with added automatic instrumentation.
This branch contains the raw patches, which allow us to re-apply them ontop of new Go releases.
This system produces [reproducible builds](https://reproducible-builds.org/) of the patched Go runtime. This means you can clone this repository, run the commands listed below and reproduce an identical go binary that we ship with our tooling.
## How to Use
1. Checkout this repository and then initial the Git submodule; `git submodule init && git submodule update`
2. Create a fresh patched version of the Go runtime, passing in the Go version you want; `./apply_patch.bash 1.17`
(Note: instead of a Go version number, you can pass in `master` to build against the latest Go development commit)
3. Run our build script using; `go run . --goos "darwin" --goarch "arm64"`
(replacing the OS and arch parameters to match your requirement)
4. Verify your go was build; `./dist/darwin_arm64/encore-go/bin/go version`
The output you see should look like this, looking for the `encore-go` string;
`go version encore-go1.17.6 encore-go1.17-4d15582aff Thu Jan 6 19:06:43 2022 +0000 darwin/arm64`## Directory Structure
This branch is broken up into three main folders;
- `overlay`; this folder contains brand-new Encore specific files which should be copied into the `src` path of a fresh Go Release
- `patches`; this folder contains patch files to modify the existing Go source code
- `go`; a submodule checkout of https://go.googlesource.com/go which we apply the above two folders against## Creating Patches
If patches do not apply due conflicts, or you need to make other changes to the Go runtime, apply the patches to get a
base build, fix any conflicts or make your changes. Then from within the `go` folder, for each file run this command to
copy the exact patch.```
git diff --cached src/runtime/runtime2.go | pbcopy
```Then create a new or update an existing `.diff` file in the patches folder. Once you've updated all the patches, re-run
the `./apply_patches.bash` script again to check your changes work.