-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Make FDC SDK init default outputDir disjoint #7546
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
Conversation
| if (fs.existsSync(candidateDir)) { | ||
| baseDir = candidateDir; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't needed. @dconeybe and I made it always append the package path after the output path.
Just did the same for Swift as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this was fairly recent.
He actually added this logic to emulator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fredzqm, this logic was added by me in #7535. If there is no app/src/main/java or app/src/main/kotlin then it creates a folder named "generated" and puts the connector into its own directory under there. If, however, one of those two directories do exist, then they are used. This is the desirable behavior. The other SDKs also go into a "generated" directory, so it made sense, to me, to put them all in there. Hopefully customers will change it anyways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There must be some confusion here. The preference of using app/src/main/... is a special case that follows the conventional folder structure of basic Android apps. If you're going to remove this logic, please remove the comment above it as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the was some miscommunication here. AFAICT, we want to keep this logic - #7547 adds it back in.
Separately, even after that tweak, the output looks redundant/weird to me - by default, the connectorID shows up 2x in the output path

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed offline. Reverted that change.
Thanks for catching it!
| if (fs.existsSync(candidateDir)) { | ||
| baseDir = candidateDir; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There must be some confusion here. The preference of using app/src/main/... is a special case that follows the conventional folder structure of basic Android apps. If you're going to remove this logic, please remove the comment above it as well.
joehan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure that we want this - lets sync up when we're all online
joehan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Description
The existing behavior
From an empty directory. Run
firebase init dataconnectand thenfirebase init dataconnect:sdk3 times for each platform.We got
connector.yaml:Then
firebase dataconnect:sdk:generatefails withScenarios Tested
When
app/src/main/kotlinis present: