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

TargetScript should use FileListGlob instead of Path for inputFileListPaths #6257

Open
mo5tone opened this issue May 7, 2024 · 3 comments
Open
Labels
type:need/problem Report needs or problems you came across that are not bugs

Comments

@mo5tone
Copy link
Contributor

mo5tone commented May 7, 2024

What problem or need do you have?

I ran into a similar issue with #6188. I am using firebase directly with SPM instead of managing it through tuist.
I cannot set the inputFileListPaths to ${BUILD_DIR}/../../SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/CrashlyticsInputFiles.xcfilelist in TargetScript.

Potential solution

Should use FileListGlob instead of Path.

macOS version

13.6.6

Tuist version

4.11.0

Xcode version

15.2

@mo5tone mo5tone added the type:need/problem Report needs or problems you came across that are not bugs label May 7, 2024
@pepicrft
Copy link
Contributor

I cannot set the firebase/firebase-ios-sdk#11463 to ${BUILD_DIR}/../../SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/CrashlyticsInputFiles.xcfilelist in TargetScript.

Could you share the exact error that you are getting? Also, could you share a reproducible project with us?

@mo5tone
Copy link
Contributor Author

mo5tone commented May 16, 2024

Steps to reproduce:

  • cd ~/Developer && mkdir Demo && cd Demo

  • tuist init

  • edit Project.swift to below follow firebase SPM guide

    Project.swift
    import ProjectDescription
    let project = Project(
        name: "Demo",
        packages: [
            .package(url: "https://github.com/firebase/firebase-ios-sdk.git", .upToNextMajor(from: "10.26.0")),
        ],
        targets: [
            .target(
                name: "Demo",
                destinations: .iOS,
                product: .app,
                bundleId: "io.tuist.Demo",
                infoPlist: .extendingDefault(
                    with: [
                        "UILaunchStoryboardName": "LaunchScreen.storyboard",
                    ]
                ),
                sources: ["Demo/Sources/**"],
                resources: ["Demo/Resources/**"],
                scripts: [
                    .post(
                        script: "${BUILD_DIR%/Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run",
                        name: "FirebaseCrashlytics",
                        inputFileListPaths: [
                            "${BUILD_DIR}/../../SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/CrashlyticsInputFiles.xcfilelist",
                        ]
                    )
                ],
                dependencies: [
                    .package(product: "FirebaseCrashlytics"),
                ],
                settings: .settings(
                    base: [
                        "OTHER_LDFLAGS": ["$(inherited)", "-ObjC"],
                    ]
                )
            ),
            .target(
                name: "DemoTests",
                destinations: .iOS,
                product: .unitTests,
                bundleId: "io.tuist.DemoTests",
                infoPlist: .default,
                sources: ["Demo/Tests/**"],
                resources: [],
                dependencies: [.target(name: "Demo")]
            ),
        ]
    )
  • check 'FirebaseCrashlytics' build phase, the 'Input File Lists' take wrong value.
    Screenshot 2024-05-16 at 09 10 43

  • build failed with error: "Unable to load contents of file list: '/Users/Foo/Developer/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/CrashlyticsInputFiles.xcfilelist'"

@pepicrft
Copy link
Contributor

Thanks a lot @mo5tone. We added it to a list to prioritize it for next week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:need/problem Report needs or problems you came across that are not bugs
Projects
None yet
Development

No branches or pull requests

2 participants