Signal-iOS/Scripts
Evan Hahn 160d46ef77
Fix debug assert when proto message has no addresses
This restores the behavior prior to
4a0141be41, where I made a mistake that
affect development builds.

Previously, the generated code looked like this, to prevent
instantiation of `SignalServiceAddress`es with no identifiers:

    // This is a sketch!
    let address: SignalServiceAddress? = {
      guard hasUuid || hasE164 else { return nil }
      let address = SignalServiceAddress(uuid: uuid, e164: e164)
      guard address.isValid else {
        owsFailDebug("address was unexpectedly invalid")
        return nil
      }
      return address
    }()

It makes sense (to me) to do this, because all proto fields are
optional. That means you can have a valid message that lacks both of
these fields, which is allowed. It shouldn't error.

However, I changed it to the equivalent of this, which caused an error
in `SignalServiceAddress`'s initializer:

    let address: SignalServiceAddress? = {
      let address = SignalServiceAddress(uuid: uuid, e164: e164)
      guard address.isValid else {
        return nil
      }
      return address
    }()

This reverts that to avoid the debug assertion failure. I don't think
this ever affected "real" builds beyond some extra logging.
2022-10-05 07:31:59 -07:00
..
git_hooks Remove reverse integration script 2022-06-10 13:56:32 +00:00
sds_codegen PR Feedback 2022-09-22 14:53:29 -07:00
translation Fetch translations from Smartling 2022-09-29 16:13:06 -07:00
translation-tool Fetch translations from Smartling 2022-09-29 16:13:06 -07:00
AuditStringH.py More Python 3 script fixes 2022-03-24 10:28:27 -05:00
bump_build_tag.py Scripts: subprocess.check_output should use text=True for compatibility 2022-03-24 17:28:12 -05:00
ClearDerivedData.sh Respond to CR. 2018-02-09 10:31:29 -05:00
debug_log_upload.py Scripts: subprocess.check_output should use text=True for compatibility 2022-03-24 17:28:12 -05:00
disableUniversalDeviceSupport More Python 3 script fixes 2022-03-24 10:28:27 -05:00
emoji_ranges.py Upgrade scripts to Python 3 2022-03-21 12:58:33 -05:00
emoji-data.txt Respond to CR. 2017-10-30 12:11:42 -04:00
EmojiGenerator.swift Fix operator_whitespace SwiftLint violations 2022-07-07 17:38:38 -07:00
enableUniversalDeviceSupport More Python 3 script fixes 2022-03-24 10:28:27 -05:00
extract_analytics_event_names.py Move script out of SignalServiceKit 2022-08-01 16:29:43 -05:00
feature_flags_beta.py Upgrade scripts to Python 3 2022-03-21 12:58:33 -05:00
feature_flags_common.py Scripts: subprocess.check_output should use text=True for compatibility 2022-03-24 17:28:12 -05:00
feature_flags_openPreview.py Upgrade scripts to Python 3 2022-03-21 12:58:33 -05:00
feature_flags_production.py Upgrade scripts to Python 3 2022-03-21 12:58:33 -05:00
feature_flags_qa.py Upgrade scripts to Python 3 2022-03-21 12:58:33 -05:00
HardResetGit.sh Hard reset git script. 2017-01-31 13:58:13 -05:00
precommit.py Fetch translations from Smartling 2022-09-29 16:13:06 -07:00
ProtoWrappers.py Fix debug assert when proto message has no addresses 2022-10-05 07:31:59 -07:00
schema_dump Firm up database schema 2021-11-09 14:25:42 -08:00
set_release_notes set_release_notes: support EDITOR with arguments 2022-05-25 15:59:47 -07:00
setup_private_pods Fix setup_private_pods script for newly-cloned repos 2022-01-28 10:04:00 -08:00
sort-Xcode-project-file Sort the Xcode project's visible files 2022-08-19 15:38:25 -07:00
sqlclient Don't read or write dbPath in debug dbPaypload 2022-09-26 14:13:06 -07:00
sqlclient-legacy sql client scripts 2019-04-05 10:50:45 -06:00
symbolicate.py Pretty-print symbolicated crashes 2022-05-23 22:08:36 +00:00
unused_strings.py Improve script to find unused strings 2022-04-15 15:28:15 -05:00
update_plist_info.sh Fix update_plist_info.sh to not assume no decorate on git log 2022-05-10 19:49:30 -05:00
update_share_plist_info.sh PR Feedback 2019-05-28 13:07:34 -07:00
upload_metadata Harden upload_metadata script 2022-05-05 10:13:47 -05:00