-
Notifications
You must be signed in to change notification settings - Fork 1
docs: add TinyGo sync strategy documentation #10
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
Open
xgopilot
wants to merge
5
commits into
main
Choose a base branch
from
xgopilot/claude/issue-9-1761735724
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
9b10653
docs: add TinyGo sync strategy documentation
xgopilot 5f86b29
docs: add CLAUDE.md with link to TinyGo sync strategy
xgopilot 41893bf
docs: clarify TinyGo sync source as release packages
xgopilot 8b5effb
docs: consolidate redundant machine and device branch info
xgopilot 345bec3
docs: clarify TinyGo release packages are platform-identical
xgopilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # Claude Code Guidelines | ||
|
|
||
| ## Documentation | ||
|
|
||
| - [TinyGo Sync Strategy](docs/tinygo-sync-strategy.md) - Branch structure and workflow for syncing with TinyGo upstream |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| # TinyGo Sync Strategy | ||
|
|
||
| ## Goals | ||
|
|
||
| Establish a clear branch structure to enable us to: | ||
| - Track TinyGo official updates | ||
| - Clearly demonstrate our customizations on top of TinyGo | ||
| - Facilitate code review and maintenance | ||
|
|
||
| ## Branch Structure | ||
|
|
||
| ### `machine` Branch | ||
| - **Responsibility**: Pure mirror of TinyGo's official `src/machine` module | ||
| - **Update Source**: TinyGo release packages (e.g., [tinygo0.39.0.linux-amd64.tar.gz](https://github.com/tinygo-org/tinygo/releases)) | ||
| - **Note**: TinyGo does not directly store `src/machine` in their repository. Copy this module from official release packages. | ||
| - **Rules**: Sync only, no custom modifications | ||
| - **Commit Tag**: `[SYNC] Update machine to TinyGo <version>` | ||
|
|
||
| ### `device` Branch | ||
| - **Responsibility**: Pure mirror of TinyGo's official `src/device` module | ||
| - **Update Source**: TinyGo release packages (e.g., [tinygo0.39.0.linux-amd64.tar.gz](https://github.com/tinygo-org/tinygo/releases)) | ||
| - **Note**: TinyGo does not directly store `src/device` in their repository. Copy this module from official release packages. | ||
| - **Rules**: Sync only, no custom modifications | ||
| - **Commit Tag**: `[SYNC] Update device to TinyGo <version>` | ||
|
|
||
| ### `main` Branch | ||
| - **Responsibility**: Production code version (protected) | ||
| - **Composition**: Merged from `machine` and `device` branches + our custom modifications | ||
| - **Rules**: ⛔ No direct push, all changes must go through PR | ||
|
|
||
| ## Workflow | ||
|
|
||
| ### 1. Daily Development | ||
| - Create development branch from main | ||
| - Develop and commit | ||
| - Create PR to main | ||
| - Code review and merge | ||
| - Clean up development branch | ||
|
|
||
| ### 2. Sync Upstream Updates | ||
| - Update machine/device branches (commit with `[SYNC]`) | ||
| - Create sync branch or directly create PR | ||
| - Resolve conflicts (if any) | ||
| - Code review and merge | ||
|
|
||
| ## Practical Use Cases | ||
|
|
||
| ### Case 1: Daily Feature Development | ||
|
|
||
| **Scenario**: Add new features or modifications | ||
|
|
||
| **Process**: | ||
| 1. Create development branch | ||
| 2. Develop and commit | ||
| 3. Create PR to main | ||
| 4. Review and merge | ||
|
|
||
| --- | ||
|
|
||
| ### Case 2: Merge Upstream Updates | ||
|
|
||
| **Scenario**: TinyGo releases new version, sync to our repository | ||
|
|
||
| **Notes**: | ||
| - Do not directly track upstream dev branch | ||
| - Track upstream minor version updates | ||
|
|
||
| **Process**: | ||
| 1. Sync to machine branch (commit with `[SYNC]`) | ||
| 2. Sync to device branch (commit with `[SYNC]`) | ||
| 3. On main branch, sync files from machine and device branches | ||
| 4. Apply our custom modifications on the updated base (if needed) | ||
| 5. Create PR to main | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xgopilot some redundant at
machineBranch &deviceBranchUh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Task Complete
Eliminated redundancy by consolidating the
machineanddevicebranch sections into a single combined section since they share identical properties (update source, rules, and commit tag structure).Changes made:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xgopilot note the src/device and src/machine in each platform of the release package are identical, so one of them was selected.