Skip to content

Move mutex.h header to public internal #792

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Dec 16, 2021

Conversation

dconeybe
Copy link
Contributor

@dconeybe dconeybe commented Dec 15, 2021

Move the guts of app/src/mutex.h to the new file app/src/include/firebase/internal/mutex.h, leaving app/src/mutex.h as just an indirection to the new file. A future PR will delete app/src/mutex.h and adjust all instances where it is included to point to the new file.

This is the second PR (the first one being #751) towards moving firebase::Mutex into the public-internal includes directory, so that it can be used by future.h. See #747 for the rationale.

Googlers can see b/206520921 for more details.

@dconeybe dconeybe self-assigned this Dec 15, 2021
@@ -93,4 +93,4 @@ class MutexLock {

Choose a reason for hiding this comment

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

📝 Documentation issue: [10 lines up] warning: Member MutexLock(Mutex &mutex) (function) of class firebase::MutexLock is not documented.

@dconeybe dconeybe added the skip-release-notes Skip release notes check label Dec 15, 2021
…ectories for firebase_testing to fix a build error when including mutex.h
@dconeybe dconeybe added the tests-requested: quick Trigger a quick set of integration tests. label Dec 15, 2021
@github-actions github-actions bot added tests: in-progress This PR's integration tests are in progress. and removed tests-requested: quick Trigger a quick set of integration tests. labels Dec 15, 2021
@github-actions
Copy link

github-actions bot commented Dec 15, 2021

❌  Integration test FAILED

Requested by @dconeybe on commit 89ecf20
Last updated: Thu Dec 16 17:30 PST 2021
View integration test log & download artifacts

Failures Configs
missing_log [TEST] [ERROR] [iOS] [macos] [ios_target]

Add flaky tests to go/fpl-cpp-flake-tracker

@github-actions github-actions bot added the tests: failed This PR's integration tests failed. label Dec 15, 2021
@firebase-workflow-trigger firebase-workflow-trigger bot removed the tests: in-progress This PR's integration tests are in progress. label Dec 15, 2021
@dconeybe dconeybe added the tests-requested: quick Trigger a quick set of integration tests. label Dec 15, 2021
@github-actions github-actions bot added tests: in-progress This PR's integration tests are in progress. tests: succeeded This PR's integration tests succeeded. and removed tests-requested: quick Trigger a quick set of integration tests. tests: failed This PR's integration tests failed. labels Dec 15, 2021
@firebase-workflow-trigger firebase-workflow-trigger bot removed the tests: in-progress This PR's integration tests are in progress. label Dec 15, 2021
@dconeybe dconeybe marked this pull request as ready for review December 15, 2021 18:58
@dconeybe dconeybe requested a review from jonsimantov December 15, 2021 18:58
@@ -30,7 +30,7 @@
#include "admob/src/include/firebase/admob/banner_view.h"
#include "admob/src/include/firebase/admob/types.h"
#include "app/src/assert.h"
#include "app/src/mutex.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

......how about just keeping app/src/mutex.h, and having it be empty except for an include of app/src/include/firebase/internal/mutex.h? :)

Would make this PR much smaller...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm somewhat averse to leaving app/src/mutex.h there as a mere indirection because then there become 2 ways to include firebase::Mutex (instead of only one). It is true that it would reduce the number of lines changed in this PR but at the cost of all future readers which have to follow the trail to eventually get to the mutex.h header that actually defines the Mutex and MutexLock classes.

If mixing the include fixes with the logistical changes is the part that is concerning, what about leaving app/src/mutex.h in there temporarily then delete it in a follow-up PR?

"There should be one-- and preferably only one --obvious way to do it."
https://www.python.org/dev/peps/pep-0020/

Copy link
Contributor

Choose a reason for hiding this comment

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

If mixing the include fixes with the logistical changes is the part that is concerning, what about leaving app/src/mutex.h in there temporarily then delete it in a follow-up PR?

Yes, I like that idea.

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 be moved to a separate PR.

This reverts commit 81737b8.
@jonsimantov jonsimantov self-requested a review December 16, 2021 19:20
@dconeybe dconeybe added the tests-requested: quick Trigger a quick set of integration tests. label Dec 16, 2021
@github-actions github-actions bot added the tests: in-progress This PR's integration tests are in progress. label Dec 16, 2021
@github-actions github-actions bot removed tests-requested: quick Trigger a quick set of integration tests. tests: succeeded This PR's integration tests succeeded. labels Dec 16, 2021
dconeybe added a commit that referenced this pull request Dec 16, 2021
Rebase this away before creating a PR for this branch.
@github-actions github-actions bot added the tests: succeeded This PR's integration tests succeeded. label Dec 16, 2021
@firebase-workflow-trigger firebase-workflow-trigger bot removed the tests: in-progress This PR's integration tests are in progress. label Dec 16, 2021
@dconeybe dconeybe merged commit 89ecf20 into main Dec 16, 2021
@dconeybe dconeybe deleted the dconeybe/MoveMutexHeaderToPublicInternal branch December 16, 2021 22:54
@github-actions github-actions bot added tests: in-progress This PR's integration tests are in progress. and removed tests: succeeded This PR's integration tests succeeded. labels Dec 16, 2021
@github-actions github-actions bot added the tests: failed This PR's integration tests failed. label Dec 17, 2021
@firebase-workflow-trigger firebase-workflow-trigger bot removed the tests: in-progress This PR's integration tests are in progress. label Dec 17, 2021
@firebase firebase locked and limited conversation to collaborators Jan 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
skip-release-notes Skip release notes check tests: failed This PR's integration tests failed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants