Skip to content

Commit

Permalink
Split icrate into one crate per framework
Browse files Browse the repository at this point in the history
Additionally:
- Add helper module `objc2::__framework_prelude` with common imports.
- Make `block2` an optional dependency.
- Make most framework crates except `objc2-foundation` optional.
- Move framework changelog to `objc2::topics::about_generated::changelog`.
- Add full list of crates in `objc2::topics::about_generated::list`.
- Document cargo features in `objc2::topics::about_generated::cargo_features`.
  • Loading branch information
madsmtm committed Apr 17, 2024
1 parent 71590b8 commit 8e55a4c
Show file tree
Hide file tree
Showing 421 changed files with 16,604 additions and 6,405 deletions.
113 changes: 47 additions & 66 deletions .github/workflows/ci.yml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "crates/icrate/src/generated"]
path = crates/icrate/src/generated
url = https://github.com/madsmtm/icrate-generated.git
[submodule "generated"]
path = generated
url = https://github.com/madsmtm/objc2-generated.git
# We recommend a shallow clone here since there are a lot of generated
# files in history, and I suspect most contributors won't need to look at
# the history of these.
Expand Down
23 changes: 16 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,21 @@
Thank you for your interest in contributing! There are many ways to contribute and we appreciate all of them.


## A note for Windows users

This repository relies heavily on symlinks, so make sure that your system is
set up to enable those (see [this StackOverflow answer][so-symlink] for
details on how to do that).

[so-symlink]: https://stackoverflow.com/a/59761201/5203369


## `git` submodules

The `icrate` crate contains a submodule pointing to
[`madsmtm/icrate-generated`]. This exists to keep the primary repository free
from the clutter inherently associated with storing generated files in `git`,
while still allowing change-tracking of said files.
The framework crates uses a submodule pointing to [`madsmtm/objc2-generated`].
This exists to keep the primary repository free from the clutter inherently
associated with storing generated files in `git`, while still allowing
change-tracking of said files.

You should consider whether you want a shallow or a full checkout of the
generated files - the default is to do a shallow clone, since the repository
Expand All @@ -28,15 +37,15 @@ See the excellent `git` [documentation on submodules][submodule-docs], or the
manpage for [`git-submodule`] for further details on how submodules work.


[`madsmtm/icrate-generated`]: https://github.com/madsmtm/icrate-generated
[`madsmtm/objc2-generated`]: https://github.com/madsmtm/objc2-generated
[submodule-docs]: https://git-scm.com/docs/gitsubmodules
[`git-submodule`]: https://git-scm.com/docs/git-submodule


### Updating the `git` submodule

When making changes to `header-translator`, you must update the `git`
submodule manually and push your changes to a fork of `icrate-generated` (you
submodule manually and push your changes to a fork of `objc2-generated` (you
do not need to submit a PR to that repo).

We try to maintain a linear history in that repo, in a fashion such that every
Expand All @@ -61,7 +70,7 @@ Copy and fill out the following checklist into the release PR:
- `objc2-encode`
- `objc2`
- `block2`
- `icrate`
- Framework crates
- Local tests have been run (see `helper-scripts/test-local.fish`):
- [ ] macOS 10.14.6 32bit
- [ ] iOS 9.3.6, 1st generation iPad Mini
Expand Down
Loading

0 comments on commit 8e55a4c

Please sign in to comment.