Giter Club home page Giter Club logo

cake's Issues

Replacing static frameworks with swift packages

Is there any way to use swift package instead of static libraries to organise the code with Cake with Xcode 11?

The use case is that I want to use swift packages to organise my code into several separate swift module/packages and it is very easy and convenient with new Xcode.
The problem is that my code has some third party dependencies (pods) and it is not easy to use all this dependencies as swift packages, some of them are old or obj-c or closed source pods.

So if there was a way to make a set of pods available to all swift packages in the project, it was really useful, because I think it takes a long time for all pod developers community to make all pods available as swift packages.

Failing to integrate or create new Cake

Thanks for putting this together!

We're running into issues with both creating a new Cake project and integrating an existing project with Cake. We get this message when integrating or opening a Xcode (Beta 4):

Screen Shot 2019-03-15 at 4 21 06 PM

Possibly related. When trying to build, we get this error:
The operation couldn’t be completed. (E.notCake(Path.Path(string: "{ path to the project }")))

Maybe we're doing something wrong? Tried on multiple machines and tinkered with some different build settings. No luck:/

Consider "Sources•Modules" rather than "Sources•Model"

First, 👏thank you👏 for taking a shot at fixing the problem you're trying to solve! I'm frustrated by the tooling standing in the way of modularizing Swift codebases all day long every day. So, I really hope this tool takes off. 🎉


I may not be understanding everything (or much at all) so I'll break this up into my assumptions, my use case, and then my suggestion(s)...all based on those assumptions 😄

Assumptions

  • Everything in "Sources•Model" is compiled against all platforms in the Cakefile
  • Modules are not created for folders in "Sources•App"
  • There is currently no way to limit the platforms a specific module in "Sources•Model" is compiled against
  • The intention is for all platform-specific code to go in "Sources•App"
  • The developer is expected to create each application target (excluding the one the Cake menu app will create for you).

Use case

  • Large project, targeting iOS, macOS, tvOS, and watchOS
  • Non-trivial UI for each platform. Lots of view controllers, lots of "components" (similar to React, small reusable UI bits).

For my situation, micro modules would offer just as much benefit to my application-specific code as my domain/model code. In fact, my UI code would probably benefit even more. That is where I find myself using nested types for the sole purpose of faking namespaces more frequently than anywhere else. Nested types are fine, but I've found that Xcode/SourceKit/Something-else-in-the-tool-chain falls over after a certain depth and all I see is <<error type>> in Xcode's autocomplete dialogs.

Suggestions

  1. Add support for limiting which platforms a specific module is built for. Maybe that takes the form of a Cakefile in a module's directory, or platform-specific "Sources•Modules•[platform]" directories...which could be auto generated using the platforms setting in the root Cakefile. The goal being platform-specific-modules in a multi-platform project.
  2. Rename "Sources•Model" to "Sources•Modules"

To be clear, this is only necessary for a multi-platform project. What I'm wanting to do is already totally doable for a single-platform project.

How to share Modules between multiple projects

Sorry this must be a really basic question, but once i've built Modules (custom frameworks etc.), i would like to share them with my other projects.

What is the best practice to do this with Cake ?

Not making modules of all folders.

I think that it is good to add the ability to not make all folders to modules in Batter, so that we can use folders inside a module to just organize code (not making modules).

Maybe we can have a way to flag a folder to say that I want this folder and all its subfolders just as a module?

Speed up build times

First of all, thanks for your work, the lib is very interesting.

Could we cache modules to speed up build times (like Buck does) ?

Dependency names don’t always equal the repository name

Sadly.

So we need to determine the name with swift package dump-package before generating the Package.swift.

Which is problematic currently since we can’t resolve the graph before generating the Package.swift obviously.

Notably we only need this so we can use swift package generate-xcodeproj since it only builds the deps if we have a target that depends on them.

If we generated our own xcodeproj we wouldn't have difficulty of this specific kind at least.

Fill out FSWatcher

eg.

  • watch root for delete/rename
  • handle Cakefile.swift delete
  • handle empty modules, deleted modules

Dependencies.xcodeproj depends on Cakefile target

Without fixing this a variety of issues can occur.

Options seem to be:

  1. Regenerate Cake.xcodeproj from within (can detect this and rebuild controlled from Cake.app with AppleScript)
  2. Try to depend on Cakefile’s target in Dependencies.xcodeproj. This is an Xcode project reference cycle however and may have consequences.

Integration issues

  • If some cake stuff there, use, don't overwrite. But overwrite the Cake.xcodeproj
  • If already Sources/Model error

Clean/Rebuilds often required for changes in modules to be included

Seems like an Xcode 10.2 bug since I only noticed it then (saw others on Twitter say same).

  • Changes to model and deps only get put in final binary if clean build occurs
  • Pretty sure this wasn't always case so either Xcode 10.2 bug or our dependency logic is bust somehow.
  • Maybe worth trying making recursive deps explicitly specified.

Don’t assume git

We indiscriminately edit or create a gitignore for create/integrate. Expect other version control.

Check for .git first.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.