Commit Graph

12 Commits

Author SHA1 Message Date
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
Ivan Dlugos b9d43a557c
dart - add Packable interface (#6846) 2021-09-28 13:23:30 -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 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 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 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
Dan Field 91399ad055
fix union type names (#5902)
* fix union type names

* fix up generation and test

* format

* update codegen
2020-05-13 10:26:32 -07:00
Wouter van Oortmerssen 160e8f2fdc Disallowed 0 byte structs.
This is because they are incompatible with C++ and possibly other
languages that make them minimum size 1 (to make sure multiple
such objects don't reside at the same address). Forcing them to size
1 was also not practical, as that is requires updating the logic
of a lot of implementations and thus possibly backwards incompatible.

More here: https://github.com/google/flatbuffers/issues/4122

Change-Id: I2bfdc8597b7cfd2235bb4074bb2ae06f81f8e57d
2018-10-29 17:40:19 -07:00
Wouter van Oortmerssen ea9d60bbdf Added missing dart/ts test changes.
Change-Id: I836091193485b890710f1df779d4d770f729a27a
2018-08-20 12:05:37 -07:00
Dan Field 88912640d0 Add [Dart] support (#4676)
* Add [Dart] support

* fix enum vectors

* Allow for opt out of string interning

* fix comment style, make interning opt in

* remove Offset<T>, prefer int

* avoid creating unnecessary vtable objects

* start work on tests - do not generate builder if struct has 0 fields - add int64

* support reading structs properly

* correctly handle reading vectors of structs, dartfmt

* support structs, fix unnecessary prepares

* fix bool customizations

* undo unintentional removal of file

* docs updates, complete tutorial, bug fix for codegen

* more documentation

* Update docs, add to doxygen file

* update package structure, add samples script/code

* rearrange sample

* Tests

* Add readme for pub

* cleanup package for pub

* update docs for renamed file

* remove custom matcher, use `closeTo` instead

* remove unintentional file

* remove unintended file checkin

* use auto, move method, cleanup

* refactor to ObjectBuilders, add Builders

* Update tests, examples

* Add files missing from previous commit

* documentation and example updates

* Update LICENSE, make dartanalyzer happy, fix minor bugs, get rid of duplicate files, publish script

* fix sample for slightly different schema

* Update pubspec.yaml
2018-05-18 11:06:15 -07:00