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 fails with binary references in Cartfile.resolved, still exits cleanly #58

Closed
erichoracek opened this issue Apr 4, 2017 · 9 comments
Assignees

Comments

@erichoracek
Copy link

erichoracek commented Apr 4, 2017

When the Cartfile.resolved contains a binary framework, e.g.:

binary "https://www.mapbox.com/ios-sdk/Mapbox-iOS-SDK.json" "3.5.0"

Rome emits the following error when attempting to perform a download:

$ rome download
Carfile.resolved parse error: "Cartfile.resolved" (line 1, column 1):
unexpected "b"
expecting white space, "git" or "github"

Additionally, when this occurs, Rome does not error with a non-zero exit status to indicate that an error occurred. This causes scripts to continue as if no error occurred.

This was tested with the latest Rome version:

$ rome --version              
0.10.1.22 - Romam uno die non fuisse conditam.
@tmspzz
Copy link
Owner

tmspzz commented Apr 4, 2017

@erichoracek binary repos are not supported at the moment. I was unaware of this feature in Carthage.

I will add support for binary only frameworks, I need to study a little how deal with this case.

I'll also correct the exit status on parse errors.

@tmspzz tmspzz self-assigned this Apr 4, 2017
@erichoracek
Copy link
Author

Is there any reason why Rome would need to cache prebuilt frameworks for binary Cartfile references? Since these have no artifacts that need caching, I'd be fine if Rome just ignored them outright.

@tmspzz
Copy link
Owner

tmspzz commented Apr 4, 2017

I guess a few reasons could be:

  • to avoid a download if are using the local cache option.
  • to store frameworks privately in your S3 bucket.

I can start with trying to tolerate parse errors in the Cartfile.resolved

@erichoracek
Copy link
Author

erichoracek commented Apr 4, 2017

Carthage has an internal cache for prebuilt binaries at:

~/Library/Caches/org.carthage.CarthageKit/binaries/

so I don't think that you'd be avoiding unnecessary downloads.

As such, as far as I can tell, the only benefit that Rome support for binary Cartfile references would have is storing binary frameworks in your S3 bucket.

The ideal behavior for us would just be to ignore these frameworks outright since we don't care about having these frameworks stored in our bucket. However, I can see how that may be unexpected behavior for some users.

@tmspzz
Copy link
Owner

tmspzz commented Apr 4, 2017

I think a download can be avoided if the frameworks is placed directly at the correct path in Carthage/Build/{platform} and carthage just invoked with build

To make this work properly I think that Rome would need to resolve the binary json and figure out a couple of things. After that it would generate a Romefile.resolved (the irony) where it stores the missing information for these cases.

Immediate plan:

  • Start simple and make the parsing fault tolerant (thus ignoring binary lines)

Further enhancement:

  • try the resolved path

@erichoracek
Copy link
Author

That seems reasonable—as long as binary lines are ignored for the time being and do not cause the command to fail that should work for us. 👍

@tmspzz
Copy link
Owner

tmspzz commented Apr 4, 2017

Please try pre-release https://github.com/blender/Rome/releases/tag/v0.10.2.23

@erichoracek
Copy link
Author

@blender that fixed it, thanks!

@tmspzz
Copy link
Owner

tmspzz commented Apr 10, 2017

There is a full new release that includes this fix and #57 , get it with brew upgrade rome

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

No branches or pull requests

2 participants