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

Update/fix Package.swift #1411

Closed
wants to merge 1 commit into from

Conversation

versus-chris
Copy link

Removing the exclude-"clause" from the CocoaLumberjack target, because the "Supporting Files"-folder contains the CocoaLumberjack.h and without this header file, using CL with SPM does not seem to work properly.

New Pull Request Checklist


  • 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

Fixing the SPM setup.
Feel free to reject this PR if I am missing something (or I am using CL via SPM wrong).
I am using CL for years (with an older version) and now I am updating to the latest version and switching to SPM.
Without this/my change, I was not able to get it running.

PS: thanks for the great work with this project - been using it for years and it is rock-solid!

Greetings from Germany

Removing the exclude-"clause" from the CocoaLumberjack target, because the "Supporting Files"-folder contains the CocoaLumberjack.h and without this header file, using CL with SPM does not seem to work properly.
@ffried
Copy link
Member

ffried commented Feb 19, 2024

Removing the exclude-"clause" from the CocoaLumberjack target, because the "Supporting Files"-folder contains the CocoaLumberjack.h and without this header file, using CL with SPM does not seem to work properly.

This is usually due to some Xcode weirdness. SPM generates its own umbrella header based on the header files inside the include folder of a target.
Can you elaborate a bit on what issues you're having? We're using CocoaLumberjack with SPM in various projects without any issues.

@versus-chris
Copy link
Author

Hi Florian, thank you for your feedback. I really appreciate it.
I apologise for reporting/attempting to fix Xcode weirdness ;)
The weirdness presented itself by always showing compile-errors (within the Lumberjack "Package dependency" in the bottom left Xcode "dependency-tree"). Xcode reported missing Headers (e.g. missing DDLoggerNames.h in DDLoggerNames.m).
Since all the header files are imported in the CocoaLumberjack.h in the Supporting Files folder, I assumed excluding in it the Package.swift was wrong (thus the PR - which fixed it for me). I was not aware that there is a generated umbrella-header.
I am closing the PR.
Best regards and greetings from Karlsruhe

@versus-chris versus-chris deleted the patch-1 branch February 20, 2024 12:05
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

2 participants