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

Prefix by Swift Version by Default #127

Closed
fabb opened this issue Jun 10, 2018 · 5 comments
Closed

Prefix by Swift Version by Default #127

fabb opened this issue Jun 10, 2018 · 5 comments

Comments

@fabb
Copy link
Contributor

fabb commented Jun 10, 2018

Enhancement Suggestion

Currently it‘s the responsibility of the client to add a prefix with the correct Swift version. Would it be thinkable to make Rome do that by default without having to provide the prefix manually? This other caching tool does it as well: https://github.com/Wolox/carthage_cache

@tmspzz
Copy link
Owner

tmspzz commented Jun 10, 2018

Off the top of my head I would say I'm not very keen on embedding any swift specific logic since the cache prefix is global for all frameworks even if objective c.

Also if this would be implemented then I would expect Rome to check that all frameworks are built with the same version or are objc frameworks.

I'm not so keen on imposing all these restrictions just to avoid some discipline on the consumer side.

@fabb
Copy link
Contributor Author

fabb commented Jun 10, 2018

Ok I see. Then maybe we‘ll just write guidelines for everyone on our distributed teams to follow the same prefix conventions. We have around 100 ios devs working on different products, but with partially overlapping dependencies, would be nice if we could share a common Rome cache server.

@tmspzz
Copy link
Owner

tmspzz commented Jun 11, 2018

Since you're using Rome to download you can just use the current swift version as a cache prefix like this:

--cache-prefix=`swift --version | head -1 | sed 's/.*\((.*)\).*/\1/' | tr -d "()" | tr " " "-"`

@tmspzz tmspzz closed this as completed Jun 13, 2018
@fabb
Copy link
Contributor Author

fabb commented Nov 24, 2018

Btw. Swift 5 will NOT make this unnecessary. While Swift 5 provides ABI stability, it does NOT provide module stability which would also be be needed for supporting precompiled Swift frameworks of other Swift versions.
https://forums.swift.org/t/plan-for-module-stability/14551

@tmspzz
Copy link
Owner

tmspzz commented Nov 26, 2018

@fabb I have read the issue but I don't see how this matters?

If any, that thread is another reason not to derive the cache name automatically since multiple compiler versions can share the same binary.

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

2 participants