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

Rome does not upload framework if dependency name and framework name does not match. #94

Closed
vgorloff opened this issue Jul 24, 2017 · 4 comments
Labels

Comments

@vgorloff
Copy link

Issue

Rome does not upload framework if dependency name and framework name does not match.

Steps to reproduce

  1. Add to the Cartfile dependency: github "ashleymills/Reachability.swift" == 3.0
  2. Build carthage for platform iOS. As Result you will get Cartfile.resolved with the contents like github "ashleymills/Reachability.swift" "v3"
  3. Upload dependencies to S3 using Rome: rome upload --platform iOS --cache-prefix 8E3004b
  4. Explore S3 bucket.

Expected

  1. Version file exists: 8E3004b/Reachability.swift/.Reachability.swift.version-v3
  2. Framework exists: 8E3004b/Reachability.swift/iOS/Reachability.framework-v3.zip
  3. dSYM file exists: 8E3004b/Reachability.swift/iOS/Reachability.framework-v3.dSYM.zip

Observed

  1. Version file exists: 8E3004b/Reachability.swift/.Reachability.swift.version-v3
  2. Framework and dSYM files missed.

Additional info

Before upload (and download as well) Rome should read contents of version file .Reachability.swift.version-v3 to get actual name of framework.
For instance contents of .Reachability.swift.version-v3 is the following:

{
  "commitish" : "v3",
  "iOS" : [
    {
      "hash" : "d2868e98c02222b2a7bff12397406e821bf48803c701a44fb0b4667f8efd5d94",
      "name" : "Reachability"
    }
  ]
}

From the contents of the version file we can see that real name of framework will be "Reachability.framework", but not "Reachability.swift.framework".

Similar problem observed with following dependencies:

github "BoltsFramework/Bolts-ObjC" "1.8.4"
github "airbnb/lottie-ios" "1.0.2"
github "ashleymills/Reachability.swift" "v3"
github "facebook/facebook-ios-sdk" "sdk-version-4.21.0"
github "facebook/facebook-sdk-swift" "a09021edf33417153fdf1066275f888c3b59fc6e"
github "yeahdongcn/UIColor-Hex-Swift" "3.0.2"

Rome version: 0.12.0.31 - Romam uno die non fuisse conditam.
OS and version: macOS 10.12.5 (16F73)

Thank you!

@tmspzz
Copy link
Owner

tmspzz commented Jul 24, 2017

Hi, should be already addressed by adding name aliases in your Repository map.

For Reachability.swift specify

[RepositoryMap]
Reachability.swift = Reachability

See https://github.com/blender/Rome#multiple-aliases

Does this help @vgorloff ?

Bottom line:

  • if you have dependencies hosted on github and the products name match the owner/name scheme you don't need any line in the Romefile [RepositoryMap] section

for example:
Cartfile.resolved

github "Alamofire/Alamofire" "4.5.0"

Romefile

[Cache]
    local = ~/Library/Caches/Rome/

And you are done.

  • if you have dependencies hosted on github and the products name match DOES NOT match the owner/name scheme or your dependency is not on github, you need an entry in the [RepositoryMap] section

for example:

for example:
Cartfile.resolved

github "Alamofire/Alamofire" "4.5.0"
github "ashleymills/Reachability.swift" "v3"
git "ssh://[email protected]:7999/iossdk/cat-names.git" "v1.3.0"

Romefile , note that there is no entry for Alamofire

[Cache]
    local = ~/Library/Caches/Rome/

[RepositoryMap]
Reachability.swift = Reachability
cat-names = CatNames

@vgorloff
Copy link
Author

vgorloff commented Jul 24, 2017

Thank you!

My bad. I did not know/read about Multiple Aliases.

Solution for my problem – is to write RepositoryMap like this.

[RepositoryMap]
   Reachability.swift = Reachability
   Bolts-ObjC = Bolts
   lottie-ios = Lottie
   UIColor-Hex-Swift = HEXColor
   facebook-ios-sdk = FBSDKCoreKit, FBSDKLoginKit, FBSDKShareKit
   facebook-sdk-swift = FacebookCore, FacebookLogin, FacebookShare

@vgorloff
Copy link
Author

I created enhancement #95. Feel free to close this issue.)

Thank you!

@tmspzz
Copy link
Owner

tmspzz commented Jul 24, 2017

@vgorloff Thanks! I will updated the documentation to make the Multiple Aliases more obvious.

@tmspzz tmspzz closed this as completed Jul 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants