Skip to content

Commit

Permalink
No more cocoapods
Browse files Browse the repository at this point in the history
  • Loading branch information
johnfairh committed Sep 19, 2024
1 parent 517f176 commit 9aca654
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 72 deletions.
34 changes: 3 additions & 31 deletions BUILDING.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -39,48 +39,20 @@ 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
```

## 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
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down
35 changes: 0 additions & 35 deletions RubyGateway.podspec

This file was deleted.

0 comments on commit 9aca654

Please sign in to comment.