-
Notifications
You must be signed in to change notification settings - Fork 404
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
New configurator and project layout, Carthage, SPM #210
base: master
Are you sure you want to change the base?
Conversation
A couple extra notes here.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like where this is heading, blockers for me are:
- Lack of direction on CocoaPods support
- Folder structure after you run it still has template in it
- Bit of tone stuff, but that's totally reasonable
@@ -1,40 +0,0 @@ | |||
# CocoaPods Code of Conduct |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you bring this file back please 👍
|
||
Copyright (c) 2013 - 2014 CocoaPods Dev Team | ||
Copyright (c) 2016 William Entriken |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this one back, I'm happy to have this CP Dev Team, and William Entriken
instead though
|
||
### Using CocoaPods to manage dependencies for your example app | ||
|
||
You distribute an example app with your new Swift module to show that it works. You may also decide to add UI tests to your example app and some people like to use testing frameworks for those UI tests. If you would like to use CocoaPods to manage the dependencies of your example app, please see the discussion at https://github.com/fulldecent/swift3-module-template/issues/8. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This worries me that CP support is not something you can do out of the box. It feels like something I would expect using pod lib create
that I can just define the dependencies and carry on. Perhaps it can be a question?
@@ -0,0 +1,34 @@ | |||
language: objective-c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wary that this is considerably more complex than the previous travis file, understanding it requires a lot more knowledge about the shell and Travis CI. The majority of CocoaPods users probably don't know this stuff, can it be simplified?
pod lib lint; | ||
fi | ||
|
||
- CheckCocoaPodsQualityIndexes.rb __PROJECT_NAME__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this just adds noise, it should probably go, most people are fine to check the website
// __PROJECT_NAME__Label.h | ||
// __PROJECT_NAME__ | ||
// | ||
// Created by Dmytro Zozulia on 23.06.17. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This name sneaked in, and the real date ^
'__TODAYS_DATE__' => Date.today.strftime(Env.date_format_string), | ||
'__TODAYS_YEAR__' => "#{Date.today.year}", | ||
'__GITHUB_USERNAME__' => 'awesome_octocat' | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tone-wise this defaults will have to change too ;)
replace_variables_in_files(substitutions) | ||
replace_variables_in_file_names(substitutions) | ||
|
||
puts "DONE, your project is now ready to use in the OUTPUT/ folder" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any chance we can drop the OUTPUT
folder to be their project name? I'd expect this to create the folder for the project, but not inside another folder - having an OUTPUT folder means you'll always have to move it somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just run this, it creates a really weird folder structure:
$ tree MyNewPodsName
MyNewPodsName/
├── LICENSE
├── OUTPUT
│ └── MyNewPodsName
│ ├── CHANGELOG.md
│ ├── CONTRIBUTING.md
│ ├── LICENSE
│ ├── MyNewPodsName.podspec
│ ├── MyNewPodsName.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── xcschemes
│ │ └── MyNewPodsName.xcscheme
│ ├── MyNewPodsName.xcworkspace
│ │ └── contents.xcworkspacedata
│ ├── Package.swift
│ ├── README.md
│ ├── Resources
│ │ └── wk.png
│ ├── Source
│ │ ├── Info.plist
│ │ ├── MyNewPodsName.h
│ │ ├── MyNewPodsName.swift
│ │ ├── MyNewPodsNameLabel.h
│ │ └── MyNewPodsNameLabel.m
│ ├── Tests
│ │ ├── CheckCocoaPodsQualityIndexes.rb
│ │ ├── Info.plist
│ │ └── MyNewPodsNameTests.swift
│ └── iOS\ Example
│ ├── Source
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ └── iOS\ Example.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcshareddata
│ └── xcschemes
│ └── iOS\ Example.xcscheme
├── Package.swift
├── README.md
├── Recipe.md
├── __PROJECT_NAME__
│ ├── CHANGELOG.md
│ ├── CONTRIBUTING.md
│ ├── LICENSE
│ ├── Package.swift
│ ├── README.md
│ ├── Resources
│ │ └── wk.png
│ ├── Source
│ │ ├── Info.plist
│ │ ├── __PROJECT_NAME__.h
│ │ ├── __PROJECT_NAME__.swift
│ │ ├── __PROJECT_NAME__Label.h
│ │ └── __PROJECT_NAME__Label.m
│ ├── Tests
│ │ ├── CheckCocoaPodsQualityIndexes.rb
│ │ ├── Info.plist
│ │ └── __PROJECT_NAME__Tests.swift
│ ├── __PROJECT_NAME__.podspec
│ ├── __PROJECT_NAME__.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── xcschemes
│ │ └── __PROJECT_NAME__.xcscheme
│ ├── __PROJECT_NAME__.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── iOS\ Example
│ ├── Source
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
│ └── iOS\ Example.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcshareddata
│ └── xcschemes
│ └── iOS\ Example.xcscheme
└── configure
37 directories, 61 files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Template should clean up after itself ideally, the rest of those files are an implementation detail.
'__AUTHOR NAME__' => 'Mr McAwesome', | ||
'__TODAYS_DATE__' => Date.today.strftime(Env.date_format_string), | ||
'__TODAYS_YEAR__' => "#{Date.today.year}", | ||
'__GITHUB_USERNAME__' => 'awesome_octocat' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do people really care about adding the org name and bundle ID? Also, it should just skip the date + year.
This CLI output feels really mechanical:
In contrast to
I think we can improve the onboarding a bit here. Though, that said, I'm probably going to delete the guide unless you want to update this: https://guides.cocoapods.org/making/using-pod-lib-create.html
|
||
3. Select Product -> Run | ||
|
||
You should see a big white king. That means it worked! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think:
Is a good enough trade-off TBH for not being comprehensive about how people end up using the template, this CP template gets about a hundred uses a day during the week and to expect each user to go research all the forks to find one that matches their particular spec seems off without building proper infrastructure for that. |
Right now swift4-module-template is doing well. But it would be great to harmonize with this project. Could you please advice what type of PR might be acceptable here? |
Just updating to say that Swift 4 module template is still actively used. |
Updating for new URL. This now supports Swift 5. |
The main remaining unmerged feature here is the recipe. Is there an interest in rebasing, squashing this PR? |
Introduction
This PR entirely replaces
pod-template
with the current contents of https://github.com/fulldecent/swift3-module-template.Please help test with:
pod lib create --verbose --template-url='https://github.com/fulldecent/swift5-module-template.git' MyNewPodsName
A note on wording here
Fundamental changes
The build system is fundamentally new. Here is how you will update pod-template with this PR:
RECIPE.md
to explain exactly how a person can start /from scratch/ using Xcode to create a template module.__PROJECT_NAME__
folder.Here is how vendoring works with this PR:
./configure
(you can call it frompod lib create
, see above)That's it. It's dead simple.
New features
In addition to this simpler vendoring system, the actual templated module has lots of great new stuff.
BUILD SYSTEM
RECIPE.md
and it is self-documenting. Therefore, anybody can follow the recipe and derive the contents of__PROJECT_NAME__
.FUN TO USE
pod lib create ...
you get a runnable project that is actually slightly useful.BEST PRACTICES
The vendored module will now follow best practices curated from several Cocoa development leaders.