Releases: Macho0x/Goop
Release list
Goop 1.8.0
Goop 1.8.0
Goop 1.8.0 delivers a full Goop build: edit .goop, run goop build /
goop test, and never see generated .go or .map.json in your project tree.
Highlights
- Cache-only artifacts:
goop compileandgoop buildwrite under
$GOOP_HOME/build(default~/.cache/goop/build). - Real
goop build: transitiveimport goopdependencies are compiled
into the sandbox and linked viareplace— the same wiringgoop test
already used. - Source maps opt-in:
--emit-map;--in-treeremains for inspecting
generated Go or mixed Go+Goop packages. - Clean trees: no leaked
go.modbeside sources; CI asserts examples stay
free of generated.go.
Workflow
goop check main.goop
goop build main.goop # → ./goop-out for module main
goop test examples/See docs/design/20-cli-artifacts.md.
Verification
go test ./...(fromsrc/) — all packages greengoop test tests/→ 101+ passedgoop build docs/examples/hello.goopwith no.goleft indocs/examples/- Treelog:
goop test examples/with the 1.8.0 binary
Goop 1.6.0
Goop 1.6.0
Goop 1.6.0 removes the last codegen gaps that forced multi-package libraries
(like Treelog) to ship lowercase “bridge” wrappers. Cross-package record
literals, Capitalized calls, multiline apps, Buffer pointer FFI, richer
gosig, and LSP path decoding now work as OCaml-style Goop expects.
Highlights
- Cross-package records:
{ service = … }afterimport goop . "pkg"
lowers topkg.Options{…}(including option fields as
pkg.NewOptionTSome/None). - Cross-package Capitalized calls:
NewScope log attrs→
treelog.NewScope(log, attrs)— full apps, partial apps, and unit elision. - Multiline apps: juxtaposition may continue on the next line when the
argument is parenthesized (or indented past the callee). - Buffer ptr: heap/mutable Go types and pointer-receiver methods use
T ptr(e.g.Buffer ptrfor*bytes.Buffer). - gosig: named Go types,
LookupVar, andpackages.Config.Dirfrom the
project root (graceful fallback when load fails). - LSP:
file://URIs are URL-decoded; workspace root backs up
module_rootwhen the file path alone cannot findgoop.toml.
Libraries
Drop lowercase bridges that only existed for 1.5 codegen. Prefer Capitalized
public APIs and record literals at the call site.
Verification
go test ./...(fromsrc/)goop test tests/→ 94 passed, 0 failed- Treelog:
goop test examples/→ 6 passed, 0 failed;go build ./...
Goop 1.5.0
Goop 1.5.0
Goop 1.5.0 hardens OCaml-style call lowering so libraries can drop @[go]
adapters that existed only to paper over codegen gaps.
Highlights
- Capitalized multi-arg apps:
Add 2 3→Add(2, 3). - Unit erasure:
unitparams are not Go parameters;Now ()→time.Now(),
andlet f (_u: unit) = …→func F(). - If-as-expression:
let x = if c then a else bemits a valid Go IIFE. - Option naming: consistent
optionTypeSuffixfor generated helpers.
Verification
go test ./...(fromsrc/)goop test tests/→ 90 passed, 0 failed- Treelog:
goop test .→ 4 passed, 0 failed (recompiled under 1.5)
Treelog note
1.5 unblocks native Options/Scope/Handle work. Treelog still uses a hybrid
implements + @[go] Handle/sanitize layer; a follow-on pass migrates Options
('a option), Scope (Fail + Lock/Unlock), and Handle to majority Goop using
these lowerings.
Goop 1.4.0
Goop 1.4.0
Goop 1.4.0 adds Go method and field imports. Goop code can now call selectors
on opaque imported Go values without introducing a one-off @[go] adapter.
Highlights
- Method imports: declare
val (x : T).M : A -> Bin animport go
block and call it withx.M arg(orT.M x arg). - Field imports: a non-arrow selector type, such as
val (a : Attr).Key : string, lowers to a Go field read. - Go-shaped values: callbacks,
go_sliceindexing (xs.(i)),any_of,
andspreadwork with imported methods and variadic APIs. - Examples:
go_method_calls.goop
importsbytes.Buffer.String; the native
slog.Handlerexample
now imports and callsslog.NewandLogger.Info.
Verification
goop check docs/examples/go_method_calls.goopgoop check docs/examples/go_implements_stringer.goopgoop check docs/examples/go_implements_slog_handler.goopgoop test tests/- Verify generated Go contains direct selector calls such as
b.String()and
accepts the emittedslog.Handlerassertion.
Goop 1.3.0
Goop 1.3.0
Goop 1.3.0 adds native Go interface implementations, allowing Goop record
types to satisfy interfaces such as fmt.Stringer and slog.Handler without
writing an @[go] wrapper for their methods.
Highlights
implementsdeclarations:implements Interface for Type with … end
generates pointer-receiver Go methods and a compile-time interface
assertion.- Go type imports: use
type Nameinside animport gosignature block
to import opaque Go named types and interfaces. - FFI value types:
error,'a ptr(ptr_of,null,is_null), and
'a go_sliceplus length, append, and list-conversion helpers. - Examples: native
fmt.Stringerand
slog.Handler
implementations.
Verification
goop check docs/examples/go_implements_stringer.goopgoop check docs/examples/go_implements_slog_handler.goopgoop test tests/- Verify generated Go accepts the emitted
fmt.Stringerandslog.Handler
assertions during the example builds.
Goop 1.2.3
Goop 1.2.3
Fix VS Code / Cursor embed-tag highlighting so amber @[go] / @[c] works on any color theme (including Dracula).
Highlights
- Extension 0.3.7:
keyword.embed.goop→#D7BA7Dand other Goop TextMate rules live in top-levelconfigurationDefaults.editor.tokenColorCustomizations(not under[goop], which VS Code ignores for token colors) - Reinstall with
./scripts/install-editor-extension.sh, then Developer: Reload Window
Verification
- Inspect
@[c]indocs/examples/cgo_demo.goop: scopekeyword.embed.goop, foreground amber
Goop 1.2.2
Goop 1.2.2
Bring the VS Code / Cursor extension and LSP in line with recent language + formatter work.
Highlights
- Grammar: keywords
continue,discontinue,downto,functor,not; typearray; deprecated markers for removed surface - Format Document: LSP advertises
documentFormattingProvider(same engine asgoop fmt) - LSP framing fix: reliable Content-Length reads + stdout flush (fixes hung/partial client sessions)
- Extension 0.3.6: default formatter
goop.goop; reinstall via./scripts/install-editor-extension.sh
Verification
go test ./...(fromsrc/) includingTestLSPDocumentFormattinggoop test tests/goop checkon alldocs/examples/*.goop
Goop 1.2.1
Goop 1.2.1
Editor highlighting for lang embeds plus minor compiler hygiene.
Highlights
@[go]/@[c]tags: unified amber embed-marker color (keyword.embed.goop); inline Go/C bodies use normal grammar highlighting- VS Code extension 0.3.4 — reload window after update to pick up theme + grammar
- Compiler: remove dead
desugarIs/desugarAs, unusedparseADTTypeKind
Verification
go test ./...(fromsrc/)goop test tests/— 72 passedgoop checkon alldocs/examples/*.goop
Goop 1.2.0
Goop 1.2.0
Lang embeds: hard-break rename to import go / @[go], plus cgo-shaped @[c].
Highlights
- Breaking:
import golang,@golang, and thegolangkeyword are removed — useimport goand@[go] @[c]: inline C via cgo (preamble +import "C"+ primitivevalwrappers)- Docs: 15-lang-embeds.md, tutorial interop chapter,
cgo_demo.goop - Tests:
c_embed_*e2e; renamedimport_go/go_embed; TextMate scopes for@[go]/@[c]
Verification
go test ./...(fromsrc/)goop test tests/— 72 passedgoop checkon alldocs/examples/*.goop
Goop 1.1.1
Goop 1.1.1
Tests and examples overhaul: prune stale demos, strengthen e2e coverage, fix select channel lowering.
Highlights
- Examples: Removed overlapping demos (
chan_async,channel_race,linear,match_patterns,simple_hl_bot,trading_position); fixedconcurrency.goop(go + send + recv); addedmodules.goopandexceptions.goop - Tests: Dropped non-CI Binance demo and duplicate refinement test; renamed misleading
async/guards/newtypetest files; real asserts for FCM, synthetic TA, list/array helpers - Coverage:
select_test,chan_close_test,effect_multi_test,exception_payload_test; Go unit tests forperform-in-goand LINEAR008 race fixtures - Compiler:
selectlowers throughC0Chan.chwith element type assertions;checkPerformInGowalksParenExpr
Verification
go test ./...(fromsrc/)goop test tests/— 68 passedgoop checkon alldocs/examples/*.goop