Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jschaf
Copy link
Contributor

@jschaf jschaf commented Aug 7, 2018

Building the whole repository now works after adding support for the io_bazel_rules_go.

bazel build //...:all

Testing the whole repo fails with this, but that won't block this CL:

Assertion failed: (0), function TestFail, file tests/test.cpp, line 64.
VALUE: "0"
EXPECTED: "1"
TEST FAILED: tests/test.cpp:658, flatbuffers::LoadFile((test_data_path + "unicode_test.json").c_str(), false, &jsonfile_utf8)
Abort trap: 6

The flatbuffers_cc_library is a mostly identical port from the internal rules. I attempted to add a C++ test that depends on the monster_test.fbs through the flatbuffer_cc_library rule. Currently, it fails with:

bazel test --test_output=all --verbose_failures //:monster_bzl_rules_test

error: /Users/jschaf/prog/flatbuffers/tests/monster_test.fbs:19:0: error: enum value already exists: Monster

I'm not sure why the enum already exists error is thrown.

@jschaf jschaf mentioned this pull request Aug 7, 2018
Copy link
Collaborator

@aardappel aardappel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't vouch for the Bazel changes, but I assume you know what you're doing :)

@@ -0,0 +1,65 @@
#include "flatbuffers/flexbuffers.h"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file is weird to me. It doesn't actually test anything, and has a bunch of unused code. Can it be cleaned up? removed? replaced with just using test.cpp?

@AustinSchuh
Copy link
Contributor

https://github.com/AustinSchuh/flatbuffers/tree/flatbuffer_cc has the changes required to make all the tests pass. Is there any way I can help finish this? We use bazel and I'm looking at using flatbuffers and would rather start with no local modifications :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants