Add support for brew
josefdolezal opened this issue · 15 comments
Hey dzenbot! I am currently working on second project where I want to use Iconic, but we have a small issue. As Pods (in our experience) increase build time, we decided to move to Carthage instead. Here comes the problem, Iconic is only available through Pods and it does not seems right to use Pods together with Carthage. We also use SwiftGen on this project and it has this nice command line interface so it can be used in build phase run script.
Is there any plan to implement CLI and then distribute Iconic with brew? Would be killer feature for us :-)
At Slack, we are slowly replacing Cocoapods with Cartage too, and I have considered implementing CLI multiple times. I agree, it would be great but I wouldn't know where to start.
If you have any experience, I would love to see a design proposal and/or help with kicking this out with a PR.
Actually, I have no experience with CLI apps, but it should not be that difficult since Iconic is macOS app already. Lets keep this issue opened, I will take a look at it during this weekend and let you know.
Maybe someone more experienced will help us.
I quickly checked SwiftGen implementation of CLI and they use library called Commaner which looks pretty cool.
I also find out that Iconic is a simple bash script running SwiftGen in background. I am not really sure if brew will work with it. If not, we can leave out SwiftGen and build own CLI for GenumKit instead. All needed is icons command and GenumKit - Iconic will then depend on clean SwiftGen and can keep track with master I guess?
What do you think of it? It would be a huge change to the core but awesome feature in the trade-off.
Honestly, I have been worrying about the continuity of this project, because of the dependency with an old and modified version of SwiftGen. There is a bit more required than the icons command you pointed out. Here are all the changes that were made, back in the days.
I just realized today that SwiftGen has changed so much since I last checked it out! It is now much more modular, in separate repositories. It will be harder to contribute to the original repositories to be able to use the official library, and most of the changes that were made on my fork were made towards the goal of Iconic's, which I don't think the contributors would find very mergeable.
The key component is definitely the icons command, but the problem with using GenumKit is that it's still tied to SwiftGen's. It is not a standalone thing and it does not necessarily accept custom commands, does it?
There is also SwiftGenKit. I will need to spend some time to figure this out, but your help is much more appreciated!
Fíha, that is quite a list of changes..
Iconic should definitely stay out of SwiftGen core, no needs to merge your changes. As GenumGit is also Pod, we may use its source as dependency and replace the role of SwiftGen CLI. I also tried to import SwiftGenKit (thanks for the link) to sample project and it seems like good approach.
I will make proof of concept repository aside of Iconic and try it out. I have finals at university during next week, so I don't expect big progress on it. Anyway I am not giving up, empty assers calatogue is a huge motivation.
Hi, small update on brew support! I have completely removed SwiftGen dependency (and the SwiftGenKit too) because Iconic used just the its CLI. Now, I am in the middle of moving stencil filters to swift 3. Once it's done, Iconic will be binary with same interface as now but may be distributed with brew. I will send you link to my repository as soon as I will make it work, we can then discuss architecture and interface (with respect to cocoa pods).
Looking forward @josefdolezal! 🎉
OK, it took me a little bit more time than I thought but the repository is here. It's still not working (yay), but it compiles and links all dependencies. See the README.md and take a look at source. Now it looks like there is some problem with processing Stencil template, didn't had much time to debug it, but it seems like swiftIdentifier
filter throws because of bad input.
Hey @josefdolezal, I'm sorry but I haven't had the time to look into your work closely yet. Will do in the next couple of weeks.
Hi @dzenbot! I was also pretty busy last weeks, I am working hard on my bachelor thesis..
There is still a lot of work to be done on the CLI, I will keep you up to date with my progress.
Hey @dzenbot, long time no see! I finally finished my thesis earlier this week so it's time to make some sweet commits to Iconic, right?
I removed whole repository which I made earlier and did ground-up rewrite. I summarised all changes in the repository README here.
Not all functions are supported but it's pretty easy to implement it again. Now the biggest question is how to correctly package stencil template with Iconic binary for brew, but it should be a little bit easier as the repo is pretty light weight.
It would be awesome if you check the repo and review my changes.
That's great @josefdolezal! I've had little time to contribute to this, but luckily it's a long weekend here in Canada. I'll try to have a look at your repo and test it out.
Did this ever go anywhere further? I'm currently attempting to install Xcode 8 on Mojave just to get some changes compiled but expecting this to not work. I've just submitted a PR to bring Iconic up to Swift 4.2, it's absolutely the best pure Swift custom icon font library i've found in the year+ i've been searching. Happy to help contribute more however I can, just point me in the right direction!
Yep, that was a dead end.
So, we can either try to upgrade to the latest SwiftGen or get @josefdolezal's project working better (I really need WatchOS support).
Thoughts, if any @dzenbot?
@robbiet480 I will be reviewing your PR this week hopefully. Let's take it from there.
Once merged, if still interested, I can add you as a contributor to carry on with Iconic. I personally don't use it in any real life project anymore; but I might adopt it soon-ish on a new project I'm working on.