Releases: goplus/gop
v1.1.10
new features:
- code coverage of unit test (only support in Go1.20 or later) (#1510)
- gop go -ignore-notated-error (#1518)
- gop serve: run gop in langserver mode (#1522)
- gop/x/jsonrpc2 (#1519 #1522 #1525 #1526)
- gop/x/langserver (#1524 #1525 #1527)
- gop/parser: ParseFSEntry/ParseEntry (#1529)
- typesutil: ExprString (#1531)
- typesutil: DeleteObjects, CorrectTypesInfo (#1538)
- typesutil: Check support conf.Error (#1514 #1515 #1517)
- typesutil.Checker: config changed (use gop.mod) (#1528)
- typesutil/typeparams (#1533)
- modfetch.SetDebug (#1535)
- cl/internal/typesutil.NewTypeAndValue (#1532)
github actions:
- goplus/[email protected]: gop-version supports branch (goplus/setup-goplus#31)
changes:
- refactor: xxxError use Pos instead of Position (#1509)
- workflows: release-build use go-version 1.18 (#1511)
- gop/x/typesutil: Checker.Files always check go files (#1520)
- mv ClassFileExt: parser => cl (#1530)
- cl: preloadGopFile no change classfile ast (#1521)
- parser: fix parseGlobalStmts EOF check (#1512)
- parser: fix parsePrimaryExpr check literal value (#1513)
- mod: github.com/goplus/c2go v0.7.17
- mod: github.com/goplus/gox v1.13.0
- mod: github.com/goplus/mod v0.11.9
v1.1.9
new features:
- gop fmt -t: test if Go+ files are formatted or not (#1476)
- gop/ast: walk add Go+ expr and stmt (#1480)
- gop/ast: add FuncDecl.Shadow (#1490)
- gop/parser: parseGlobalStmts set main.FuncType.Pos (#1485)
- gop/parser: ParseExprFrom/ParseExpr (#1486)
- gop/x/typesutil.Checker (#1472 #1473 #1475 #1477 #1478 #1481 #1482 #1483 #1484 #1486 #1488 #1494 #1496 #1497 #1498 #1499 #1500 #1501 #1503)
- gop/env.Installed (#1471)
changes:
- gop/ast.File.Pos() fix (#1471)
- gop/parser: parsePrimaryExpr fix LiteralValue check (#1493)
- gox: newScope support start..end (#1491 goplus/gogen#294)
- gop: fix restore mod (#1502)
- update
gop_autogen.go
import style (#1489 goplus/gogen#293) - TestSpxPkgOverload (#1468, goplus/gogen#303)
- TestGenericTypeCompositeLit (#1495)
- mod: github.com/fsnotify/fsnotify v1.7.0
- mod: github.com/goplus/mod v0.11.8
- mod: github.com/goplus/gox v1.12.8
v1.1.8
new features:
- gop watch: when a Go+ file is changed it is transpiled to a Go file (#1424 #1425 #1427 #1437)
- gop doc: documentation for package or symbol (#1432 #1434 #1443 #1444 #1445 #1446)
- gop go -s -t: run
gop go
in single file mode & check mode (#1453 #1456 #1463) - classfile: getFields allow defining type before var (#1428)
github actions:
- goplus/setup-goplus@v1: downloading and caching a version of Go+ by version and adding to PATH
- marketplace: github.com/marketplace/actions/setup-goplus
- an example in production: github.com/goplus/tutorial/.../gop.yml
drafts:
changes:
- fix: type assignment error doesn't not dump position (#1429 #1430)
- cl fix: compileCallArgs recover check (#1457)
- cl fix: gmxSettings.getScheds check self for func setBodyHandler (#1459 #1460)
- gengo: dump error by dir (#1455)
- ast.File: NoEntrypoint => ShadowEntry (#1447)
- support go1.21 (#1433)
- mod: github.com/goplus/gox v1.12.5
- mod: github.com/goplus/mod v0.11.7
- mod: github.com/qiniu/x v1.13.1
- mod: golang.org/x/tools v0.14.0
v1.1.7
new features:
changes:
v1.1.6
incompatible changes:
- classfile: support multiple work-classes (#1380)
- classfile: register => import (#1404)
- classfile: rename .gopx => .gox (#1403)
- classfile: IsClass => ClassKind (#1404)
new features:
- classfile: support embed type (starExpr/selectorExpr) (#1386)
- classfile: field var support tag (#1393)
- classfile: support main.spx (#1404)
- compiler check untyped overflows for int128/uint128 (#1384)
changes:
v1.1.5
v1.1.3
new features:
- cmd/gop: gop build/run/install/test pass build flags (#1300)
- cl: os.File: support Gop_Enum (#1320)
- cl: blines
changes:
- cmd/gop: gop run/build/install/test -v => -debug
- cl: command style invalid operation mismatched types (fix #1312)
- parser: cmd style check tuple to list (#1315)
- parser: return isTuple if allowTuple
- parser: parseBinaryExpr check tuple
- mod: gox v1.11.21
- mod: c2go v0.7.10
- mod: libc v0.3.12
v1.1.2
documentations:
- Go+ doesn't support DSL (Domain Specific Language), but it's Specific Domain Friendly (see DSL vs. SDF)
changes:
- ast: ForPhrase add IfPos
- parser: parseErrWrapExpr: ErrWrapExpr as PrimaryExpr
- cl: TestErrWrapCall/TestErrWrapCommand
- cl: TestVargCommand
- cl: TestSelectComprehensionRetTwoValue
- cl: fix for range-expression doesn't support if condition (#1243)
- cl: unary op pass src (#1278)
- cl: remove gox.PkgImporter; loadImport fix pkgName
- cl: loadImport check error recover
- cl: preloadFile restore cur file
- cl: support Gop_proj, Gop_work
- cl: compileSelectorExpr fix: clIdentCanAutoCall
- gop: use github.com/qiniu/x/errors
- gop: gop.GenDepMods: support gop.mod - register
- gop: fix gop.Import
- gop: fix #1301
- build: fix: separate build and install processes when building Go+ tools
- build: fix multi platform release
- mod: mod 0.9.12
- mod: gox v1.11.12
- mod: c2go 0.7.8
- mod: libc 0.3.10
v1.1.0
Go+ v1.1.0 vs. Go+ v1.0.39
First, it introduces the github.com/goplus/mod module. This module provides support for Go/Go+ module related capabilities. It can be thought of as enhancements to golang.org/x/mod which include:
- github.com/goplus/mod: Provides the ability to find go.mod/gop.mod files.
- github.com/goplus/mod/modfile: Provides read and write support for the gop.mod file.
- github.com/goplus/mod/{modload, gopmod}: Provides the Go+ Module class (recommended to use the gopmod package, which is greatly enhanced on the basis of modload).
- github.com/goplus/mod/modcache: Provides support for module cache directories.
- github.com/goplus/mod/modfetch: Provides module download function.
Second, it has improved gop mod
(module management) related commands, especially the gop mod tidy
command needs to be considered in many cases.
Third, it enhances the completeness of gop
command functions such as gop build/install/run/test
, which are mainly reflected in:
- Support for remote packages. For example, in Go+ v1.0 you could only
gop run
local directories or files, nowgop run
is supported to run a remote package. - Consistency of
gop build/install/run/test
. Previously, the codes ofgop run
andgop build/install
were written separately, lacking a unified support framework, and their behaviors would be different. Now they are unified into the same implementation framework. - The gop cache bug has been eliminated. In Go+ v1.0, due to the poor implementation performance of the import package, the gop cache module cache was introduced, which led to some bugs in module update detection, and an infinite loop of importing some complex packages.
Fourth, it adds some syntax features that v1.0 does not have. This mainly includes:
- Overloading of
++
,--
operators is supported. - Expression
type()
is supported to represent the zero value of typetype
. For example,string()
is equivalent to""
,int32()
is equivalent toint32(0)
, and so on. - Supports
uint128
,int128
types. - Supports the
any
type, which is equivalent to the empty interface.
Fifth, it adds support for comment instructions in structure and function headers. E.g:
//go:notinheap
type S struct{ x int }
//go:noinline
//go:uintptrescapes
func test(s string, p, q uintptr, rest ...uintptr) int {
...
}
Of course, the comment instruction still needs to be further improved. For example, conditional compilation instructions, etc., are currently not implemented.
Sixth, fix many bugs. It includes Go+ bugs (issue #888, #1056, #1228, #1243, etc.) and new test cases have been added in go1.8 version, which may not all pass in Go+ v1.0 version (issues #1195, #1196, #1197, #1198, etc.).
Seventh, it supports Go/Go+ hybrid projects. For details, please refer to the gop/testdata/mixgo example. The following is an introduction to this in the project's README file:
Eighth, support for calling C from Go+. This includes:
- The
gop c
command (equivalent to the stand-alonec2go
command) can be used to convert a C project to a Go project. import "C"
andimport "C/xxx"
are used to import a C project converted by c2go. whereimport "C"
is short forimport "C/github.com/goplus/libc"
.- The
C"xxx"
syntax represents C-style string constants.
Here is an example to show how Go+ interacts with C.
import "C"
C.printf C"Hello, c2go!\n"
C.fprintf C.stderr, C"Hi, %7.1f\n", 3.14
In this example we call two C standard functions printf
and fprintf
, passing a C variable stderr
and two C strings in the form of C"xxx"
(a Go+ syntax to represent C-style strings).
Run gop run .
to see the output of this example:
Hello, c2go!
Hi, 3.1
Of course, the current Go+ support for C is only a preview version, not to the extent that it is actually available in engineering. As far as libc is concerned, the current migration progress is only about 5%, and it is just the beginning.
In the upcoming Go+ v1.2 version planning, complete support for C is listed as a top priority. Of course, support for cgo and Go templates is also under planning, which is a crucial capability enhancement for Go/Go+ hybrid projects.
Release v1.1.0-rc3
new features:
- cl: lambda: support in return statement (#1228)
- cl: config: add NoSkipConstant for disable optimization of skip constants
- cl: check SliceLit type (#1120)
- cl: loadVars check CompositeLit type (#1120)
- gop: add Tidy
- gop: NewImporter: support import Go+ packages
changes:
- gop: NewImporter: save fset
- gop: NewImporter: support gopmod.PkgtModule
- cmd/gop: gop mod tidy: cleanup before save
- mod:mod 0.9.10
- mod: c2go 0.7.6
- mod: libc 0.3.8