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

How to add new func and compile locally #126

Open
root-hbx opened this issue Dec 21, 2024 · 0 comments
Open

How to add new func and compile locally #126

root-hbx opened this issue Dec 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@root-hbx
Copy link

  1. My environment is MacOS Sequota 15.0.1, M2 Pro.
  2. I use orbstack ubuntu 22.04 VM in this process.

I follow contributing page.

Currently I just fork the original repo and clone it. Then I git checkout -b fill-blank.

Then I directly go test ./cmd and meet errors T_T

❯ orb -m ubuntu22
❯ go test ./cmd
go: downloading github.com/rs/zerolog v1.20.0
go: downloading github.com/chriswalz/complete/v3 v3.0.13
go: downloading github.com/spf13/cobra v1.1.3
go: downloading github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
go: downloading github.com/AlecAivazis/survey/v2 v2.2.9
go: downloading github.com/thoas/go-funk v0.7.0
go: downloading github.com/c-bata/go-prompt v0.2.5
go: downloading github.com/lithammer/fuzzysearch v1.1.1
go: downloading github.com/tj/go-update v2.2.4+incompatible
go: downloading golang.org/x/sys v0.0.0-20210319071255-635bc2c9138d
go: downloading github.com/stretchr/testify v1.7.0
go: downloading golang.org/x/text v0.3.2
go: downloading github.com/apex/log v1.9.0
go: downloading github.com/c4milo/unpackit v0.0.0-20170704181138-4ed373e9ef1c
go: downloading github.com/google/go-github v17.0.0+incompatible
go: downloading github.com/mattn/go-runewidth v0.0.9
go: downloading github.com/pkg/term v1.1.0
go: downloading github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
go: downloading golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5
go: downloading github.com/hashicorp/go-multierror v1.0.0
go: downloading github.com/posener/script v1.1.5
go: downloading github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b
go: downloading github.com/davecgh/go-spew v1.1.1
go: downloading github.com/pmezard/go-difflib v1.0.0
go: downloading gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c
go: downloading github.com/hashicorp/errwrap v1.0.0
go: downloading github.com/google/go-querystring v1.0.0
go: downloading github.com/mattn/go-colorable v0.1.7
go: downloading github.com/mattn/go-isatty v0.0.12
go: downloading github.com/dsnet/compress v0.0.1
go: downloading github.com/klauspost/pgzip v1.2.5
go: downloading github.com/ulikunitz/xz v0.5.8
go: downloading github.com/klauspost/compress v1.4.1
{"level":"debug","time":"2024-12-20T18:19:05-08:00","message":"git for-each-ref --sort=-committerdate refs/heads/ refs/remotes --format='%(authordate); %(authorname); %(color:red)%(objectname:short); %(color:yellow)%(refname:short)%(color:reset); (%(color:green)%(committerdate:relative)%(color:reset))'"}
--- FAIL: TestBranchList (0.01s)
    cmd_test.go:51:
        	Error Trace:	cmd_test.go:51
        	Error:      	[]string{"fill-blank", "master", "origin/test-save-3", "origin/test-save-2", "origin/test-1234", "origin/test-a", "origin/save-add-no-verify", "origin/refactor-use-suggestion-tree", "origin/feature-bitmoji", "origin/delete-origin-flag-confirmation", "origin/fix-bit-update-symlink", "origin/compatible-non-english-languages", "origin/sync-upstream-and-with-another-branch", "origin/diverged-branch-handling", "origin/bit-single-binary", "origin/fix-bit-clone", "origin/flip-theme", "origin/feature-checkout-pull-requests", "origin/add-self-update-command", "origin/add-debug-mode-zerolog", "origin/fix-sync-upstream", "origin/fix-language-compatibility", "origin/fix-comp-point-autocompletion", "origin/fix-bit-info", "origin/fix-status-error-tab-completion", "origin/add-debugging-information", "origin/add-bit-switch-completion", "origin/add-staged-files-only", "origin/sqt1-a", "origin/sqt1", "origin/squash-test2", "origin/squash-test"} does not contain "fix-sync-upstream"
        	Test:       	TestBranchList
    cmd_test.go:54:
        	Error Trace:	cmd_test.go:54
        	Error:      	"[fill-blank master origin/test-save-3 origin/test-save-2 origin/test-1234 origin/test-a origin/save-add-no-verify origin/refactor-use-suggestion-tree origin/feature-bitmoji origin/delete-origin-flag-confirmation origin/fix-bit-update-symlink origin/compatible-non-english-languages origin/sync-upstream-and-with-another-branch origin/diverged-branch-handling origin/bit-single-binary origin/fix-bit-clone origin/flip-theme origin/feature-checkout-pull-requests origin/add-self-update-command origin/add-debug-mode-zerolog origin/fix-sync-upstream origin/fix-language-compatibility origin/fix-comp-point-autocompletion origin/fix-bit-info origin/fix-status-error-tab-completion origin/add-debugging-information origin/add-bit-switch-completion origin/add-staged-files-only origin/sqt1-a origin/sqt1 origin/squash-test2 origin/squash-test]" should not contain "origin/fix-sync-upstream"
        	Test:       	TestBranchList
origin/other-branch
origin/release-v2.11.0
{"level":"debug","error":"exit status 1","time":"2024-12-20T18:19:05-08:00"}
--- FAIL: TestAllBitAndGitSubCommands (0.00s)
    cmd_test.go:102:
        	Error Trace:	cmd_test.go:102
        	Error:      	[]string{"status", "pull --rebase origin master", "push --force-with-lease", "stash pop", "commit -am \"", "commit -a --amend --no-edit", "commit --amend --no-edit", "merge --squash", "release bump", "log --oneline", "diff --cached"} does not contain "co"
        	Test:       	TestAllBitAndGitSubCommands
    cmd_test.go:102:
        	Error Trace:	cmd_test.go:102
        	Error:      	[]string{"status", "pull --rebase origin master", "push --force-with-lease", "stash pop", "commit -am \"", "commit -a --amend --no-edit", "commit --amend --no-edit", "merge --squash", "release bump", "log --oneline", "diff --cached"} does not contain "lg"
        	Test:       	TestAllBitAndGitSubCommands
{"level":"debug","error":"exit status 127","time":"2024-12-20T18:19:05-08:00"}
--- FAIL: TestParseManPage (0.00s)
panic: runtime error: index out of range [1] with length 1 [recovered]
	panic: runtime error: index out of range [1] with length 1

goroutine 27 [running]:
testing.tRunner.func1.2({0x6a1640, 0x400014c450})
	/usr/lib/go-1.23/src/testing/testing.go:1632 +0x1bc
testing.tRunner.func1()
	/usr/lib/go-1.23/src/testing/testing.go:1635 +0x334
panic({0x6a1640?, 0x400014c450?})
	/usr/lib/go-1.23/src/runtime/panic.go:785 +0x124
github.com/chriswalz/bit/cmd.parseManPage({0x6d86ca?, 0xb39280?})
	/Users/huluobo/paper/bit/cmd/util.go:479 +0x170
github.com/chriswalz/bit/cmd.TestParseManPage(0x400039c000)
	/Users/huluobo/paper/bit/cmd/cmd_test.go:122 +0x2c
testing.tRunner(0x400039c000, 0x755d38)
	/usr/lib/go-1.23/src/testing/testing.go:1690 +0xe4
created by testing.(*T).Run in goroutine 1
	/usr/lib/go-1.23/src/testing/testing.go:1743 +0x314
FAIL	github.com/chriswalz/bit/cmd	0.013s
FAIL

What is the reason and how can I compiler the whole files ?
I can use either MacOS Local Machine or OrbStack(ubuntu) VM to work on this, so any help around them will be truly appreciated.

@root-hbx root-hbx added the bug Something isn't working label Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant