-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Unable to read the license file LICENSE.txt
for the spec [framework_name]
#9472
Comments
The two |
Can you try adding s.source = { :http => "#{s.homepage}/archive/#{s.version}.zip", :flatten => true } Or try adding the name of the zip to the front of the path: s.license = { :type => 'Apache 2.0', :file => "mockolo-#{s.version}/LICENSE.txt" } zips from Github usually contain a folder of the same name as the zip itself. Edit: I think this would also solve #9479 |
Thanks for your answer. I can't use :flatten as it throws an error about an imported module that's not a pod (SwiftSyntax). Here's the error I get fyi:
Specifying it manually and 'pod lib lint' didn't pass as you mentioned. This still leaves the issue unresolved (also source_files = 'mockolo-#{s.version}/Sources/MockoloFramework/**/*.swift'). Here's the error:
|
If there's a failed import, I don't think it's related to the use of I'd recommend inspecting the generated workspace using I tried this myself using a fresh checkout including the $ pod spec lint MockoloFramework.podspec --no-clean
-> MockoloFramework (1.1.2)
- NOTE | xcodebuild: note: Using new build system
- NOTE | [OSX] xcodebuild: note: Planning build
- NOTE | [OSX] xcodebuild: note: Constructing build description
- NOTE | [OSX] xcodebuild: note: Execution policy exception registration failed and was skipped: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" (in target 'SWXMLHash' from project 'Pods')
- NOTE | [OSX] xcodebuild: note: Execution policy exception registration failed and was skipped: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" (in target 'Yams' from project 'Pods')
- NOTE | [OSX] xcodebuild: note: Execution policy exception registration failed and was skipped: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" (in target 'SourceKittenFramework' from project 'Pods')
- NOTE | [OSX] xcodebuild: note: Execution policy exception registration failed and was skipped: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" (in target 'Pods-App' from project 'Pods')
- NOTE | [OSX] xcodebuild: note: Execution policy exception registration failed and was skipped: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" (in target 'App' from project 'App')
Pods workspace available at `/var/folders/kb/x__31qgj1t1f3ywr_q010yb00000gn/T/CocoaPods-Lint-20200109-9005-lz8r4x-MockoloFramework/App.xcworkspace` for inspection.
Analyzed 1 podspec.
MockoloFramework.podspec passed validation. |
I should've specified that if I :flatten and also specify source_files, it throws the build error above 'no such module SwiftSyntax'. It works if I don't specify source_files. Without source_files though, I'm still seeing an error mentioned at #9479. Is there a way to grab source files from the zip in a sample project Podfile instead? |
Oh I see, sounds like you can use I gave it a try on my machine and I realize now that you may be trying to use https://github.com/apple/swift-syntax, which is a SwiftPM package that isn't shipped with macOS. You'll need to bundle it with your pod somehow, either by compiling it and shipping the binary or wrapping it in a podspec. |
Thanks for trying it on your machine. Wouldn't wrapping it in podspec require swiftsyntax to be a pod, which should be added by apple? |
Just to close the loop, I decided to split the files so SwiftSyntax is not part of the pod, which resolved the issues. |
Apologies for missing this but sounds like you got it 👍 |
'pod trunk push' gives the following warning, even though the LICENSE.txt file exists (at the root https://github.com/uber/mockolo).
The podspec is (https://github.com/uber/mockolo/blob/master/MockoloFramework.podspec):
The text was updated successfully, but these errors were encountered: