Make it so external flatbuffer definitions compile

I'm not the biggest fan of this solution, but I need ideas for how to do
better.  Protobuf has a better answer but I can't find it.

1) The compilers don't put bazel-bin in the include path by default.
   That only happens when specific things in the local repository
   trigger it.  This means that including external/aos/foo_generated.h
   doesn't work.  We need to just include foo.h.  Static flatbuffers
   trigger this by reading the reflection binary flatbuffer.  So, rip
   strip out the external/aos (or whatever) part of the filename by
   cd'ing into external/aos before building.
2) Static flatbuffers end up pointing reflection_generated.h to
   bazel-out/k8-opt/bin/external/aos/aos/flatbuffers/reflection_generated.h
   which is wrong.  Detect that a bit more aggressively and bail on it.

Change-Id: I0c6aad98e41fbe14deef99754495e78925f97aa4
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
3 files changed
tree: 64c175f6a2801ea324a1af0bd07c192b659d545f
  1. aos/
  2. build_tests/
  3. compilers/
  4. debian/
  5. doc/
  6. documentation/
  7. frc/
  8. motors/
  9. scouting/
  10. third_party/
  11. tools/
  12. .bazelignore
  13. .bazelrc
  14. .clang-format
  15. .gitignore
  16. .npmrc
  17. .prettierrc.json
  18. BUILD
  19. Cargo.Bazel.lock
  20. Cargo.lock
  21. Cargo.toml
  22. go.mod
  23. go.sum
  24. go_deps.bzl
  25. LICENSE.txt
  26. package.json
  27. pnpm-lock.yaml
  28. pnpm-workspace.yaml
  29. README.md
  30. rollup.config.js
  31. rustfmt.toml
  32. tsconfig.json
  33. tsconfig.node.json
  34. WORKSPACE
  35. yarn.lock
README.md

Build Status

Build status

Introduction

Welcome to AOS's main code repository. It contains two things:

  • AOS ("Autonomous Operating System") is an open source event-loop based framework for realtime robotic systems. You can learn more about it here.
  • A collection of software useful for robots, particularly the kind used in the First Robotics Competition.

Pleaes note: AOS moved here fairly recently and we are still cleaning up a few things, especially documentation.

Contributing

All development of AOS is done on our gerrit instance at https://realtimeroboticsgroup.org/gerrit with github being a read-only mirror. We are happy to add external contributors. If you are interested, reach out to Austin Schuh and he will help you get access. In case of disputes over if a patch should be taken or not, Austin has final say.

Submissions must be made under the terms of the following Developer Certificate of Origin.

By making a contribution to this project, I certify that:

    (a) The contribution was created in whole or in part by me and I
        have the right to submit it under the open source license
        indicated in the file; or

    (b) The contribution is based upon previous work that, to the best
        of my knowledge, is covered under an appropriate open source
        license and I have the right under that license to submit that
        work with modifications, whether created in whole or in part
        by me, under the same open source license (unless I am
        permitted to submit under a different license), as indicated
        in the file; or

    (c) The contribution was provided directly to me by some other
        person who certified (a), (b) or (c) and I have not modified
        it.

    (d) I understand and agree that this project and the contribution
        are public and that a record of the contribution (including all
        personal information I submit with it, including my sign-off) is
        maintained indefinitely and may be redistributed consistent with
        this project or the open source license(s) involved.

To do this, add the following to your commit message. Gerrit will enforce that all commits have been signed off.

Signed-off-by: Random J Developer <random@developer.example.org>

Git has support for adding Signed-off-by lines by using git commit -s, or you can setup a git commit hook to automatically sign off your commits. Stack Overflow has instructions for how to do this if you are interested.