-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
Add support for multiple platforms #36
Comments
How do you envision this working with respect to the |
@r-peck how about a switch just like carthage? like list [--platform iOS] in the Romefile one could specify a default-platform key |
So for the Without the presence option it could probably just list broken out by platform. |
It feels a little odd since you may have frameworks that don't support a given platform and that you don't care to use there (maybe a framework that's only used in your main application but not in your watch app). |
I think it's appropriate to consider how carthage handles this. By default carthage is platform agnostic and will perform the given command for all platforms in sequence unless a --platform [list, of, platforms] option is given to the command. That said let's imagine how this would work for Rome.
Now, let's consider a few examples: Example 1:
Example 2:
Seems to me that on the contrary of what I initially suggested there is no need for a default platform. Regarding the cache structure I think it should mirror the way carthage does it with @r-peck what do you think? I will soon merge #41 that should also work transparently with the multi platform feature |
That mirrors my thinking for the most part. My biggest concern was with changing the listing format:
|
I agree that it is upon the user to run the command for the appropriate platform. With the current Romefile format there is no way to specify frameworks per platform. This is doable but it would mean going in a completely different direction. Wether a platform argument should be specified or not for the list command it will still be a breaking change. I'm afraid that there is not easy way around it. The breaking change should also be indicated with a major change in version number (0.8 to 0.9). If rome refuses to list without a platform argument it will still output an error (form the CLI command parser) and the error will still be parsed by whatever is next. Example with required platform (thus bad command): Example with no required platform: So builds will fail anyways and once the user realises that missing dependencies have not been downloaded it should give them an hint of where things have failed. For the sake or consistency, I would prefer to have all commands behave the same where possible. There is no "semantic" reason (i.e. the command does not make sense) why @r-peck do you see a better way? Am I missing something? |
Makes sense to me. |
Great! Thanks for helping defining this :) |
Thanks for moving this proposal forwards guys! It's something we'll be needing soon. A few questions/comments: With respect to argument style, to match the style of Carthage, I believe that this would be With respect to the For example, say that As far as I can tell, this would require either:
Let me know if I've missed something. Thanks! |
I think --platform in carthage works with or without the comma, or if it doesn't I never noticed :D The behaviour with AssumptionsLet's assume the situation that @erichoracek described:
SolutionsSolution 1 - Ignore the problemThe easiest way to solve this is to ignore the problem just like carthage does. This means that the Example:
In a few cases The real issue here is if Solution 2 -
|
For the platforms delimiter, Carthage documents requiring comma. It will, however, handle spaces as long as the list is treated as a single argument by the shell (enclosed in quotes, for example). On listing per-platform, Solutions 2-4 are additive to solution 1 since not specifying something in the Romefile would fall back to ignoring. I would lean toward get the functionality in place first (solution 1), then enhance with solution 4. |
@blender @erichoracek Any strong feelings about the updated list output format, especially regarding sectioning—how are sections delimited, should it nest frameworks per platform or platforms per framework, etc. |
@r-peck I can get behind Solution 1 which solves the problem for the time being and is also retro-compatible I suggest the following format that also gets rid of headers completely:
Example:
|
From an implementation standpoint, I like the simplicity of that, and I like that it is consistent in all modes (default, missing, present). Would it make sense to include an example in the readme of how to extract a list of frameworks to forward to Carthage for a given platform since this will be less straightforward than with the current |
Sure or a output formatter flag could be provided like |
I have added a I would encourage anyone to try to sketch the CLI command and the output in a textual format. I find that it really helps to simulate the usage & desired outcome. If anyone is interested in implementing this please let me know here now or once the |
@blender I had actually taken a stab at the upload/download part of it, but stopped short of listing since that seemed to be the most contentious area. Also, if upload/download does change direction, I'm not worried about the lost effort. |
That is awesome! I don't think upload / download behavior will change anyhow. It's pretty clear that the only real problem is list and what the output format should look like. I have also realized that the current output of list also reports the version of the framework. So a more compete format definition would be |
Of all of the options, I agree that Solution 1 is the most reasonable in terms of complexity and as a first pass. We may have to update our script that does a One small comment with respect to output. I feel that if a single platform is specified, platform should not be included after the framework name, as it is redundant with what the user just typed. E.g.:
Something like Thanks for the detailed responses! |
It seems we have an agreement for Solution 1, a.k.a ignore the problem. I let this sink in for a bit and these are my comments Clarification about presence switches
|
@blender ah yes—I think I left something out in my response. My intent was to say that if a single I don't feel super strongly about this point. Either way seems fine for me, as it's simple to just take the first word of each line when parsing the output. Since it is now a rare case (you need to specify both a single platform as well as a presence flag), filtering out part of the output in that scenario does feel like it may be unexpected for users, especially if they're passing a dynamic number of platform flags to |
Yeah, I would be in favor of consistency. having different output formats based on different combinations of otherwise-unrelated options seems like unnecessary complexity. As mentioned by @blender, a formatted could always be added in the future to do this more explicitly. As far as including version number, no strong feelings from my side. |
I prefer consistency at this point. I would also include the version number for the reasons I stated above. We can provide scripts to parse the output for the special case we're talking about. For me this is ready for implementation. I will add the tag. Nice discussion everyone! |
Update about The CLI parsing library does not allow options with multiple arguments so it's either
or
|
In the past it seems that the decision has always been to closest match the style of Carthage. In this case, to match documented behavior, it seems like it should be comma-separated, e.g. From
|
So it is then :) |
And thanks to @r-peck 's incredible work, we have a pre-release https://github.com/blender/Rome/releases/tag/v0.9.0.18 ! Please test if you can and report any bugs. I will promote it to a proper release if no issues are found in a week or so. |
Thanks guys, this is awesome! Can this new directory structure coexist in the same bucket that previous versions of |
@erichoracek you can try this out without breaking compatibility with previous versions. The bucket/local cache structure was: This means that versions of rome >= 0.9.0.18 won't find frameworks uploaded by older versions of rome and the other way around. However old version and new version won't interfere with each other. I will add this to the release notes. |
@blender @erichoracek I think part of the cache layout was overlooked in my implementation. This doesn't affect whether or not cache layout is interfering with previous versions - that is still fine, but the current build is using
I'm putting together a fix to use git repo name at the top level since it is reasonable to expect different repos may have targets with the same framework names. This shouldn't affect single project caches since the conflict would pose a problem for the consuming project, but if you have different projects with different dependencies using the same bucket, you could see conflicts. |
New pre-release with fix: https://github.com/blender/Rome/releases/tag/v0.9.0.19 |
Hello, I just want to reiterate that the cache paths have changed from:
to
Example: Suppose you have the following Cartfile.resolved:
and Romefile:
The cache path for rome <= 0.8.x.x was
it is now
same for the dSYMs |
I have not heard any complains about this version thus I will close the issue. Thank you all for the discussion and thanks @r-peck for you great contribution. |
Enhancement Suggestion
Add support for more platforms (watchOS, tvOS, macOS)
Current and suggested behavior
Currently only iOS is supported, this should be expanded to other platform too.
Why would the enhancement be useful to most users
This enhancement should be useful for frameworks that target more than 1 platform.
Rome version: v0.7.1.13
OS and version: Mac OS 10.11.6 - El Capitan
The text was updated successfully, but these errors were encountered: