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

Release 5.11.4 causes build failures due to naming collision #315

Open
jonahgrant opened this issue May 13, 2024 · 2 comments
Open

Release 5.11.4 causes build failures due to naming collision #315

jonahgrant opened this issue May 13, 2024 · 2 comments

Comments

@jonahgrant
Copy link

Description

Release 5.11.4's updated Package.swift.template has two targets with the same name. This causes workflows of projects using rive-ios to fail.

Provide a Repro

With 5.11.4 in a project's packages, archiving it locally and running an xcodebuild Github workflow causes a failure.

Run scheme_list=$(xcodebuild -list -json | tr -d "\n")
2024-05-13 18:53:51.809 xcodebuild[2832:1[7](https://github.com/mongoosehq/ios/actions/runs/9068255434/job/24915134902#step:3:8)283] Writing error result bundle to /var/folders/3m/p59k4qdj0f17st0gn2cmj3640000gn/T/ResultBundle_2024-13-05_18-53-0051.xcresult
xcodebuild: error: Could not resolve package dependencies:
  duplicate target named 'RiveRuntime'

Workflow file:

name: Xcode - Build and Analyze

on: [push, pull_request]

jobs:
  build:
    name: Build and analyse default scheme using xcodebuild command
    runs-on: macos-14

    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Set Default Scheme
        run: |
          scheme_list=$(xcodebuild -list -json | tr -d "\n")
          default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]")
          echo $default | cat >default
          echo Using default scheme: $default
      - name: Build
        env:
          scheme: ${{ 'default' }}
        run: |
          if [ $scheme = default ]; then scheme=$(cat default); fi
          if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi
          file_to_build=`echo $file_to_build | awk '{$1=$1;print}'`
          sudo xcode-select -s /Applications/Xcode_15.2.app
          xcodebuild clean build analyze -scheme "$scheme" -"$filetype_parameter" "$file_to_build" | exit ${PIPESTATUS[0]}
      - name: Test
        env:
          scheme: ${{ 'default' }}
        run: |
          if [ $scheme = default ]; then scheme=$(cat default); fi
          if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi
          file_to_build=`echo $file_to_build | awk '{$1=$1;print}'`
          sudo xcode-select -s /Applications/Xcode_15.2.app
          xcodebuild test -scheme "$scheme" -"$filetype_parameter" "$file_to_build" | exit ${PIPESTATUS[0]}

Additional context

We've reverted to version 5.11.3 which resolved these failures.

@philter
Copy link
Contributor

philter commented May 15, 2024

@jonahgrant Build 5.11.6 should resolve this build error.

@dskuza
Copy link
Contributor

dskuza commented Sep 4, 2024

@jonahgrant Has this been resolved for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants