This should have no direct user impact.
We currently have two ways of sorting `#import` and `#include`
statements:
1. With our precommit script
2. With `clang-format` (via `git-clang-format`)
It *looks* like we aren't using `clang-format` (because of the
`SortIncludes: false` option in `.clang-format`) but we are,
which you can see by running `clang-format --dump-config`. As a separate
issue, it seems like we're not picking up the `clang-format`
configuration file (`clang-format --style=file:.clang-format
--dump-config` gives different results).
I've run into situations where the two of them "fight", so I think the
best thing to do is pick one. After some discussion, we decided to pick
`clang-format`.
This change should have no direct user impact.
This is just a file move.
I think this is a useful change on its own, but it may be useful in
upcoming changes too (e.g., making SignalServiceKit not a pod).
- Use “nb” instead of “no” for Norwegian
- Use “fr” for both “fr-FR” and “fr-CA”
Also: Remove redundant `tx pull` for App Store metadata. The next
request forces a fetch of all the supported languages, so the first
fetch isn’t necessary.
A couple of codegen scripts had an `--intermediates` flag. While I was
playing around with this (fixing something else), I noticed that these
flags don't work and cause a crash.
Instead of fixing those bugs, I thought it'd be better to just delete
this flag because I don't think anybody uses it.
Tested this by running `make` in the `sds_codegen/` directory, with
success.
Previously, sending a gift badge was not a durable operation, which
meant that crashes/failures could cause users to have their payment
methods charged without actually sending the badge.
Now, the flow is split up into two steps: non-durable parts before the
charge is attempted, and durable parts afterward.
The high-level flow is:
1. Prepare the payment, which involves a couple of repeatable network
requests.
2. Enqueue a job with the prepared payment, that:
1. Charges the payment method (idempotently)
2. Requests a receipt credential (idempotently)
3. Enqueues a gift message, and optionally a text message
3. When the job completes, open the conversation in the UI.
* Little fix for context menu
* Add 'My Stories' section to stories tab
* Add new story thread types
* Show stories in conversation picker
* Support for sending stories
* Update story list when sending stories
* Add basic 'My Stories' view controller
* Initial stories settings screens
* Consolidate TSPrivateStoryThread and TSMyStoryThread into one class
* Require an explicit read transaction to initialize an outgoing message
* Fix linting
* Allow enabling group story from internal settings
* Fix tests
* PR Feedback
This respects the `giftBadges` capability when trying to send gift
badges. In other words, it prevents you from sending gift badges to
someone who lacks the capability.
The bulk of this change involves fetching and saving of this new
capability. The rest of the code involves showing it on the "choose
recipient" screen (and some debug screens).
The gist is:
```diff
-foo = foo + 1
+foo += 1
```
Most of the violations were in generated files, so I changed and re-ran the generator.
A few of these violations required implementing some new methods, which I added tests for.
See [the docs for this rule][0].
[0]: https://realm.github.io/SwiftLint/shorthand_operator.html
The `Emoji` enum had an [orphaned doc comment][0], which SwiftLint reported.
This updates that file's generator to fix the error. (SwiftLint is disabled for most of the file, though—a bit unfortunate, but probably correct for generated files.)
[0]: https://realm.github.io/SwiftLint/orphaned_doc_comment.html
This passes the `--pretty` flag to the symbolication script, which
slightly improves readability.
I also switched the flags to their long forms (`--output` instead of
`-o`, for example) because I feel that they're more readable. But that's
stylistic, and shouldn't affect the functionality of the script.
We added a symbolication script in
a55da92c2b. This commit makes a few small
changes:
- `subprocess.run` should be called with `check=True`
- Remove reference to `~/Symbols`, replace with reference to
`$SIGNAL_IOS_DSYMS` environment variable
- Rename an unused variable to `_`
- Open a file in binary mode (to avoid encoding issues)
We expose many of these builders to Objective-C, but Swift is unable
to map forward-declarations of those types (@class) back to the real
Swift classes because they're nested within the protos. Since we're
already using fully-qualified names even in Swift (e.g.
"SSKProtoContentBuilder"), nesting isn't worth the trouble it's
causing.
This change:
- Fixes some warnings reported by [Shellcheck][0]. Notably, if your repo
is in a folder with a space (e.g., `/Users/foo/My Code/Signal-iOS`),
this script wouldn't work.
- Adds `set -u` to error when using unbound variables, in case we make a
mistake
- Adds `set -o pipefail` to error if piping fails. Not used by this
script, but I put this line in all my shell script just in case
Tested this when taking 5.37.0 to production and it worked fine.
[0]: https://www.shellcheck.net/
_I recommend reviewing this with whitespace changes disabled._
Signal has renamed its primary branch to `main`. This updates references
to the old name, `master`, to either reference `main` or a specific
commit hash.
I also fixed a couple of small whitespace issues in a file I was
editing.
This script broke in the migration to Python 3 (see
1101db6a29). This change fixes those bugs,
and also:
1. Allows you to supply multiple source directories. Previously, you
could only provide one, which meant that you'd see lots of unused
strings, even though they were used in a different folder.
2. Adds usage instructions with `--help`, thanks to Python's `argparse`
module.
3. Quits with a `1` status code if any unused strings are found.
4. Prints unused strings instead of used ones.
5. Speeds up the script by only searching for keys. Previously, it'd
also look for comments and blank lines in the `Localizable.strings`
file.
6. Speeds up the script by only reading files once, instead of once per
key.
This quiets the following deprecation warning:
./Scripts/reverse_integration_check.py:56: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
tag for tag in unmerged_tags if LooseVersion(tag) > LooseVersion(epoch_tag)
[`distutils.LooseVersion` will be removed in Python 3.12][0], and there
doesn't seem to be an equivalent in the standard library. I implemented
a simple `Version` class to replicate this functionality.
(I also looked into other solutions, such as rewriting the script in
Swift, but this seems like the right solution for now.)
[0]: https://peps.python.org/pep-0632/
This adds `5.23.0.22-beta` to our list of ignored tags, to avoid this error when running the script:
RuntimeError: 💥 Found unmerged tags: ['5.23.0.22-beta']
We saw this error when deploying 5.25.
genstrings warns on non-constant strings being passed to
NSLocalizedString, but that happens precisely when we define
OWSLocalizedString. Skip the two files where we define it (one for
each language).
While here:
- Use find's -exec feature rather than a separate xargs invocation.
- Make the script shellcheck-clean.