diff --git a/BUILDING.md b/BUILDING.md index 5f79827..2ba8d0d 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -1,6 +1,6 @@ Notes on how the framework is built. There is a certain amount of messing around to comply with the idiosyncracies of / my lack of patience with -Swift Package Manager & Cocoapods. +Swift Package Manager. ## Components @@ -39,34 +39,10 @@ Everything is fine. ## CocoaPods -CRuby is a git submodule of RubyGateway, refer to it via Xcode options. - -CocoaPods seems to be wedded to 'one module per pod [per target?]'. I -don't want a separate pod for RubyGatewayHelpers. But, unlike SPM, CP is -happy to build mixed Swift-ObjC modules. So the RubyGatewayHelpers code -is just built as part of RubyGateway. - -But, RubyGateway still does `import RubyGatewayHelpers`. Luckily nothing is -explicitly namespaced, so we just need to make the import pass. This happens -by creating a dummy module (empty modulemap) during pod install. - -Unfortunately, and this is probably not CP's fault, doing it this way makes -it impossible to keep the RubyGatewayHelpers header file out of the RubyGateway -module map, which means users importing RubyGateway also get the `rbg_` symbols -polluting their autocomplete. - -Really want to edit the module map after the build is complete, could probably -do via `script_phase` but not sure I want the warning on install / overhead of -maintaining the files. - -Everything is just about OK. +Too broken and poorly understood in 2024; RIP. ## Ruby 3 notes -* The Ruby3 Xcode project has include paths and compiler flag settings for Ruby 3. -* It assumes ~/.rbenv -* Need to configure the CRuby submodule too for that same rbenv - Spell to get Swift docs for CRuby if Xcode can't do it: ```shell jazzy --min-acl private --module CRuby --swift-build-tool symbolgraph --build-tool-arguments -I,/Users/johnf/.rbenv/versions/3.0.0/include/ruby-3.0.0/x86_64-darwin20,-I,/Users/johnf/.rbenv/versions/3.0.0/include/ruby-3.0.0,-I,$(pwd),-Xcc,-fdeclspec @@ -74,13 +50,9 @@ jazzy --min-acl private --module CRuby --swift-build-tool symbolgraph --build-to ## Releasing -* Update podspec, changelog, .jazzy.yaml, TODO, README, LICENSE if year changed. +* Update changelog, .jazzy.yaml, TODO, README, LICENSE if year changed. * Update docs if needed, separate commit. * Commit + tag + push with `--tags`. Check CI. -* `pod spec lint` -- *not* `pod lib lint` - * `pod cache clean 'RubyGateway' --all` if you mess up the tag + have to repush it -* `pod trunk me` -- if bad then `pod trunk register` until good -* `pod trunk push` * Github code -> releases -> tags -> 'Create release' * Title is just release triple * Paste in changelog section diff --git a/README.md b/README.md index f153e97..cb2b03c 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,6 @@ Distributed under the MIT license, see LICENSE. [![CI](https://travis-ci.org/johnfairh/RubyGateway.svg?branch=master)](https://travis-ci.org/johnfairh/RubyGateway) [![codecov](https://codecov.io/gh/johnfairh/RubyGateway/branch/master/graph/badge.svg)](https://codecov.io/gh/johnfairh/RubyGateway) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) -![Pod](https://cocoapod-badges.herokuapp.com/v/RubyGateway/badge.png) ![Platforms](https://img.shields.io/badge/platform-macOS%20%7C%20linux-lightgrey.svg) ![License](https://cocoapod-badges.herokuapp.com/l/RubyGateway/badge.png) @@ -188,11 +187,6 @@ Swift package manager for macOS or Linux: .package(url: "https://github.com/johnfairh/RubyGateway", from: "6.0.0") ``` -CocoaPods for macOS: -``` -pod 'RubyGateway' -``` - ### Configuring CRuby CRuby is the glue between RubyGateway and your Ruby installation. It is a diff --git a/RubyGateway.podspec b/RubyGateway.podspec deleted file mode 100644 index dddf971..0000000 --- a/RubyGateway.podspec +++ /dev/null @@ -1,35 +0,0 @@ -Pod::Spec.new do |s| - s.name = "RubyGateway" - s.version = "6.0.0" - s.authors = { "John Fairhurst" => "johnfairh@gmail.com" } - s.license = { :type => "MIT", :file => "LICENSE" } - s.homepage = "https://github.com/johnfairh/RubyGateway" - s.source = { :git => "https://github.com/johnfairh/RubyGateway.git", - :tag => "v#{s.version.to_s}", - :submodules => true } - s.summary = "Embed Ruby in Swift: load Gems, run scripts, invoke APIs seamlessly in both directions." - s.description = <<-EDESC - A Swift framework built on the Ruby C API that lets Swift - programs painlessly and safely run and interact with Ruby - programs. Easily pass Swift datatypes into Ruby and turn - Ruby objects back into Swift types. - - The framework lets you call any Ruby method from Swift, - including passing Swift closures as blocks. It lets you - define Ruby classes and methods that are implemented in - Swift. - EDESC - s.documentation_url = "https://johnfairh.github.io/RubyGateway/" - s.source_files = 'Sources/RubyGateway/*swift', 'Sources/RubyGatewayHelpers/**/*.{h,m}' - s.platform = :osx, '10.14' - s.swift_version = "6" - s.frameworks = "Foundation" - s.preserve_path = 'CRuby/*', 'RubyGatewayHelpers/*' - s.pod_target_xcconfig = { 'SWIFT_INCLUDE_PATHS' => '"${PODS_ROOT}/RubyGateway/CRuby/Sources/CRuby" "${PODS_ROOT}/RubyGateway/RubyGatewayHelpers"', - 'HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/RubyGateway/CRuby/Sources/CRuby"', - 'OTHER_SWIFT_FLAGS' => '"-Xcc" "-fdeclspec"' } - s.prepare_command = <<-ECMD - mkdir RubyGatewayHelpers - echo 'module RubyGatewayHelpers [system] {}' > RubyGatewayHelpers/module.modulemap - ECMD -end