mxcl / cake Goto Github PK
View Code? Open in Web Editor NEWA delicious, quality‑of‑life supplement for your app‑development toolbox.
License: Apache License 2.0
A delicious, quality‑of‑life supplement for your app‑development toolbox.
License: Apache License 2.0
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.
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):
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:/
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 😄
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.
platforms
setting in the root Cakefile. The goal being platform-specific-modules in a multi-platform project.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.
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 ?
eg. watcher in app does it and triggered from Xcode too.
Allow overrides, but well, default should be extracted. Override is when you have too many targets and thus deployment targets are ambiguous.
Need to unique on directory clearly. eg:
foo/.cake
foo/bar.xcodeproj
foo/baz.xcodeproj
And both are open, at start up will both write to same cake!
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?
First of all, thanks for your work, the lib is very interesting.
Could we cache modules to speed up build times (like Buck does) ?
eg. .github("foo/bar")
checkout latest version, but output what version spec user could choose. And show #warning
.
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.
eg.
Is there a way to use cake and Cocoapods at the same time? This way we can use Cocoapods for dependencies like 3rd party libraries and use Cake to modularize our code.
Eg JohnSundell/Xgen depends on ShellOut but only for the tests
Ideally we'd not even resolve these deps, but I don't think SwiftPM can do that.
Still shouldn't generate targets for them, for sure.
Without fixing this a variety of issues can occur.
Options seem to be:
Because Xcode sucks when sources change and it has build products in the build dirs still. Causes many build problems, eg. mxcl/PromiseKit#964
And other types presumably.
Still show entry in menu, bit have a disabled menu item that explains what is going on.
Like a Cakefile.resolved, maybe double up the Dependencies.json
eg:
foo
|--foo
eg:
root/foo/foo.xcodeproj
root/bar/Sources.swift
So we should probably integrate cake to foo
but models to bar
Seems like an Xcode 10.2 bug since I only noticed it then (saw others on Twitter say same).
Can use a custom build rule or an external build system target to make it work.
This way we don't just get completion, we get real error messages. Eg. syntax errors give no errors currently.
Reduces git diffs
May be tricky or even impossible considering how Xcode works.
We indiscriminately edit or create a gitignore
for create/integrate. Expect other version control.
Check for .git
first.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.