minuscorp / moduleinterface Goto Github PK
View Code? Open in Web Editor NEWSwift tool to generate Module Interfaces for Swift projects.
License: Apache License 2.0
Swift tool to generate Module Interfaces for Swift projects.
License: Apache License 2.0
So in order to not stuck on swift build --disable-sandbox -c release
I had to enable IPv6 and then it all installed successfully.
### Rakefile:
require 'open3'
task default: %w[setup]
task :setup => [:brew, :precommit]
task(:brew) do
raise '`brew` is required. Please install brew. https://brew.sh/' unless system('which brew')
puts('➡️ Brew')
sh('brew bundle')
puts('➡️ Bundle')
sh('bundle install')
puts('➡️ Cocoapods')
sh('bundle exec pod install')
end
task(:precommit) do
puts('Deleting other installed hooks to avoid collision...')
puts('Checking overcommit installation...')
if system('which overcommit')
puts('Found system-wide overcommit installation, uninstalling hooks...')
stdout, _, _ = Open3.capture3('overcommit --uninstall')
puts(stdout) unless stdout.empty?
elsif system('bundle show overcommit')
puts('Found bundle-wide overcommit installation, uninstalling hooks...')
stdout, _, _ = Open3.capture3('overcommit --uninstall')
puts(stdout) unless stdout.empty?
end
puts('➡️ pre-commit 👮♀️')
sh('pre-commit install -f')
sh('pre-commit install --hook-type commit-msg')
end
task(:docs) do
sh('sourcedocs generate --min-acl public --output-folder Docs -- -workspace REDACTED.xcworkspace -scheme REDACTED-Release')
sh('moduleinterface generate --min-acl public --output-folder Docs -- -workspace REDACTED.xcworkspace -scheme REDACTED-Release')
end
We have internal tooling that publishes Swift interfaces for comment and review. For Swift-only frameworks our tooling works fine simply getting the abstract syntax tree of the Swift source code. However, this approach doesn't work when the source contains, or is primarily, Objective-C.
We have an alternate process that will process *.swiftinterface
files, but we have yet to find a process that works for generating these files from Objective-C or mixed source except for using the internal Xcode Generated interface. We are searching for a programmatic solution.
Based on comments here (jpsim/SourceKitten#405) I was hoping that this tool might solve our issue. However, when I run it on a simple dummy framework, which contains a SwiftClass
object and an ObjCClass
object, the generated interface only includes the SwiftClass
interface even though the bridged ObjCClass
is exposed.
Is ModuleInterface intended to work with mixed source, or is it strictly for Swift-only frameworks (or the Swift-only portion of mixed frameworks)?
Hey, first of all thanks for this amazing tool.
Since I updated to Xcode 14, ModuleInterface stoped working.
moduleinterface generate --clean --module-name Example --output-folder Docs/API/ -- -scheme Example -workspace Example.xcworkspace -configuration Debug -destination "platform=iOS Simulator,name=iPhone 13,OS=latest" -verbose
2022-10-10 14:38:30.370 xcodebuild[33775:5188973] Requested but did not find extension point with identifier Xcode.InterfaceBuilderBuildSupport.PlatformDefinition
Running xcodebuild
Checking xcodebuild -showBuildSettings
Running xcodebuild
The operation couldn’t be completed. (SourceKittenFramework.Request.Error error 2.)
Do you have any idea what's wrong?
Maybe the dependency SourceKitten
needs to be updated?
Thanks
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.