Commit Graph

68 Commits

Author SHA1 Message Date
Derek Bailey
acf39ff056 FlatBuffers Version 22.12.06 (#7702) 2022-12-06 22:54:49 -08:00
Derek Bailey
8f625561d0 FlatBuffers Version 22.11.23 (#7662) 2022-11-23 11:32:19 -08:00
Derek Bailey
9d2c04d629 FlatBuffers Version 22.11.22 2022-11-22 14:40:01 -08:00
Saman
7b038e3277 Fix import problem in dart generated files. (fixes #7609). (#7621)
* Fix import problem in dart generated files. (fixes #7609).

* Fix naming.

* Fix minor changes in generated files.

* Add some tests. Fix minor problems.

* Fix minor format problem plus import alias issue.

* Minor fix in dart code generator, remove java from examples

* remove java and go generated files

* Fix dart tests.

* Fix spell problem.

* Remove excessive tests :))

Co-authored-by: Derek Bailey <derekbailey@google.com>
2022-11-13 19:21:57 +00:00
James Kuszmaul
8aa8b9139e Fix handling of +/-inf defaults in TS/rust/go/dart codegen (#7588)
+/-inf were not being handled, and so invalid typescript was being
generated when a float/double had an infinite default value. NaN was
being handled correctly.

Co-authored-by: Derek Bailey <derekbailey@google.com>
Co-authored-by: Casper <casperneo@uchicago.edu>
2022-11-08 10:59:46 -08:00
Michael Le
4c514483d8 Update DartTest.sh golden files (#7606) 2022-10-29 00:15:14 +00:00
Derek Bailey
203241ed32 FlatBuffers Version 22.10.26 (#7607) 2022-10-26 16:02:38 -07:00
Derek Bailey
a54ca1e759 FlatBuffers Version 22.10.25 (#7604) 2022-10-26 00:03:49 -07:00
Derek Bailey
c92e78a9f8 FlatBuffers Version 22.9.29 (#7557) 2022-09-29 22:12:07 -07:00
Derek Bailey
76ddae006f FlatBuffers Version 22.9.24 (#7547) 2022-09-27 11:55:25 -07:00
Derek Bailey
06c5c7ed0b FlatBuffers Version 2.0.8 (#7492) 2022-08-29 20:43:36 -07:00
Derek Bailey
b86387442e Fix typos (#7483) 2022-08-26 14:35:21 -07:00
Ian Hickson
0a80646371 Fix references to LICENSE file (#7377)
* Fix references to LICENSE file

This was broken by https://github.com/google/flatbuffers/pull/7073

* Update flat_buffers_test.dart
2022-07-07 16:06:19 -07:00
Will Hughes
b9eea76a86 [Dart] Implement putBool to fix errors when serializing structs with bools (#7359)
* [Dart] Implement putBool to fix errors when serializing structs with bools

* Add tests
2022-06-28 11:16:47 -04:00
Casper
a4cb1599d8 Namerdart (#7187)
* Apply Namer to Dart.

- Also refactor idl_gen_dart a bit
  - to use more const and references
  - out parameters should be the last argument

* Add keyword test

* minor fixes

* fix merge

* extra 's'

* move dart keyord into dart dir

* Address comments

* Use $ for escaping keywords
* Outparameters for namespace_map

* Escape dollar in toString

* Escape dollar in toString2

* Use UpperCamelCase for types and variants

* try to fix ToString

* namer Type fixes

* Remove path prefixing in imports

* gen code

Co-authored-by: Casper Neo <cneo@google.com>
2022-03-28 18:07:09 -04:00
Will Hughes
5a13f622cf Correctly parse lists of enums in Dart generated code (#7157)
* Correctly parse lists of enums in Dart generated code

* Add a test for #6869

* Commit generated code

* Fixed missing newline-at-eof
2022-03-22 21:56:14 -07:00
James Kuszmaul
9ed1323044 Fix 64-bit numeric enum values in typescript (#7135)
* Fix 64-bit default numeric enum values in typescript

If you had a default value that wasn't a valid enum value (e.g., a zero
if you used a bit_flag setting, like you get with AdvancedFeatures
in reflection.fbs), we weren't using BigInt.

* Run generate_code.py

* [DART] Handle deprecated fields & invalid enum defaults

* Update .NET test
2022-03-04 21:57:48 -08:00
Derek Bailey
39c8a19ce2 fixed comparator for native_inline (#7076)
* fixed comparator for native_inline

* added native_inline data

* updated more tests for the new field

* more fixes
2022-02-02 23:44:43 -08:00
Derek Bailey
b2550dbaa9 removed BSD-3-Clause license and Zlib licenses (#7073) 2022-02-02 13:12:01 -08:00
Derek Bailey
619b784374 one last dart omit local (#7070) 2022-02-01 22:25:52 -08:00
Derek Bailey
68a7661546 more omit type annotations for dart local variables (#7069) 2022-02-01 21:48:36 -08:00
Derek Bailey
7dac9961f0 omit type annotations for dart local variables (#7067)
* omit type annotations for dart local variables

* fixed some errors
2022-02-01 21:24:04 -08:00
Ivan Dlugos
a783bc9267 chore: dart 2.0.5 release changes (#6983) 2022-01-20 13:30:03 -08:00
Ivan Dlugos
256ab3798d WIP: Dart release 2.0 (#6927)
* chore: make flatc artifacts from CI executable

* chore: prepare dart 2.0.0 release

* refactor: update description in pubspec.yaml to make pub.dev happy

"The package description is too long.
Search engines display only the first part of the description. Try to keep the value of the description field in your package's pubspec.yaml file between 60 and 180 characters."
2021-11-18 10:56:29 -08:00
Ivan Dlugos
b9d43a557c dart - add Packable interface (#6846) 2021-09-28 13:23:30 -07:00
Ivan Dlugos
90baa1444b Dart: binary lists (typed_data) (#6839)
* Dart - add eager mode to Uint8ListReader

* Dart - add Int8ListReader

* Dart - use binary reader where useful

* Dart - test binary list reader laziness

* Dart - update generated code
2021-09-15 08:50:57 -07:00
Ivan Dlugos
e3c76a5cde Dart lints (#6808)
* Dart - add analysis options with the recommended lints

* Dart - generate code without linter issues

* Dart - remove linter issues in example and test code

* Dart - remove linter issues in lib code

* Dart - update generate code in /tests/
2021-08-30 12:54:59 -07:00
Ivan Dlugos
97d9527f6c Dart 2.0 release prep (#6759)
* Dart - pubspec.yaml shouldn't contain authors section anymore - it's unused

* Dart - update CHANGELOG.md

* Dart - update test and publish scripts
2021-08-02 13:31:36 -07:00
Ivan Dlugos
5235133f32 Dart - make ascii optimization optional in StringReader, same as in writeString() (#6758) 2021-07-29 10:39:03 -07:00
Ivan Dlugos
c871df7702 Dart - change table building to assert() instead of exceptions (#6754) 2021-07-26 11:42:42 -07:00
Ivan Dlugos
a6eeeb3b9c Dart - inline small functions to increase performance (#6755)
~25 % for reading
~30-35 % for writing
2021-07-26 10:09:46 -07:00
Ivan Dlugos
ac23482022 Dart - fixup writeString() return type after previous merges (#6753) 2021-07-26 09:54:13 -07:00
Ivan Dlugos
c36672d803 Dart - optimize writeString for ASCII (#6736)
* Dart - optimize writeString for ASCII

* Dart - writeString() ASCII optimization optional
2021-07-22 10:36:37 -07:00
Ivan Dlugos
2bfc8e9f01 Dart - make writeString() argument non-nullable (#6737) 2021-07-20 07:54:48 -07:00
Ivan Dlugos
65700441d3 Dart - make vTable fixed size (expect the number of fields when creating) (#6735) 2021-07-19 11:27:01 -07:00
Ivan Dlugos
dd5bb55cad Dart - make vTable deduplication optional (#6734) 2021-07-15 15:50:12 -07:00
Ivan Dlugos
e8423da1b7 Dart - regenerate example after recent flatc changes (#6733) 2021-07-15 13:03:27 -07:00
Ivan Dlugos
e73fab27d4 Dart - store empty vectors instead of NULL (#6728) 2021-07-09 12:44:40 -07:00
Ivan Dlugos
92ae532e43 Dart - finish/lowFinish/buffer changes (#6712)
* Dart - change Builder "lowFinish()" to "buffer" and "finish()" to not void return

Aligning the API with other languages, e.g. c++ and allowing custom use-cases to avoid creating a Uint8List

* Dart - change builder.buffer to check that finish() was already called

* Dart - builder - move !finished assertion to _prepare() which is run from all other functions
2021-07-09 11:45:45 -07:00
Ivan Dlugos
3f77dc9a0e Dart - unpack() must use eager list reader (#6723) 2021-07-09 09:55:34 -07:00
Ivan Dlugos
838c93b843 Dart - fix flex-builder compilation error (#6722)
* Dart - fix flex-builder compilation error

* DartTest.sh - run all tests
2021-07-09 09:53:27 -07:00
Ivan Dlugos
089f48a4a6 Dart - make sure added padding is zeroed, same as in C++ (#6716) 2021-07-09 09:06:40 -07:00
Ivan Dlugos
8ab35b2a5f Dart - add custom allocator support (#6711)
* Dart - add custom allocator support

* Dart - only copy written bytes during resize, not the whole old buffer.
2021-07-08 13:02:09 -07:00
Ivan Dlugos
a6ee335574 Dart null safety (#6696)
* Dart null-safety - prepare migration annotations in library files

* Dart null-safety - apply migration

* Dart null-safety - update flatc to generate valid code

* Dart null-safety - fix flatc generated code and adjust tests

* Dart null-safety - update example and the generated code in the tests folder

* Dart null safety - minor review changes

* Dart - apply `dartfmt -w .`
2021-06-22 08:54:57 -07:00
Ivan Dlugos
4e3a66c141 Dart object API (#6682)
* dart test scripts - generate with `--gen-object-api`

* Dart object API, pack and unpack methods (WIP)

* Dart flatc - extract Builder code to separate functions to reuse it in Pack()

* Dart flatc - use builder field-building implementation in pack()

* Dart flatc - add pack() as an intance method of the "T" class

* Dart object API - make inner fields unpacked as well

* Dart object API - use pack() when collecting field offsets

* Dart object API - use packOnce() for fields that are structs or vectors of structs

* Dart object API - remove obsolete union support TODO

* Dart object API - minor review changes, test and fixes

* Dart object API - revert packOnce() - not supported by other object API implementations

* Dart object API - update docs

* update dart generated code in tests/ to fix CI failure on ./scripts/check-generated-code.sh

* Dart flatc - fix compilation for old MSVC and c++0x
2021-06-14 10:15:56 -07:00
Ivan Dlugos
d959e23208 dart - change Builder.reset() to reuse an existing buffer (#6661) 2021-06-13 08:07:08 -07:00
Ivan Dlugos
b4e67f9bf0 Dart test fix (#6660)
* Dart cppData test - fix path on Dart v2.12 (Linux)

* Dart cppData test - fix expected data mismatch

* add Dart CI test in GH Actions
2021-05-20 12:00:51 -07:00
Wouter van Oortmerssen
5c01ad387f Dart generated code update
Change-Id: I317d731d17d733088cad608364b614bff8151c36
2021-05-10 11:35:00 -07:00
Wouter van Oortmerssen
8a7d013f85 Updated main version numbers to 2.0 2021-05-10 11:14:47 -07:00
Ivan Dlugos
ad3a729f96 dart Builder - expose finished buffer size (#6403) 2021-01-21 16:06:11 -08:00