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

feat(gengo): support convert go+ files into go code #1704

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

CarlJi
Copy link
Member

@CarlJi CarlJi commented Feb 2, 2024

This PR primarily addresses the following two issues.

  • gop go doesn't support convert go+ files into go, fox example:
➜  101-Hello-world git:(main) ✗ gop go -v hello-1.gop
2024/02/02 16:53:22 SetDebug: import=true, match=true, instr=true
2024/02/02 16:53:22 `gop go` doesn't support *gopprojs.FilesProj
panic: `gop go` doesn't support *gopprojs.FilesProj


goroutine 1 [running]:
log.Panicln({0xc000205e28?, 0xc0000ba060?, 0x1d045b8?})
	/opt/hostedtoolcache/go/1.21.6/x64/src/log/log.go:446 +0x5a
github.com/goplus/gop/cmd/internal/gengo.runCmd(0xc0000d8000?, {0xc0000ba060?, 0x0?, 0xc00006a688?})
	/home/runner/work/gop/gop/cmd/internal/gengo/go.go:92 +0x365
main.main()
	/home/runner/work/gop/gop/cmd/gop/main.go:113 +0x4b3
  • The original single file mode flag -s seems aim to work in package mode, so i update the description accordingly:
➜  101-Hello-world git:(main) ✗ ll
total 24
drwxr-xr-x   5 jicarl  staff   160 Feb  2 16:58 .
drwxr-xr-x  63 jicarl  staff  2016 Feb  2 16:45 ..
-rw-r--r--   1 jicarl  staff   358 Dec 15  2021 hello-1.gop
-rw-r--r--   1 jicarl  staff   469 Dec 15  2021 hello-2.gop
-rw-r--r--   1 jicarl  staff   776 Dec 15  2021 hello-3.gop
➜  101-Hello-world git:(main) ✗ gop go -s .
Single file mode
GenGo hello-1.gop ...
GenGo hello-2.gop ...
GenGo hello-3.gop ...
➜  101-Hello-world git:(main) ✗

Copy link

codecov bot commented Feb 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1d25500) 91.90% compared to head (92ec1b4) 91.90%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1704   +/-   ##
=======================================
  Coverage   91.90%   91.90%           
=======================================
  Files          39       39           
  Lines       10750    10750           
=======================================
  Hits         9880     9880           
  Misses        704      704           
  Partials      166      166           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@xushiwei xushiwei merged commit c0edde1 into goplus:main Feb 2, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants