Skip to content

Conversation

@vimanyu
Copy link
Contributor

@vimanyu vimanyu commented Aug 19, 2020

Since we decided to support just Python3 for building our SDK, firestore's nanopb dependency had to be updated to 0.3.9.6 as 0.3.9.5 has build errors in Python3. nanopb is updated across all firebase open source sdks and google3.
This commit specifically fixes issues with finding modules with Python3.
nanopb/nanopb@63f8e5e

Relevant PRs,
google/nanopb-podspec#14
firebase/firebase-ios-sdk#6214
cl/326682471

objc_spec doesn't crash locally on macs at the very least. But it is crashing on github runners. objc_integration test require a simulator and are more tricky to setup.
Firestore had to be updated from nanopb 0.3.9.5 to 0.3.9.6 in order for it to build with python3. This prevented builds of firebase-cpp-sdk when we included firestore with python3
Fixes errors with undefined symbols when including firestore in our cpp sdk builds
The buildtrees and downloads directory are used by vcpkg for building the requested libraries. buildtrees contains all build intermediates and also the source code for debugging. If you want to debug with source code for these dependencies, you shouldn't delete the buildtrees directory. In most cases, these directories are not needed and can take gigabytes of unnecessary space.
Comment on lines 78 to 79
if os.path.exists(buildtrees_dir_path):
shutil.rmtree(buildtrees_dir_path)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe put this in utils as a utility function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call. Done!

run: |
cd build
ctest --verbose
ctest --verbose -E "firestore_(objc_spec|objc_integration)_test"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be better to exclude them via https://github.com/firebase/firebase-cpp-sdk/blob/master/cmake/CTestCustom.cmake.

Either way, putting a comment explaining why it is being excluded would be good.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I was contemplating where to put this. Ended up going with this approach because it is more visible and will be a reminder on every workflow update/run. But I noticed that there are few tests already explicitly disabled in CTestCustom.cmake. So maybe having one list of all disabled tests is better. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

This will ensure that these tests are excluded even when run locally by users when they are not using the provided workflow run python scripts and keeps all excluded tests in one place.
@vimanyu vimanyu merged commit f425ce8 into dev Aug 21, 2020
@vimanyu vimanyu deleted the feature/gha-include-firestore-clean branch August 21, 2020 17:51
@firebase firebase locked and limited conversation to collaborators Sep 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

4 participants