Skip to content

Releases: Macho0x/Goop

Goop 1.8.0

Choose a tag to compare

@github-actions github-actions released this 12 Jul 13:40

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 compile and goop build write under
    $GOOP_HOME/build (default ~/.cache/goop/build).
  • Real goop build: transitive import goop dependencies are compiled
    into the sandbox and linked via replace — the same wiring goop test
    already used.
  • Source maps opt-in: --emit-map; --in-tree remains for inspecting
    generated Go or mixed Go+Goop packages.
  • Clean trees: no leaked go.mod beside 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 ./... (from src/) — all packages green
  • goop test tests/ → 101+ passed
  • goop build docs/examples/hello.goop with no .go left in docs/examples/
  • Treelog: goop test examples/ with the 1.8.0 binary

Goop 1.6.0

Choose a tag to compare

@github-actions github-actions released this 12 Jul 10:02

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 = … } after import goop . "pkg"
    lowers to pkg.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 ptr for *bytes.Buffer).
  • gosig: named Go types, LookupVar, and packages.Config.Dir from the
    project root (graceful fallback when load fails).
  • LSP: file:// URIs are URL-decoded; workspace root backs up
    module_root when the file path alone cannot find goop.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 ./... (from src/)
  • goop test tests/ → 94 passed, 0 failed
  • Treelog: goop test examples/ → 6 passed, 0 failed; go build ./...

Goop 1.5.0

Choose a tag to compare

@Macho0x Macho0x released this 11 Jul 11:14

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 3Add(2, 3).
  • Unit erasure: unit params are not Go parameters; Now ()time.Now(),
    and let f (_u: unit) = …func F().
  • If-as-expression: let x = if c then a else b emits a valid Go IIFE.
  • Option naming: consistent optionTypeSuffix for generated helpers.

Verification

  • go test ./... (from src/)
  • 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

Choose a tag to compare

@github-actions github-actions released this 11 Jul 05:56

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 -> B in an import go
    block and call it with x.M arg (or T.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_slice indexing (xs.(i)), any_of,
    and spread work with imported methods and variadic APIs.
  • Examples: go_method_calls.goop
    imports bytes.Buffer.String; the native
    slog.Handler example
    now imports and calls slog.New and Logger.Info.

Verification

  • goop check docs/examples/go_method_calls.goop
  • goop check docs/examples/go_implements_stringer.goop
  • goop check docs/examples/go_implements_slog_handler.goop
  • goop test tests/
  • Verify generated Go contains direct selector calls such as b.String() and
    accepts the emitted slog.Handler assertion.

Goop 1.3.0

Choose a tag to compare

@github-actions github-actions released this 11 Jul 05:25

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

  • implements declarations: implements Interface for Type with … end
    generates pointer-receiver Go methods and a compile-time interface
    assertion.
  • Go type imports: use type Name inside an import go signature block
    to import opaque Go named types and interfaces.
  • FFI value types: error, 'a ptr (ptr_of, null, is_null), and
    'a go_slice plus length, append, and list-conversion helpers.
  • Examples: native
    fmt.Stringer and
    slog.Handler
    implementations.

Verification

  • goop check docs/examples/go_implements_stringer.goop
  • goop check docs/examples/go_implements_slog_handler.goop
  • goop test tests/
  • Verify generated Go accepts the emitted fmt.Stringer and slog.Handler
    assertions during the example builds.

Goop 1.2.3

Choose a tag to compare

@github-actions github-actions released this 11 Jul 04:07

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#D7BA7D and other Goop TextMate rules live in top-level configurationDefaults.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] in docs/examples/cgo_demo.goop: scope keyword.embed.goop, foreground amber

Goop 1.2.2

Choose a tag to compare

@github-actions github-actions released this 11 Jul 03:45

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; type array; deprecated markers for removed surface
  • Format Document: LSP advertises documentFormattingProvider (same engine as goop 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 ./... (from src/) including TestLSPDocumentFormatting
  • goop test tests/
  • goop check on all docs/examples/*.goop

Goop 1.2.1

Choose a tag to compare

@github-actions github-actions released this 11 Jul 03:27

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, unused parseADTTypeKind

Verification

  • go test ./... (from src/)
  • goop test tests/ — 72 passed
  • goop check on all docs/examples/*.goop

Goop 1.2.0

Choose a tag to compare

@github-actions github-actions released this 11 Jul 03:09

Goop 1.2.0

Lang embeds: hard-break rename to import go / @[go], plus cgo-shaped @[c].

Highlights

  • Breaking: import golang, @golang, and the golang keyword are removed — use import go and @[go]
  • @[c]: inline C via cgo (preamble + import "C" + primitive val wrappers)
  • Docs: 15-lang-embeds.md, tutorial interop chapter, cgo_demo.goop
  • Tests: c_embed_* e2e; renamed import_go / go_embed; TextMate scopes for @[go] / @[c]

Verification

  • go test ./... (from src/)
  • goop test tests/ — 72 passed
  • goop check on all docs/examples/*.goop

Goop 1.1.1

Choose a tag to compare

@github-actions github-actions released this 10 Jul 13:59

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); fixed concurrency.goop (go + send + recv); added modules.goop and exceptions.goop
  • Tests: Dropped non-CI Binance demo and duplicate refinement test; renamed misleading async/guards/newtype test 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 for perform-in-go and LINEAR008 race fixtures
  • Compiler: select lowers through C0Chan.ch with element type assertions; checkPerformInGo walks ParenExpr

Verification

  • go test ./... (from src/)
  • goop test tests/ — 68 passed
  • goop check on all docs/examples/*.goop