Commit Graph

6 Commits

Author SHA1 Message Date
James Kuszmaul eeb49c2757
Move flatbuffer_ts_library to typescript.bzl (#7183)
This makes it so that users of flatbuffer_cc_library don't need to have
rules_nodejs available in their WORKSPACE, addressing #7179.
2022-03-22 21:41:39 -07:00
James Kuszmaul e5f331db99
[TS] Add single-file ts codegen & bazel rule for typescript (#7161)
The headline here is adding a flatbuffer_ts_library rule for generating
typescript code in bazel. This entails some non-trivial other changes,
but ideally none are user-visible.

In particular:
* Added a --ts-flat-file flag that generates a single *_generated.ts
  file instead of separate files for each typescript type. This makes
  bazel much happier.
* Import the bazel rules_nodejs stuff needed to support building
  typescript in bazel
* Move flatbuffers.ts to index.ts because I wasn't sure how to make
  bazel comprehend the "main" attribute of the package.json. Happy
  to take another stab at figuring that out if really needed.
* Fix another couple keyword escaping spots in typescript...
2022-03-10 10:08:13 -08:00
James Kuszmaul 9c52ec3744
Add deps attribute to flatbuffer_cc_library (#7107)
I'm not seeing the reason why we didn't attempt to support transitive
dependencies for flatbuffer_cc_library, and the current setup makes
having to propagate new dependencies to all of their recursive
dependents obnoxious.
2022-02-21 22:33:47 -06:00
Fraser Crossman f83ee1af59
[idl_parser] Check structs and enums do not clash in a namespace (#6562)
* [idl_parser] Check structs and enums do not clash in a namespace

Uses fully qualified names to check for clashes within a given namespace whether explicitly defined or in the global namespace.

* [idl_parser] Move type name clash check to ParseEnum and ParseDecl

Change point at which parsing error is returned to ensure error is caught more generally. This change means that the error is returned after parsing the entirety of the offending duplicate rather than at the start when parsing it's name.

* [idl_parser] Add single and multi file type name clash tests

Adds a selection of tests for valid single file schemas with types that have the same name but are in different namespaces.
Adds a test for an a valid schema that spans two files with two types that have the same name but are in different namespaces.
Adds a test for an an invalid schema that spans two files with two types that have the same name and are in the same namespace.
2021-05-14 13:56:52 -07:00
mustiikhalil cd67261bba
[CI] fixes buildkite (#6544) 2021-04-05 12:34:42 +03:00
mustiikhalil 6af37e6729
[CMake] Renames BUILD files (#6457)
* Renamed build to build.bazel to stop xcode from complaining about it

* Renamed all build to build.bazel

* Fixes small ci issue
2021-02-11 10:16:57 -08:00