Skip to content
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

Compilation failing since the last Promises update #12427

Closed
Nonouf opened this issue Feb 26, 2024 · 16 comments
Closed

Compilation failing since the last Promises update #12427

Nonouf opened this issue Feb 26, 2024 · 16 comments

Comments

@Nonouf
Copy link

Nonouf commented Feb 26, 2024

Description

Google/Promises has been updated to 2.4.0 a few days ago and it contains a breaking changes.

The firebase iOS SDK is dependant on Promises versions 2.1.0 to 2.9.9. I've opened an issue with the Promises team here, but in the meantime is there anyway to force the firebase SDK to use an older version of Promises?

Reproducing the issue

  1. Setup a project with the latest Firebase SDK using SPM or update your existing project (make sure to clean derived data and any cache beforehand)
  2. Compile

Firebase SDK Version

10.6.0 (and also tried on the latest 10.21.0)

Xcode Version

15.2

Installation Method

Swift Package Manager

Firebase Product(s)

All

Targeted Platforms

iOS

Relevant Log Output

No response

If using Swift Package Manager, the project's Package.resolved

No response

If using CocoaPods, the project's Podfile.lock

No response

@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@mojidabckuu
Copy link

Faced the same issue using tuist
But using bare SPM Project everything is good.

Had to force Promises back to 2.3.1 to make it work again

@Nonouf
Copy link
Author

Nonouf commented Feb 26, 2024

@mojidabckuu Yes, I've done the same thing for now.

@paulb777
Copy link
Member

Hmm, I'm not able to reproduce, and looking at the Promises diffs from 2.3.1 to 2.4.0, there is only the addition of the privacy manifest and a bump of the Swift version to 5.3.

I'm not sure why either of those would cause the library to fail to build ...

@paulb777
Copy link
Member

We're going to need a repro case to help. The example being discussed at google/promises#228 looks like it might be a problem with the TuIst build system.

@Nonouf
Copy link
Author

Nonouf commented Feb 27, 2024

@paulb777 Yes we're using Tuist indeed. I didn't think at first it could be related.

The repo concerned is a private one. I'll prepare an example project asap and then come back to you.

@shreyash-sharechat
Copy link

shreyash-sharechat commented Feb 28, 2024

@Nonouf & @mojidabckuu what tuist & XCode versions you guys are using?
We are having:
XCode 15.2,
Swift 5.9,
Tuist 3.17.0

@Nonouf
Copy link
Author

Nonouf commented Feb 29, 2024

@shreyash-sharechat We are using Tuist 3.35.5, Xcode 15.2 and Swift 5.9

@mojidabckuu
Copy link

@shreyash-sharechat
Xcode 14.3.1
Swift 5.8.1
tuist 3.26.0

@mojidabckuu
Copy link

To reproduce the compilation problem you can easily do this by

mkdir firebase-tuist
cd firebase-tuist
echo "3.26.0" >> .tuist-version
tuist bundle
tuist init --platform ios
echo "
import ProjectDescription

let dependencies = Dependencies(
    swiftPackageManager: [
        .remote(
            url: \"https://github.com/firebase/firebase-ios-sdk\",
            requirement: .exact(\"10.7.0\")
        )
    ]
)
" >> Tuist/Dependencies.swift

Then add .external("FirebaseCrashlytics") to app's target

tuist fetch
tuist generate

Then build the project

@Nonouf
Copy link
Author

Nonouf commented Feb 29, 2024

Here is a sample project using Tuist 3.35.5, Xcode 15.2 and Swift 5.9 : https://github.com/Nonouf/TestTuistFirebase

You should just be able to open the workspace and build.

@paulb777
Copy link
Member

Thanks for the repro, but the workspace doesn't build for me:

Screenshot 2024-02-29 at 7 12 21 AM

Looks like several things are missing from the xcworkspace:

Screenshot 2024-02-29 at 7 13 31 AM

Is there a Tuist issue report? Give this has only been reported by Tuist users, it is almost certainly an issue with the Tuist build system.

@shreyash-sharechat
Copy link

shreyash-sharechat commented Feb 29, 2024

@paulb777 You are missing dependancies.
You either run following in terminal from the root of repo:

tuist fetch
tuist generate

or @Nonouf should push whole repo without .gitignoreed dependencies folder for Tuist

Also, tuist is not really a build system, it's just project configurator, builds are run by vanilla xcodebuild system only.

@Nonouf
Copy link
Author

Nonouf commented Mar 1, 2024

@paulb777 Yes indeed. As @shreyash-sharechat said, it's just the dependencies that are missing. I forgot the gitignore. It'll be up to date shortly.

The more I look at the problem, the more it looks like a Tuist issue indeed. I'll forward the issue to the Tuist team if needed. There has been a lot of big changes there very recently with a new major version.

@shreyash-sharechat
Copy link

There has been a lot of big changes there very recently with a new major version.

Though it should all be backwords compatible, because we never updated tuist here. Still running 3.17.0 from couple of years back.

@JohnnyTseng
Copy link

Folks having issue with Tuist should try upgrade to Tuist 4 according to this: tuist/tuist#6036 (comment)

@paulb777 paulb777 closed this as completed Mar 7, 2024
@firebase firebase locked and limited conversation to collaborators Apr 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants