Skip to content

Conversation

@paulb777
Copy link
Member

@paulb777 paulb777 commented Jun 5, 2020

And remove Core, IID, and FIS from selectable products.

@google-oss-bot
Copy link

1 Warning
⚠️ Did you forget to add a changelog entry? (Add #no-changelog to the PR description to silence this warning.)

Generated by 🚫 Danger

#if SWIFT_PACKAGE
@import FirebaseCore;
@import GTMSessionFetcherCore;
#import "FirebaseCore/Sources/Private/FIRAppInternal.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not adopt repo-relative imports for all private headers?

And for that matter, if that works, why not just use repo-relative imports for all the headers?

As it stands this is an unmaintainable mess. People will develop one way and fail to update the imports on the other side. This doesn't seem long term viable without finding a way to just have one set of imports.

Copy link
Member Author

Choose a reason for hiding this comment

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

We should migrate to all repo-relative internal headers, but I'd prefer to work on standardization on master and separate from the Swift Package Manager branch.

Public headers cannot be repo relative because they'll generate conflicts with module-imports. The exception is public header imports from a non-header source in the same target.

Copy link
Contributor

Choose a reason for hiding this comment

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

But surely there has to be a way to hide this so that not every client of FirebaseCore has to have this mess inside it.

Consider an alternative:

FirebaseCore has a private header that contains:

#if SWIFT_PACKAGE
@import FirebaseCore;
#else
#import <FirebaseCore/FirebaseCore.h>
#endif

Now functions is none the wiser about this; we just adopt the convention that imports from one SDK to another always use our private umbrella header.

As it stands, this is creating a mass of technical debt. Honestly, I can't even read what's going on here and have a hard time understanding whether or not imports are being handled equivalently on both sides of the #else. Now that storage is done I think we're past the point of prototyping and we need to address this issue.

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, addressing in #5758 and will rebase or reimplement this PR after that.

@paulb777 paulb777 marked this pull request as draft June 7, 2020 16:44
@paulb777
Copy link
Member Author

Replaced by #5858

@paulb777 paulb777 closed this Jun 19, 2020
@paulb777 paulb777 deleted the pb-spm-functions branch July 8, 2020 23:56
@firebase firebase locked and limited conversation to collaborators Jul 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants