These 47 commits are when the Protocol Buffers files have changed:
| Commit: | f77a22f | |
|---|---|---|
| Author: | P. Oscar Boykin | |
| Committer: | GitHub | |
Implement protobuf value generator with protoc plugin, wire runtime, and tests (#2130) * Add protobuf generator/plugin, wire runtime, float32 externals, and tests * Address PR feedback: move JVM protobuf parity out of core, add `tool protoc-plugin` CLI path, and clarify float bit endianness semantics * Refactor protobuf plugin generation into core CodeGenerator and make CLI main a thin adapter * Refactor protobuf generator to render via Package/Statement docs and typecheck generated output * Fix Scala.js testJS failure by removing regex look-behind in ProtoToBosatsu identifier matching * Use ordered dedupe naming and add bosatsu-node protoc-plugin entrypoint * Fix parser API call sites in tests and bump core_alpha next_version to 4.5.0 * Add TypedAst protoc CI check and make protobuf generation typecheck-safe * Fix protobuf CI workflow to use top-level bosatsuj fetch * Cap native-image threads in CI to avoid Graal OOM * Raise cli clang codegen test timeout for cold merged checkouts * Raise slow core suite timeouts for cold merged runs * Fix local protobuf test hang on macOS
| Commit: | 8e47bd2 | |
|---|---|---|
| Author: | P. Oscar Boykin | |
| Committer: | GitHub | |
Allow scoped `matches` bindings in match branch guards (#2333) * docs: author initial implementation code plan for issue #2331 * Refactor branch guards into explicit BoolGuard nodes * Classify conditional match guards during source conversion * Typecheck scoped match-guard branches and reuse diagnostics * Lower MatchGuard through Matchless and tooling * Document branch-guard matches scope and rerun docs gate * docs: revise implementation code plan after review for issue #2331 * Fix MatchGuard binder scoping in typed consumers * Fail closed on invalid BranchGuard proto payloads * docs: revise implementation code plan after review for issue #2331 * Make normalization preserve MatchGuard binder scope * docs: revise implementation code plan after review for issue #2331 * Fix MatchGuard shadowing in normalization walkers * Fix explicit loop/recur MatchGuard shadowing * docs: revise implementation code plan after review for issue #2331 * Make recursive MatchGuard recovery provenance-safe * Fix MatchGuard normalization and lowering * Preserve proto compatibility for branch guards * Stabilize SMT z3 soundness test across platforms * Fix MatchGuard review follow-ups * Checkpoint MatchGuard normalization review fixes * Checkpoint MatchGuard pattern traversal fixes * Checkpoint MatchGuard global dependency fixes * Increase ClangGenTest timeout for cold merged checkouts * Revert "Stabilize SMT z3 soundness test across platforms" This reverts commit 8dfba6a1ab8d82b2dfdc5af15c843bfe9c714bae.
| Commit: | ad3f462 | |
|---|---|---|
| Author: | P. Oscar Boykin | |
| Committer: | GitHub | |
Implement type aliases (#2247) * chore: checkpoint blocked implementation flow for issue #2239 * Refactor type aliases and predef type resolution * Address review feedback and CI regressions * Fix TypedExprTest predef inference setup * Fix DebugAliasPackage cross-platform EC * Reject alias exports that leak private types * Address review cleanup on alias inference * Add Monad test for flipped alias * Test hidden higher-kinded alias export failure * Remove dead shape alias batch helper * Fix proto alias tests for private type escapes * Optimize alias normalization fast paths
| Commit: | 47bb1ee | |
|---|---|---|
| Author: | P. Oscar Boykin | |
chore: checkpoint blocked implementation flow for issue #2239
| Commit: | efa203d | |
|---|---|---|
| Author: | P. Oscar Boykin | |
| Committer: | GitHub | |
Add recursion-form lints for non-recursive and tail-recursive recur/loop usage (#2230) * Add recur/loop recursion-form lints * Rework recursion lint replay to avoid metadata and proto storage * Move match kind into Expr and reorder Match constructors * Unify recursion lint collection across source and cache replay * Unify cached self-call replay with SelfCallKind * Simplify final def state handling in recursion check
| Commit: | 4239a89 | |
|---|---|---|
| Author: | P. Oscar Boykin | |
| Committer: | GitHub | |
Return region-tagged compiled artifacts from CompileCache (#2218) * Return region-tagged compiled artifacts from CompileCache * Fix bench and scaladoc fallout from compiled package types * Remove Unit region fallback and add proto roundtrip law * Move inferred-only typecheck helper into TestUtils * Make test-only inferred helper Scala.js-safe
| Commit: | f0b803d | |
|---|---|---|
| Author: | P. Oscar Boykin | |
| Committer: | GitHub | |
Add doc base URL routing and private package controls for library docs (#2078) * Add package-aware doc base URL routing and private-package lib doc controls * Address PR feedback: use for-comprehension in doc base URL mapping and set core_alpha doc_base_url
| Commit: | 959b13e | |
|---|---|---|
| Author: | P. Oscar Boykin | |
Implement source hash + region provenance for TypedAst and Matchless (#1778)
| Commit: | 1e71b22 | |
|---|---|---|
| Author: | P. Oscar Boykin | |
Add source hash and region provenance for typed packages and Matchless
| Commit: | 42acf1d | |
|---|---|---|
| Author: | P. Oscar Boykin | |
| Committer: | GitHub | |
Fix nested-forall binder capture in TypedExpr quantification (#1716) * checkpoint quantifier evidence plumbing and instantiate regressions * Fix binder capture across nested forall type inference * Add regression for liftExistentials duplicate existential names * Preserve existential binder order in splitExists * Use reverse_::: in splitExists accumulator * Refine quantifier evidence traversal and invariants * Make evidence dropping explicit in TypedExpr ann calls
| Commit: | 72ec8b2 | |
|---|---|---|
| Author: | Oscar Boykin | |
checkpoint quantifier evidence plumbing and instantiate regressions
| Commit: | 1ee00fb | |
|---|---|---|
| Author: | P. Oscar Boykin | |
| Committer: | GitHub | |
Add constructor default values for struct and enum branches (#1699) * Implement constructor defaults for structs and enums * Implement constructor defaults for issue 1676 - plumb constructor default metadata through statements/type env - lower defaults into typed synthetic helpers in SourceConverter - expand tests for evaluation/source conversion/error messages - improve JSON docs and workflow examples with Option defaults - use structural Hashable implementations for Kind/Type/Var * Move constructor default type closure into SourceConverter * Add TypeRef free-var utility and strengthen default-name goldens * Add scope test for defaults referencing earlier bindings * Hash default helper names from closed param types * Harden default-name hash stability tests * Cover default helper type roundtrips in proto and EDN * Add golden Blake3 hash tests for exists types
| Commit: | 24b11e7 | |
|---|---|---|
| Author: | Oscar Boykin | |
Add pattern guards across parser, typing, and lowering
| Commit: | 36dc59c | |
|---|---|---|
| Author: | P. Oscar Boykin | |
| Committer: | GitHub | |
Add a TypedExpr.Loop which allows inlining recursive loops (#1582) * Add Loop/Recur TypedExpr nodes and normalize tail recursion before Matchless Introduce Loop/Recur into TypedExpr and protobuf serialization, including traversal/substitution/type utilities and generator support for test coverage. Move tail-call rewriting out of Matchless and into TypedExprNormalization: recursive tail-call lets are rewritten to non-recursive lambdas containing Loop/Recur, with cleanup that removes Loop when Recur is eliminated. Update Matchless to lower Loop/Recur directly to WhileExpr without duplicating SelfCallKind-based tail-call detection in recursive Let lowering, and assert raw Recur does not escape lowering. Expand tests for normalization inlining behavior, Loop/Recur proto roundtrips, Matchless Loop/Recur lowering, and update codegen snapshots/hashes impacted by the new normalization path. * Assert tail-rec Loop rewrite drops recursive Let in normalization Add a TypedExprNormalization regression assertion to ensure tail-recursive rewrites that produce Loop/Recur no longer leave recursive Let bindings in the normalized term. * Rewrite direct Loop/Recur lowering in Matchless and fix top-level recur normalization Issue #1540 requires preserving Loop/Recur as a first-class lowering path instead of converting loops back into synthetic recursive closures before emitting while loops. This commit completes the direct lowering path and fixes normalization consistency for top-level recur definitions. Matchless changes: - Replace loop lowering that created a synthetic recursive function+call with a direct mutable while lowering ( + ). - Lower tail self-calls in loop bodies into ordered mutable assignments, including identity-assignment elision. - Remove loop-time closure capture/free-var plumbing from this path, so Loop/Recur compiles straight to WhileExpr. TypedExprNormalization changes: - Run tail-recursive-to-loop rewrite in the annotated-lambda/top-level normalization path, restoring top-level recur defs to Loop lowering. - Downgrade recursive lets/defs to whenever normalization leaves . - Keep recursion labels and normalized body in sync after rewriteTailRecToLoop so stale recursive markers are removed. Test updates: - Add regression in proving lowers top-level recur defs to Loop and drops recursive kind. - Update expectations for normalized top-level tail recursion (now after loop rewrite). - Refresh Python/C codegen expectations and CLI C-hash golden values impacted by direct loop lowering. Result: Matchless now consumes Loop/Recur directly, codegen keeps iterative while behavior (without regressing into stack-consuming recursion), and normalization consistently removes recursive labels when recursion is eliminated. * Normalize loop invariants and eliminate identity lets Add two normalization improvements in TypedExprNormalization and cover them with direct unit tests. 1) Loop invariant lifting: - Detect loop/recur argument positions that are invariant across all outer recur uses. - Lift invariant loop bindings out as non-recursive lets. - Rewrite outer recur calls to drop lifted arguments. - Preserve nested-loop behavior by excluding nested loop bodies from outer recur rewrites. - Keep the final loop slot even when invariant to preserve the non-empty Loop/Recur invariant. 2) Identity let elimination: - Remove non-recursive identity bindings (let x = x in body => body), including wrapped cases (Generic/Annotation). Tests: - Add coverage that invariant loop args are removed from loop/recur threading. - Add coverage that the final loop arg is retained even when invariant. - Add coverage for non-recursive identity let elimination. Validation run: - sbt coreJVM/compile - sbt coreJVM/test - sbt cli/test * Add direct TypedExpr.Let identity-normalization regression test Add a focused TypedExprNormalization test that directly constructs a non-recursive identity let node: let x = x in body and asserts it normalizes to body. This complements the existing wrapped-identity case (Annotation/Generic wrappers) by covering the plain Local-to-Local construction path explicitly, so future normalization refactors keep the simplest identity-let rewrite behavior locked in.
| Commit: | 7f8fcb6 | |
|---|---|---|
| Author: | P. Oscar Boykin | |
| Committer: | GitHub | |
add a Float64 type for IEEE754 math (#1579) * Checkpoint Float64 type and backend integration * Fix Float64 JS/Python regressions in CI - avoid Scala.js linker failure by replacing java.lang.Math.copySign with bit-based copySign - make Float64 literal rendering canonical across platforms (preserve -0.0 and force decimal point) - align Float64 equals/hashCode with language semantics (-0.0 == 0.0, all NaNs equal) - use Python string escaping that preserves Unicode and regex semantics (fixes NaN string roundtrip + Char tests) * Improve Float64 parser/shrinker semantics and clarify backend comparisons Reduce Float64 literal parser backtracking by branching on the shared digit-part prefix and by consolidating signed parsing for numeric and infinity literals. Unify literal equality through Float64.semanticEquals so -0.0 == 0.0 and NaN == NaN semantics are defined in one place. Document in Python codegen that direct Python float ops follow IEEE NaN behavior, while Bosatsu's total Float64 semantics are enforced via Bosatsu externals/pattern compilation. Switch float literal pattern shrinking from raw-bit Long shrinking to Double shrinking, with a semantic fallback (NaN -> infinities, infinities -> large finite values, and magnitude-reducing finite candidates) to produce more meaningful counterexamples. * add conversions to and from Float64 and Int * Fix testPY by shrinking huge int literal in Float64 test * remove use of Identifier.literal due to issues with parallel js/jvm compilation causing conflicts
| Commit: | ddb9d86 | |
|---|---|---|
| Author: | Oscar Boykin | |
Checkpoint Float64 type and backend integration
| Commit: | d324af1 | |
|---|---|---|
| Author: | P. Oscar Boykin | |
| Committer: | GitHub | |
Support existential types on enum branches (#1570)
| Commit: | 6719bb7 | |
|---|---|---|
| Author: | P. Oscar Boykin | |
| Committer: | GitHub | |
Add lib build command (#1377)
The documentation is generated from this commit.
| Commit: | 4e463c6 | |
|---|---|---|
| Author: | P. Oscar Boykin | |
| Committer: | GitHub | |
Add lib assemble to generate library files (#1346) * Add lib assemble to generate library files * add Output.Library and PlatformIO library methods * share more code in Fs2PlatformIO * list invariants to check * checkpoint * checkpoint * simplify LibConfig * checkpoint, pausing for sha256 impl * use hashing * checkpoint * use blake3 to simplify build * add more property checks * add unused transitive deps * add checks for dependency usage * read the git-sha * Add some tests of allImportPacks and visibleDepPackages * checkpoint ApiDiff * add ApiDiff * more ApiDiff work * finish ApiDiff * fix test
| Commit: | 18b58bb | |
|---|---|---|
| Author: | P. Oscar Boykin | |
| Committer: | GitHub | |
Add Library to proto definition (#1337)
| Commit: | d8611a2 | |
|---|---|---|
| Author: | P. Oscar Boykin | |
| Committer: | GitHub | |
Make a cross platform proto project (#1324)
| Commit: | 683a1f4 | |
|---|---|---|
| Author: | johnynek | |
deploy: 5978ddf24c2257549868b55c37aa5e65eb98e78c
This commit does not contain any .proto files.
| Commit: | 92c5905 | |
|---|---|---|
| Author: | P. Oscar Boykin | |
| Committer: | GitHub | |
Encode Kinds to Longs in proto (#1087) * Encode Kinds to Longs in proto * remove a branch
| Commit: | e39f11a | |
|---|---|---|
| Author: | P. Oscar Boykin | |
| Committer: | GitHub | |
Existential types support (#1066) * Add initial Existential types * improvements to Infer * add some notes about existentials * add Skolemization type * rewrite skolemize, add a test * handle more Type.Quant cases * get some RankNInferTests passing * check for meta-escape, fix bug * refactor TypedExpr.Generic using Type.Quantification * get simplest possible existential case infering * checkpoint with some progress * checkpoint * get next test passing * get tests passing * fix some tests * add test using existentials in pattern matching * checkpoint * new idea for existentials + branches, seems to work * fix TypeRef with TypeExists * add more Type tests * simplify and remove some debug * address some things noticed in review * add a test suggested by snoble * add a negative test * use exists in BuildLibrary example
| Commit: | b28b023 | |
|---|---|---|
| Author: | Patrick Oscar Boykin | |
address some things noticed in review
| Commit: | 9c7ddec | |
|---|---|---|
| Author: | Patrick Oscar Boykin | |
refactor TypedExpr.Generic using Type.Quantification
| Commit: | c5b9a0c | |
|---|---|---|
| Author: | Patrick Oscar Boykin | |
Add initial Existential types
| Commit: | 8bf939b | |
|---|---|---|
| Author: | P. Oscar Boykin | |
| Committer: | GitHub | |
Char literal and patterns (#1052) * Add parsing of char patterns * checkpoint mostly working * checkpoint with interpreter tests working * hopefully get tests green * make scalajs tests pass * fix python SelectItem generation * avoid codepoints for scalajs * increase coverage * actually add LitTest file * improve Lit.fromChar test * Implement char matching in Python * fix python test
| Commit: | dc1c4c2 | |
|---|---|---|
| Author: | P. Oscar Boykin | |
| Committer: | GitHub | |
so long to automatic currying (#1029) * checkpoint * update TypeRef * checkpoint with less red * coreJVM compiling but with warnings * cli/compile works * coreJVM/test:compile * Add error messages for fn arity mismatch * get parsing test passing * test and fix Type.Fun.unapply * minor Fun.unapply optimization * Fix typeRef generator * get EvaluationTest passing * Put SelfCallKind in a separate file * get PathModule tests passing * fix PythonGen * fix EvaluationTest messages * fix currying of constructors in python * fixes noticed reading the code
| Commit: | 34b47e1 | |
|---|---|---|
| Author: | P. Oscar Boykin | |
| Committer: | GitHub | |
Add kind system with kind inference for structs (#943)
| Commit: | 79b5aaf | |
|---|---|---|
| Author: | P. Oscar Boykin (via Travis CI) | |
Deploy johnynek/bosatsu to github.com/johnynek/bosatsu.git:gh-pages
| Commit: | 1125948 | |
|---|---|---|
| Author: | P. Oscar Boykin | |
| Committer: | GitHub | |
Support for string interpolation and matching (#428) * Support for parsing interpolation strings * Add Declaration support for string concat * try to get parse tests passing, they don't yet * Add SimpleStringPattern to model string pattern matching * Get things compiling, but totality tests not yet passing * get intersection working * get tests passing * get tests passing * fix an assertion * fix 2.11 compilation issues * get test coverage up * fix broken test
| Commit: | 45a92ee | |
|---|---|---|
| Author: | P. Oscar Boykin | |
| Committer: | GitHub | |
Proto support for compiled packages (#268) * WIP: Proto support for compiled packages * finish package to proto * implement most of package deserialiation * set up the decoding tables * checkpoint with code complete, but no tests for pack deserialization * checkpoint very basic test passing * minor improvement to shuffle * finish generators, tests don't yet pass * checkpoint, tests still aren't passing * get basic tests passing * generator-based tests passing * unify loading interfaces and packages * add code to read and write compiled packages * add tests writing and reading to disk
| Commit: | 645c166 | |
|---|---|---|
| Author: | Oscar Boykin | |
checkpoint, tests still aren't passing
| Commit: | 13943e6 | |
|---|---|---|
| Author: | Oscar Boykin | |
finish package to proto
| Commit: | 1e4380a | |
|---|---|---|
| Author: | P. Oscar Boykin | |
| Committer: | GitHub | |
Add serialization of TypedExpr to proto (#266) * Add serialization of TypedExpr to proto * add generators for TypedExpr * implement TypedExpr decoding
| Commit: | 55f6077 | |
|---|---|---|
| Author: | P. Oscar Boykin | |
| Committer: | GitHub | |
Add protos for Package.Typed (#261) * Add protos for Package.Typed * use pattern index in Branch
| Commit: | e892156 | |
|---|---|---|
| Author: | Oscar Boykin | |
use pattern index in Branch
| Commit: | af8eaa9 | |
|---|---|---|
| Author: | Oscar Boykin | |
Add protos for Package.Typed
| Commit: | f91a874 | |
|---|---|---|
| Author: | P. Oscar Boykin | |
| Committer: | GitHub | |
Use a constant table for strings and types in protos (#258) * Use a constant table for strings in protos * make the algorithm single pass * unify read and write of Index tables * simplify serialization state, less generic * use the table approach for types as well as strings, cuts size another 2x or so * use two separate tables, improve type decoding
| Commit: | 991c2b1 | |
|---|---|---|
| Author: | Oscar Boykin | |
use the table approach for types as well as strings, cuts size another 2x or so
| Commit: | 11bea8f | |
|---|---|---|
| Author: | Oscar Boykin | |
Use a constant table for strings in protos
| Commit: | 14ae6fc | |
|---|---|---|
| Author: | P. Oscar Boykin | |
| Committer: | GitHub | |
Add Proto version of package interfaces (#252) * Add Proto version of package interfaces * Test interface parsing * fix generation bugs, plumb support to Main, but not PackageMap * fix bazel build
| Commit: | a133ef8 | |
|---|---|---|
| Author: | Oscar Boykin | |
fix generation bugs, plumb support to Main, but not PackageMap
| Commit: | d0e4153 | |
|---|---|---|
| Author: | Oscar Boykin | |
Add Proto version of package interfaces
| Commit: | 37b08a3 | |
|---|---|---|
| Author: | P. Oscar Boykin | |
| Committer: | GitHub | |
Add conversion to and from protobuf for Type (#250) * Add conversion to and from protobuf for Type * fix the bazel build
| Commit: | 17af241 | |
|---|---|---|
| Author: | Oscar Boykin | |
Add conversion to and from protobuf for Type