Skip to content

Releases: betwixt-labs/bebop

Bebop v2.8.6

13 Jul 07:38
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.8.5...v2.8.6

Bebop v2.8.5

27 Jun 10:47
7a74e9e
Compare
Choose a tag to compare

What's Changed

  • fix!: refactor generated JSON methods from toJson to toJSON by @andrewmd5 in #273

Full Changelog: v2.8.4...v2.8.5

Bebop v2.8.4

26 Jun 09:27
Compare
Choose a tag to compare

Typescript: the runtime is no longer minified to fix instanceof

Full Changelog: v2.8.3...v2.8.4

Bebop v2.8.3

24 Jun 03:27
b51dc88
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.8.2...v2.8.3

Bebop v2.8.2

22 Jun 10:36
761f89f
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.8.1...v2.8.2

Bebop v2.8.1

22 Jun 04:04
843a831
Compare
Choose a tag to compare

What's Changed

  • codegen(ts): support to/from json methods in Tempo methods by @andrewmd5 in #269

Full Changelog: v2.8.0...v2.8.1

Bebop v2.8.0

20 Jun 09:26
Compare
Choose a tag to compare

Typescript Code Gen

  • fixed a bug where camelCase was not being applied to fields in generated code.
  • fixed a bug where PascalCase was not being applied to types in generated code.
  • guid now generates a Guid class instead of a string.
  • each record now generates toJson, encodeToJson, fromJson, validateTypes, and validateCompatibility methods. For more information see #267.

Typescript Runtime

  • GuidMap and Guid have been added to the runtime. The GuidMap was added so a Guid class can be used as a key in a map.

JSON-Over-Bebop

In #267 an experimental JSON compatability layer was introduced that allows JSON to be marshaled to and from Bebop records. The spec is a work in progress and is subject to change. For more information see the wiki page JSON-Over-Bebop.

Bebop v2.7.4

07 Jun 23:01
Compare
Choose a tag to compare

VSCode

The extension has moved: https://marketplace.visualstudio.com/items?itemName=betwixt.bebop-lang

Ignore the gap in release versions; fighting the pipeline and the pipeline won.

Bebop v2.7.1

30 May 15:39
27c4b66
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.7.0...v2.7.1

Bebop v2.7.0

24 May 11:55
Compare
Choose a tag to compare

REPL

The REPL has gotten some much needed love. Gone are the <textarea> and Prism highlighting and in their place a REPL that utilizes Monaco Editor.

repl

Diagnostics will be reported as you write schemas in the REPL now and there is basic highlighting.

Services

It is now possible to define a service method which can accept a stream of records or return a stream of records. Just use the new stream keyword before writing the type identifier.

service Music {
    getSongsByMusician(Musician): stream Song;
}

To utilize streams, update to the latest version of Tempo.

Documentation will now also generate alongside service code
A screenshot showing that documentation is generated along with service now

You can now also apply the deprecated attribute to service definitions and their methods

/** A service for getting songs */
service Music {
    /** Gets a stream of songs by the specified musician */
    [deprecated("Use of getSongsByMusician is not recommended")]
    getSongsByMusician(Musician): stream Song;
}

bebopc fixes

Block Comment Crash

In previous versions of bebopc not completing a block comment could in some cases cause the compiler to crash rather than provide diagnostics. This has now been fixed.

A screenshot showing the improved diagnostics for improper block comments

Block comments @ EOF

In previous versions of bebopc a block comment left at the end of a schema would produce a diagnostic error; the compiler has been updated to allow this behavior.
A screenshot showing that a block comment can now be used at the end of a schema

--watch crash

In previous versions of bebopc while quickly editing and committing changes to a schema, watch mode could hard crash. A fix has been put in place to mitigate this.
watch-fix

Improved service diagnostics

When attempting to use an undefined type in a service method, it now reports the correct parent in the diagnostic
A screenshot showing the improved diagnostic for undefined types in a service method
Attempting to use a scalar or enum type in a service method produces a more understandable error
A screenshot showing the improved language of the diagnostic error unsupported types in service methods

Notices

bebopc 3.0.0 is on the horizon and some major changes are on the way

  • We plan to introduce compiler plugins. Give us your feedback here
  • the readonly modifier is deprecated and a struct will soon be immutable by default. Give us your feedback here.
  • The Dart generator will be removed from the compiler. Give us your feedback here

Misc

  • In #253 we removed the NodeJS Polyfill present in the Typescript runtime. If you encounter a BebopRuntimeError while using the runtime under node, you'll need to polyfill TextDecoder so it is on the global scope (just as we were doing for you.) This was removed because it would make non-node projects be detected as such.
  • Also in #253 we removed an erroneous dependency on @types/node which would cause bundlers to bundle them.
  • #244 fixed an issue on some linux distributions where the compiler would crash because it couldn't find a file dotnet was looking for.