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

Integration: app targets have been separated from framework. #961

Merged
merged 29 commits into from Oct 18, 2018

Conversation

lolgear
Copy link
Contributor

@lolgear lolgear commented Oct 16, 2018

New Pull Request Checklist

  • I have read and understood the CONTRIBUTING guide

  • I have read the Documentation

  • I have searched for a similar pull request in the project and found none

  • I have updated this branch with the latest master to avoid conflicts (via merge from master or rebase)

  • I have added the required tests to prove the fix/feature I am adding

  • I have updated the documentation (if necessary)

  • I have run the tests and they pass

  • I have run the lint and it passes (pod lib lint)

This merge request fixes / refers to the following issues: ...

Pull Request Description

App targets have been separated from framework.

  • Check watchOS and iOS Swift integration app targets.
  • Remove old integration targets.
  • Update travis configuration file.

UPD:
Unknown behavior in watchOS target.

ld: URGENT: building for watchOS Simulator simulator, but linking against dylib (~/Library/Developer/Xcode/DerivedData/Integration-cpyxjtzsyeaofnaanurdqqcwsezf/Build/Products/Release-iphonesimulator/CocoaLumberjackSwift.framework/CocoaLumberjackSwift) built for iOS Simulator. Note: This will be an error in the future.

@codecov-io
Copy link

codecov-io commented Oct 16, 2018

Codecov Report

Merging #961 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #961   +/-   ##
=======================================
  Coverage   23.87%   23.87%           
=======================================
  Files          18       18           
  Lines        2685     2685           
=======================================
  Hits          641      641           
  Misses       2044     2044

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e97da34...2177779. Read the comment docs.

@lolgear lolgear changed the title integration: app targets have been separated from framework. Integration: app targets have been separated from framework. Oct 16, 2018
@lolgear
Copy link
Contributor Author

lolgear commented Oct 16, 2018

@CocoaLumberjack/collaborators does anybody know how to setup watchOS extension with CocoaLumberjackSwift framework? ( by manual installation ).

@bpoplauschi
Copy link
Member

@lolgear in #959 I created a Podfile for all the integration apps to link to the library. Why do you want to change that? There you can see the proper linking of the watch os extension.

@lolgear
Copy link
Contributor Author

lolgear commented Oct 16, 2018

@bpoplauschi three points:

  1. Zero dependencies.
  2. Manual installation.
  3. CI speed up.

Zero dependencies

CocoaLumberjack doesn't have any external pod spec dependency. It should not have this dependencies in case of dependencies diversity.

Manual installation.

There is no reason to install CocoaLumberjack to Integration and Tests targets by external Dependency manager. Tests and Integration are testing result framework, not external dependency.

For CocoaPods it could contain also dependency installation folder:

  1. CocoaPods.
  2. Carthage.
  3. SwiftPM.
  4. By hands.
  5. Submodules.
  6. Automagically.
    ...
  7. etc.

CI speed up.

In case of manual installation

   # can be removed with whole "cocoapods dependencies repository"
    - pod --version
    - pod setup --silent > /dev/null
    - pod repo update --silent

@lolgear
Copy link
Contributor Author

lolgear commented Oct 16, 2018

@bpoplauschi could you check my comment?

@lolgear
Copy link
Contributor Author

lolgear commented Oct 16, 2018

#881

@bpoplauschi
Copy link
Member

@lolgear answers inline

@bpoplauschi three points:

  1. Zero dependencies.
  2. Manual installation.
  3. CI speed up.

Zero dependencies

CocoaLumberjack doesn't have any external pod spec dependency. It should not have this dependencies in case of dependencies diversity.

Manual installation.

There is no reason to install CocoaLumberjack to Integration and Tests targets by external Dependency manager. Tests and Integration are testing result framework, not external dependency.

One reason was to have a strong test of the CocoaPods installation.
But the main reason was: when I merged together the frameworks #959, you could not link to CocoaLumberjack.framework since there were 4 platform frameworks with the same name and the linker would get confused. That is why I did the CocoaPods installer.
If you can make it work without CocoaPods, be my guest :)

For CocoaPods it could contain also dependency installation folder:

  1. CocoaPods.
  2. Carthage.
  3. SwiftPM.
  4. By hands.
  5. Submodules.
  6. Automagically.
    ...
  7. etc.

CI speed up.

In case of manual installation

   # can be removed with whole "cocoapods dependencies repository"
    - pod --version
    - pod setup --silent > /dev/null
    - pod repo update --silent

We can't remove those, as there are other projects using even other pods (for example Tests or Demos).

@lolgear
Copy link
Contributor Author

lolgear commented Oct 16, 2018

@bpoplauschi

Tests should be rewritten on top of manual approach due to internal parts access.
Demos are third-party citizens. It doesn't matter how they are interact with main framework. Moreover, they should interact with main framework in different approaches ( manual, cocoapods, carthage, swift pm, etc)

Ah, I see, million podfiles in Demos directory. Nice approach. It should be rewritten in different way - just put one project with CocoaLumberjack Demos.xcworkspace.

@OSSPolice
Copy link

OSSPolice commented Oct 17, 2018

2 Warnings
⚠️ Big PR
⚠️ The Carthage project was modified but CocoaPods podspec wasn’t. Did you forget to update the podspec?

Generated by 🚫 Danger

@CocoaLumberjack CocoaLumberjack deleted a comment Oct 17, 2018
@CocoaLumberjack CocoaLumberjack deleted a comment Oct 17, 2018
@CocoaLumberjack CocoaLumberjack deleted a comment Oct 17, 2018
@CocoaLumberjack CocoaLumberjack deleted a comment Oct 17, 2018
@CocoaLumberjack CocoaLumberjack deleted a comment Oct 17, 2018
@CocoaLumberjack CocoaLumberjack deleted a comment Oct 17, 2018
@CocoaLumberjack CocoaLumberjack deleted a comment Oct 17, 2018
@CocoaLumberjack CocoaLumberjack deleted a comment Oct 17, 2018
@CocoaLumberjack CocoaLumberjack deleted a comment Oct 17, 2018
@CocoaLumberjack CocoaLumberjack deleted a comment Oct 17, 2018
@ffried
Copy link
Member

ffried commented Oct 18, 2018

Yep, starting to look good from my side as well @lolgear. Thanks for your patience!

So I think the tasks left are:

  • Remove local_travis.yml and local_travis_run.sh (and maybe put them into a separate PR).
  • Remove the empty xcassets and storyboards (like @bpoplauschi proposed)
  • Adjust the xcconfig inheritance according to @bpoplauschi's list above
  • Remove some more leftover files (see comment by @sushichop)
  • Re-enable watchOS build in travis (as mentioned here)

Did I miss anything?

@bpoplauschi
Copy link
Member

@ffried I think local_travis* files were removed.

@ffried
Copy link
Member

ffried commented Oct 18, 2018

@bpoplauschi Ah, you're right. Was looking at an old changes list, by bad!

@sushichop
Copy link
Member

Just FYI.
I rebooted travis CI test because it had failed with unknown reason(I have experienced it sometimes).
Now it turns green.

@lolgear
Copy link
Contributor Author

lolgear commented Oct 18, 2018

@CocoaLumberjack/collaborators
Is it fixed?

@ffried
Copy link
Member

ffried commented Oct 18, 2018

Almost...
There are still assets. Also, some Info.plists still reference some storyboards (which might no longer exist?).
Also, I think @bpoplauschi wanted to move all the xcconfigs into one directory. Is that already the case?

@lolgear
Copy link
Contributor Author

lolgear commented Oct 18, 2018

@ffried
I am a bit worried about watchOS targets.
I do not know which resources could be removed in them.
For example, I suppose, that watchOS app should contain at least one storyboard. ( am I right? )

Well, configs in one directory - hmm... for what purpose?

@ffried
Copy link
Member

ffried commented Oct 18, 2018

For example, I suppose, that watchOS app should contain at least one storyboard. ( am I right? )

For the watchOS targets I agree. And I just checked. You're right, those are the only ones left. Task marked as done (with the new commit cleaning the Info.plists).

@lolgear
Copy link
Contributor Author

lolgear commented Oct 18, 2018

@ffried
Could you mark checklist as "unfoldable" or "favorite" and hide all other messages?

@ffried
Copy link
Member

ffried commented Oct 18, 2018

Well, configs in one directory - hmm... for what purpose?

Mainly to keep them discoverable, I think.

It's what @bpoplauschi requested here:

I would keep them in the same ./Configs folder as the Module* ones

@ffried
Copy link
Member

ffried commented Oct 18, 2018

I've just read through the review comments and open checklists.
I'm not sure about the following comments by @bpoplauschi (about the Formatters being moved to a separate target, if I understood it correctly):
#961 (comment)
#961 (comment)
#961 (comment)

Let's wait for @bpoplauschi to have a last word about the comments I've just mentioned. Then LGTM!

Thanks again for all the patience! It's certainly a great improvement you're contributing here!

@bpoplauschi
Copy link
Member

I still have minor comments, but instead of just keeping this open, I will merge it and make an additional PR.
Good job @lolgear.
Following our new pattern, we would like to invite you to become a maintainer – no pressure to accept! You can pitch in with what seems comfortable: comment on open issues/PRs, triage, improve documentation, write your own PRs. See a broader discussion here #941. Let me know if you are interested.

@bpoplauschi bpoplauschi merged commit 4bf2941 into CocoaLumberjack:master Oct 18, 2018
@bpoplauschi bpoplauschi added this to the 3.5.0 milestone Oct 18, 2018
bpoplauschi added a commit that referenced this pull request Oct 18, 2018
- removed from workspace the Pods.xcodeproj that used to live in /Framework
- added Integration.xcodeproj to the workspace
- fixed macOS build running issue
- removed some xcconfig files from copy build phase
- continued the Xcode settings cleanup - moved most of them to xcconfig
- set Integration Apps WATCHOS_DEPLOYMENT_TARGET to 5.0 because of some APIs used
- fixed some app ids that were incorrect
- made sure we always use `DDOSLogger` instead of `DDTTYLogger`
- the iOS and tvOS targets AppDelegate.swift was not creating the ViewController instance
- set explicit dependencies between the Integration targets and their corresponding CocoaLumberjack dependencies
- cleanup old remaining AppIcon
@bpoplauschi
Copy link
Member

@ffried @sushichop thanks for the contribution

@bpoplauschi bpoplauschi mentioned this pull request Oct 18, 2018
1 task
@lolgear
Copy link
Contributor Author

lolgear commented Oct 18, 2018

@bpoplauschi
Yes, I am interested in becoming contributor. ( That is what I did today 😄 )

@bpoplauschi
Copy link
Member

Glad to hear that. I have sent you an invitation to our organization

@lolgear
Copy link
Contributor Author

lolgear commented Oct 18, 2018

@bpoplauschi
So, next step - clean up tests targets, I think.

bpoplauschi added a commit that referenced this pull request Oct 23, 2018
- added Integration.xcodeproj to the workspace
- fixed macOSSwiftIntegration build running issue (the AppDelegate.swift was never called - replaced with main.swift)
- removed xcconfig files from copy build phase
- continued the Xcode settings cleanup - moved most of them to xcconfig
- set Integration Apps WATCHOS_DEPLOYMENT_TARGET to 5.0 because of some APIs used
- fixed some app ids that were incorrect (org.example.* -> com.deusty.*)
- the iOS and tvOS targets AppDelegate.swift was not creating the ViewController instance. Fixed
- set explicit dependencies between the Integration targets and their corresponding CocoaLumberjack dependencies
- cleanup old remaining AppIcon
- watchOSSwiftIntegration now builds and runs (uses Debug config)
- PREPROCESSOR_MACROS is actually not used by Xcode, so the DD_LOG_LEVEL=DDLogLevel* setting was not working. Changed to GCC_PREPROCESSOR_DEFINITIONS and now it works. Set DDLogLevelWarning for release and DDLogLevelAll for debug builds - only applies to Integration targets
- related PRs: #961 #970
bpoplauschi added a commit that referenced this pull request Oct 23, 2018
- added Integration.xcodeproj to the workspace
- fixed macOSSwiftIntegration build running issue (the AppDelegate.swift was never called - replaced with main.swift)
- removed xcconfig files from copy build phase
- continued the Xcode settings cleanup - moved most of them to xcconfig
- set Integration Apps WATCHOS_DEPLOYMENT_TARGET to 5.0 because of some APIs used
- fixed some app ids that were incorrect (org.example.* -> com.deusty.*)
- the iOS and tvOS targets AppDelegate.swift was not creating the ViewController instance. Fixed
- set explicit dependencies between the Integration targets and their corresponding CocoaLumberjack dependencies
- cleanup old remaining AppIcon
- watchOSSwiftIntegration now builds and runs (uses Debug config)
- PREPROCESSOR_MACROS is actually not used by Xcode, so the DD_LOG_LEVEL=DDLogLevel* setting was not working. Changed to GCC_PREPROCESSOR_DEFINITIONS and now it works. Set DDLogLevelWarning for release and DDLogLevelAll for debug builds - only applies to Integration targets
- related PRs: #961 #970
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

Successfully merging this pull request may close these issues.

None yet

6 participants