Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch v0.52.3 #19

Merged
merged 347 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
347 commits
Select commit Hold shift + click to select a range
31c19ae
Add justfile with a few recipes
akonradi-signal Mar 25, 2024
5d95051
java: Accept Collection instead of List if order doesn't matter
jrose-signal Mar 26, 2024
07c6e8b
Test CDSI errors after initial request/response
akonradi-signal Mar 26, 2024
28fe15e
Import latest backup proto changes
akonradi-signal Mar 26, 2024
acf64e6
Consolidate matches for SignalJniError
akonradi-signal Mar 26, 2024
08513b2
Determine ResultType from bridged fn signature
akonradi-signal Mar 26, 2024
9b34467
Use taplo to auto-format TOML files
akonradi-signal Mar 26, 2024
94432e2
Handle all CDSI server error codes
akonradi-signal Mar 26, 2024
50c9ec1
CI: Set environment for SVR3 integration tests in Slow Tests
moiseev-signal Mar 1, 2024
aca995d
libsignal-net: additional API and debug info
sergey-signal Mar 27, 2024
bddca7d
Throw JS deserialization errors of correct type
akonradi-signal Mar 28, 2024
8c1eadc
libsignal-net: refining ServiceWithReconnect activity states logic
sergey-signal Mar 29, 2024
819606d
Add a test for TCP SSL connector
akonradi-signal Mar 29, 2024
10a6d8b
Remove enclave operation timeout arguments
akonradi-signal Mar 29, 2024
2ba7ab9
net: When stopping with an error, make sure we save the error first
jrose-signal Mar 29, 2024
2ef315a
net: Chat should auto-disconnect its connections when dropped
jrose-signal Mar 29, 2024
96fce49
Bridge unauthenticated connection to Swift
jrose-signal Apr 1, 2024
3ace227
Bump to version v0.43.0
akonradi-signal Apr 1, 2024
a829c8f
libsignal-net: introducing a separate ChatService class for Node
sergey-signal Apr 1, 2024
5d30eaa
Add a TransportConnector impl via proxy
akonradi-signal Apr 2, 2024
b72fa24
libsignal-net: reconnect should keep trying after failure
sergey-signal Apr 2, 2024
79bab1c
Expose TLS proxy in app libraries
akonradi-signal Apr 2, 2024
a31ca5d
Add all `E` values to endorsements Fiat-Shamir transform challenge ca…
rolfe-signal Apr 2, 2024
02e03ee
Bump to version v0.44.0
sergey-signal Apr 3, 2024
53ba4c2
Swift: Add missing error cases
jrose-signal Apr 4, 2024
2b453ca
svr3: New staging enclaves
moiseev-signal Apr 4, 2024
a44f16b
libsignal-net: switch to using enum for route_type
sergey-signal Apr 5, 2024
06c1780
Hold server zkparams as pointers
akonradi-signal Apr 9, 2024
6b7c072
swift: Fix PreKeyBundle accessors
jrose-signal Apr 6, 2024
5af499c
Delete local refs in preload_classes
akonradi-signal Apr 10, 2024
0904a62
Handle padding in encrypted message backup
akonradi-signal Apr 11, 2024
86a8152
net: Test TcpListener must be marked as non-blocking for use with tokio
jrose-signal Apr 5, 2024
f3ae806
net: For testing, allow the outer stream of a TLS proxy to be TCP-only
jrose-signal Apr 5, 2024
f72f33d
Remove code that handles auth cred with ACI as PNI
akonradi-signal Apr 11, 2024
146603e
java: Add network exceptions to preloaded list
moiseev-signal Apr 9, 2024
d3be245
SVR3: Update Nitro constants.
gram-signal Apr 12, 2024
1ea1ac2
SVR3: Support tpm2snp enclave on gcp
moiseev-signal Apr 11, 2024
8447be8
Update boring to v4
jrose-signal Apr 11, 2024
6114bb7
Use the first bytes of a backup as the AES IV
akonradi-signal Apr 15, 2024
3864f33
libsignal-net: dropping DebugInfo.connectionReused field
sergey-signal Apr 12, 2024
505408a
test: Add missing raised timeout to SVR3 integration test
jrose-signal Apr 16, 2024
aeb15ff
jni: Implement CompletableFuture.whenComplete
moiseev-signal Apr 16, 2024
bbeb0bb
swift: Remove redundant explicit local variable type, per swiftformat
jrose-signal Apr 16, 2024
fcdd48b
Derive std::error::Error for more types
akonradi-signal Apr 17, 2024
8ff2bc4
net: Remove unused hyper dependency
jrose-signal Apr 9, 2024
4b87577
java: Print all test outcomes as they run (not just passes)
jrose-signal Apr 16, 2024
145d6fe
Update message backup proto from specs
akonradi-signal Apr 17, 2024
3d2471c
Make LIBSIGNAL_TESTING_ env vars available to Android and iOS tests
jrose-signal Apr 16, 2024
ff10bdc
protocol: Improve logs around sealed sender certs
jrose-signal Apr 17, 2024
dc04e0a
Lookup all Java classes through preload-aware fn
akonradi-signal Apr 18, 2024
9db7436
Implement Debug and PartialEq for more types
akonradi-signal Apr 19, 2024
9204831
Use an enum for BackupAuthCredential's level
ravi-signal Apr 19, 2024
9f53f3d
BackupAuthCredential: verify the redemption time on receive
jrose-signal Apr 19, 2024
eb3929f
libsignal-net: expose ipv6_enabled DnsResolver option to Node
sergey-signal Apr 19, 2024
a656341
net: Improve logging around timeouts
jrose-signal Apr 19, 2024
ada8224
Bump to version v0.45.0
jrose-signal Apr 19, 2024
ba08abc
CI: Install swiftlint explicitly for swift_cocoapod job
jrose-signal Apr 22, 2024
23c0c6c
swift: C functions with no arguments are declared '(void)', not '()'
jrose-signal Apr 22, 2024
330669b
Podspec: mark "Download and cache libsignal-ffi" as always-run
jrose-signal Apr 22, 2024
efe6898
Make zkgroup::Timestamp a wrapper type
akonradi-signal Apr 24, 2024
195878c
zkgroup: Remove more vestiges of AuthCredentialV1 and V2
jrose-signal Apr 23, 2024
115641c
CI: Set a timeout of 45 minutes on every job that builds something
jrose-signal Apr 24, 2024
ab2144e
net: Replace rustls-native-certs with rustls-platform-verifier
jrose-signal Apr 16, 2024
01a8c35
swift: Use thin LTO even in debug builds
jrose-signal Apr 17, 2024
4854611
swift: Add an integration test for connecting via proxy
jrose-signal Apr 17, 2024
060284c
node: Add an integration test for connecting via proxy
jrose-signal Apr 17, 2024
9d622d9
android: Add rustls-platform-verifier support
jrose-signal Apr 24, 2024
7cbc903
net: When failing to connect, describe each route in the log messages
jrose-signal Apr 24, 2024
c071571
net: Log on chat request failures, including connection info
jrose-signal Apr 25, 2024
46780fb
Bump to version 0.45.1
moiseev-signal Apr 26, 2024
4e44b83
Run jni_artifacts workflow on macos-12
moiseev-signal Apr 26, 2024
937a89f
Coding guideline: keep logs minimal by default
jrose-signal Apr 26, 2024
f5c2c50
improve coreutils compatibility
ehrenkret-signal Apr 29, 2024
6edd054
java: add async class load method
akonradi-signal Apr 29, 2024
53699f1
java: save the class loader on initialization
akonradi-signal Apr 30, 2024
1fe47ce
swift: let message backup stream factory fn throw (#713)
akonradi-signal Apr 30, 2024
6c8cf11
java: use new_instance instead of new_object
akonradi-signal Apr 30, 2024
09bffd5
Use a named type for protocol timestamp
akonradi-signal Apr 30, 2024
96e3fd9
Guidelines: avoid `cargo add`
jrose-signal Apr 30, 2024
e55349e
java: Update ServiceIdTest to JUnit 4
jrose-signal Apr 30, 2024
cc12c6f
Make ServiceId Ord/Comparable
jrose-signal Apr 30, 2024
ccf4b81
ServiceIdTest refactoring
sergey-signal May 1, 2024
fa1f8f7
Implement Distribution for new Timestamp types
akonradi-signal May 1, 2024
17ec3fe
crates_code_size: Add a special case to recognize BoringSSL
jrose-signal May 1, 2024
32dc8c2
Revert "Remove ProfileKeyCredentialPresentationV1"
akonradi-signal May 1, 2024
b1eee0a
Put the type name in ZkGroupDeserializationFailure
jrose-signal May 1, 2024
ab733bf
libsignal-net: support for User-Agent header
sergey-signal May 2, 2024
6aedbad
Remove unreachable! in enclave connection code
akonradi-signal May 2, 2024
a882ad3
net: Don't save new errors if a service is already stopped
jrose-signal Apr 26, 2024
25cba29
net: Log less when reconnecting
jrose-signal Apr 26, 2024
0ac9530
Bump to version v0.46.0
jrose-signal May 2, 2024
2b0e1e5
bridge: Add cancellation to AsyncRuntime and TokioAsyncContext
jrose-signal May 3, 2024
15ca6f0
CI: Clean between more jobs in the Rust slow tests
jrose-signal May 6, 2024
f4149e7
net: Add a manual-test binary for alternate routes, chat_smoke_test
jrose-signal Apr 26, 2024
60962b2
CI: Downgrade iOS PR testing and Release actions to macos-12 runner
jrose-signal May 6, 2024
62d88b1
Enable connecting to custom servers
akonradi-signal May 7, 2024
a09eb56
net: "Poison" the TCP connector if an invalid proxy is set
jrose-signal May 8, 2024
2f8086e
chat_smoke_test: Add --try-all-routes, to try each route separately
jrose-signal May 8, 2024
8963cf8
CI: Run chat_smoke_test manually as part of the Slow Tests
jrose-signal May 8, 2024
6370f13
net: Add a handler for server->client requests
jrose-signal May 4, 2024
2545018
libsignal-net: custom DNS lookups
sergey-signal May 14, 2024
0cf9bbd
chat_smoke_test: report failure in the exit status
jrose-signal May 14, 2024
300bb99
chat_smoke_test: Set ring as the "crypto provider" for rustls
jrose-signal May 14, 2024
369a3af
net: Promote cooldown early-exit log to info level
jrose-signal May 13, 2024
a2c271a
build_ffi: Update error message for a missing cbindgen
jrose-signal May 14, 2024
5553668
Move message backup proto and I/O to new crate
akonradi-signal May 15, 2024
23894b2
build_ffi.sh: Only set OPENSSL_SMALL when compiling for iOS
jrose-signal May 15, 2024
03ce5d9
net: Use ring as rustls's crypto provider on Linux if needed
jrose-signal May 14, 2024
99bb74e
net: Debounce connection requests with pessimistic timeouts
jrose-signal May 1, 2024
99e337f
bridge: Expose authenticated sends on ChatService
jrose-signal May 15, 2024
9b9bd7c
Bump to version v0.46.1
jrose-signal May 15, 2024
052fd5b
net: clear in-flight requests map on ipv6_enabled flag change
sergey-signal May 16, 2024
953b07e
net: test that one route is attempted until it goes into cooldown
sergey-signal May 16, 2024
3c7acdb
net: Fix use of rustls-platform-verifier on non-Linux
jrose-signal May 16, 2024
aea24d0
net: restoring a practical Default for DnsResolver
sergey-signal May 16, 2024
1aedf12
Bump version to v0.46.2
jrose-signal May 16, 2024
4f630a6
Stop tracking call IDs in message backups
akonradi-signal May 17, 2024
6d3c192
ffi: Wrap promise callbacks and contexts in a struct
jrose-signal Apr 30, 2024
7dc63b9
ffi: Expose cancellation to Swift
jrose-signal May 3, 2024
f86cbdc
Fix class loading issue with GraalVM
akonradi-signal May 17, 2024
38092e9
Update backup proto from specs
akonradi-signal May 20, 2024
bd8e552
SVR3: Support new staging enclaves
moiseev-signal May 16, 2024
1e1acff
SVR3: Make the tpm2 attestation test resilient to enclave changes
moiseev-signal May 16, 2024
bc5875b
SVR3: Propagate tries_remaining upon successful restore
moiseev-signal May 20, 2024
b9e0216
java: Check for invalid key sizes more thoroughly in ECPublicKey
jrose-signal May 20, 2024
3e1c50a
Keep all message backup account data and call fields during validation
akonradi-signal May 20, 2024
e1aa542
ffi: Expose LibsignalLogger protocol rather than depending on DDLog
jrose-signal May 16, 2024
f18b39f
Revert "Move message backup proto and I/O to new crate"
akonradi-signal May 20, 2024
404c52d
Remove timeout for multi-route connection manager
akonradi-signal May 20, 2024
59addf1
Make `ECPrivateKey#<init>(byte[])` public
jon-signal May 20, 2024
c55aa17
SVR3: Propagate tries_remaining on restore failure
moiseev-signal May 20, 2024
70ba174
SVR3: Implement remove API
moiseev-signal May 21, 2024
a31d5b0
gen_ts_decl: Ignore "unused" warnings
jrose-signal May 15, 2024
a513d61
bridge: Expose ChatListener to Swift
jrose-signal May 10, 2024
a5fa231
bridge: Expose ChatService_InjectRawServerRequest for testing
jrose-signal May 10, 2024
1086531
Bump to version 0.47.0
moiseev-signal May 21, 2024
878d3d4
bridge: Move Chat-related items into a submodule
jrose-signal May 21, 2024
c4917d6
Track values in chat-related protos
akonradi-signal May 22, 2024
b81c639
Split up backup/chat.rs
akonradi-signal May 22, 2024
eb63e30
Import latest backup proto definition
akonradi-signal May 22, 2024
0cea81b
swift: ChatService.didReceiveIncomingMessage's sendAck is @escaping
jrose-signal May 22, 2024
de252fd
swift: Remove reference to deleted Logging.m
jrose-signal May 22, 2024
422b609
swift: Fix format string used for logging in tests
jrose-signal May 22, 2024
770dd1b
node: Add cancellation support via AbortController
jrose-signal May 22, 2024
62f347e
net: consolidating timeout constants
sergey-signal May 22, 2024
9a8429d
net: Add AppExpired and DeviceDeregistered errors for ChatService
jrose-signal May 23, 2024
e711808
bridge: Name tokio's worker threads explicitly
jrose-signal May 23, 2024
e718c20
net: Warn on excessive backpressure for server->client requests
jrose-signal May 20, 2024
f015765
Import backup proto definition
akonradi-signal May 24, 2024
18f35aa
Treat subscriber ID and currency as optional
akonradi-signal May 24, 2024
e90cf32
net: Improve logs for websocket connection failures
jrose-signal May 23, 2024
e925c5d
Bump to version 0.48.0
akonradi-signal May 24, 2024
31d6015
backups: add shared message backup test cases
akonradi-signal May 24, 2024
7103178
SVR3: Support production enclaves
moiseev-signal May 28, 2024
8b0f6f2
cargo update
jrose-signal May 24, 2024
75be990
net+svr3: Enforce RaftConfig on type level
moiseev-signal May 28, 2024
26ffef9
net: Use EndpointParams in EnclaveEndpoint
moiseev-signal May 29, 2024
0cf9d20
backup: track more message backup fields
akonradi-signal May 30, 2024
6bbe62b
swift: Use non-fallible String->Data conversion, per swiftlint
jrose-signal May 30, 2024
e240e90
Reduce code duplication due to monomorphization
akonradi-signal May 30, 2024
4173792
Remove dynamic dispatch in convert_to_exception
akonradi-signal May 30, 2024
8313a2c
Remove app-layer tests that rely on connection timeouts
jrose-signal May 30, 2024
228eca8
backup: Update backup.proto to latest version
akonradi-signal May 31, 2024
3be5f45
net: skip unknown records when parsing DNS responses
sergey-signal May 31, 2024
347791c
Bump to version 0.49.0
moiseev-signal May 31, 2024
69ed266
java: Remove superfluous java_test Makefile target
jrose-signal May 31, 2024
f4c0c8f
chat: blanket-impl services for wrappers
akonradi-signal Jun 3, 2024
0134e3e
net: Use SingleRouteThrottlingConnectionManager for custom DNS lookups
jrose-signal May 30, 2024
7202905
net: Handle responses to requests even if the socket has since closed
jrose-signal Jun 1, 2024
12f886b
backup: prepend IV in example binary
akonradi-signal Jun 4, 2024
44b6057
java (mostly): audit for checked AttestationFailedException
jrose-signal Jun 5, 2024
83daebf
backup: pull latest backup.proto definition, tests
akonradi-signal Jun 3, 2024
6e492fc
backup: validate distribution list, record group fields
akonradi-signal Jun 6, 2024
38a5f01
net: Short circuit MultiRouteConnectionManager on fatal errors
moiseev-signal Jun 7, 2024
53d60eb
backup: make validation completion fallible
akonradi-signal Jun 7, 2024
e968ab4
Bump to version v0.50.0
jrose-signal Jun 7, 2024
eef35d2
attest: remove obsolete CDSI mrenclave from ACCEPTABLE_SW_ADVISORIES
eager-signal Jun 10, 2024
408e470
backup: Track order of all chat items across chats
akonradi-signal Jun 11, 2024
0a96d32
net: Pass "fatal" connection errors up through chat connect*()
jrose-signal Jun 11, 2024
b3ec2cc
net: chat listener bridging to node
sergey-signal Jun 13, 2024
af48218
Add a --debug-level-logs option to build_ffi.sh
jrose-signal May 31, 2024
1364e48
node: Add `yarn build-with-debug-level-logs`
jrose-signal Jun 12, 2024
4791773
java: Add `-P debugLevelLogs` as a Gradle build option
jrose-signal Jun 12, 2024
24c234a
Update message backup proto definition
akonradi-signal Jun 13, 2024
3cebfb0
java: Build reproducible jars
jrose-signal Jun 13, 2024
0cbe507
CI: Verify our reproducible Java builds in the Slow Tests
jrose-signal Jun 13, 2024
fee5594
net: Differentiate chat-server HTTP responses from proxy responses
jrose-signal Jun 11, 2024
b79637d
node: Add doc comments around ChatListener
jrose-signal Jun 13, 2024
e3a1eb5
swift: Split ChatListener out to its own file
jrose-signal May 31, 2024
b603fab
net: ServerRequest -> ServerEvent, so we can add a non-request event
jrose-signal May 31, 2024
cca5b51
net: Send a Stopped event if there have been any server requests
jrose-signal May 31, 2024
4e2a7de
Expose the 'Stopped' event to Swift and Node
jrose-signal Jun 1, 2024
86c07ee
bridge: Remove SignalFfiError enum
jrose-signal Jun 4, 2024
95bf4e7
Bump to version v0.51.0
jrose-signal Jun 13, 2024
66436b7
Remove unused dependencies
akonradi-signal Jun 18, 2024
8c05c03
Update cargo-about
jrose-signal Jun 19, 2024
44ff1e7
Update to a slightly newer rustc
jrose-signal Jun 19, 2024
8bca9ac
Update curve25519-dalek
jrose-signal Jun 19, 2024
e88138e
Use constant instead of hex literal for acceptable advisories
moiseev-signal Jun 20, 2024
b463c51
net: Add proxy-f config for staging
moiseev-signal Jun 20, 2024
fc5a128
net: Fix inverted boolean propagating fatal errors in reconnect
jrose-signal Jun 18, 2024
4f4669e
node: update prebuildify to 6.0.1
indutny-signal Jun 17, 2024
2e2896f
Bump to version v0.51.1
jrose-signal Jun 21, 2024
aeeba5e
Track ad-hoc calls in message backups
akonradi-signal Jun 21, 2024
db18a10
Use Docker's ADD command for remote resources
jrose-signal Jun 21, 2024
05c8617
Run cargo with --keep-going/--no-fail-fast in CI
akonradi-signal Jun 21, 2024
5b45706
Split types out of libsignal-bridge crate
akonradi-signal Jun 21, 2024
628b849
bridge: ChatListeners should prioritize cancellation over events
jrose-signal Jun 21, 2024
2a2ef52
Update to Node 20.11.1
jrose-signal Jun 21, 2024
6313b97
ffi: Simplify error attribute getters using trait methods
jrose-signal Jun 13, 2024
2b5b51c
Fix error string whitespace
eager-signal Jun 21, 2024
49f9fa5
Use --no-fail-fast for `cargo test`
akonradi-signal Jun 24, 2024
b064ec7
Upgrade rustc to latest nightly
akonradi-signal Jun 25, 2024
b85148c
svr3: Implement query function
moiseev-signal Jun 25, 2024
72aae8c
Remove SignalCoreKit dependency in libsignal
harry-signal Jun 26, 2024
bb44874
Use a single source of truth for version file list
akonradi-signal Jun 26, 2024
ff864cc
Refactor gen_{ts,java}_decl.py
akonradi-signal Jun 26, 2024
fc4e1db
Switch to JSON5 for backup .jsonproto parsing
akonradi-signal Jun 26, 2024
4243979
net: support status codes when responding to server messages
sergey-signal Jun 26, 2024
f26fd13
Add SealedSenderMultiRecipientMessage#serialized
eager-signal Jun 26, 2024
4cce563
Avoid calling AsyncRead::read with empty target
akonradi-signal Jun 28, 2024
e13e3de
Bump to version v0.52.0
akonradi-signal Jun 28, 2024
a9868ec
Bump NPM publish workflow macOS image version
akonradi-signal Jun 28, 2024
2b48d18
Bump to version 0.52.1
moiseev-signal Jun 28, 2024
b9efb3c
Regenerate acknowledgements
moiseev-signal Jul 1, 2024
9355467
Add documentation for bridge crates
akonradi-signal Jun 26, 2024
562f03a
attest: Stop validating PCR5 for tpm2snp
moiseev-signal Jul 3, 2024
4694d0a
svr3: Support latest tpm2snp enclave
moiseev-signal Jul 8, 2024
c870e23
svr3: Implement restore with fallback function
moiseev-signal Jul 8, 2024
2feac34
swift: Replace last use of NSLog with new logging protocol
jrose-signal Jul 8, 2024
c6857dd
Don't assume EOF on 0-length read for Node
akonradi-signal Jul 9, 2024
0e4d420
Add libsignal-jni-testing crate with test-only functions for Java
akonradi-signal Jul 9, 2024
9aa5d07
node: Build with (split) debug info
jrose-signal Jun 21, 2024
377ca15
node: Attach debug info to the GitHub Release
jrose-signal Jun 21, 2024
773530e
Add type annotations to all our Python scripts
jrose-signal Jul 8, 2024
36c6eeb
node: Remove "install" script that invokes node-gyp-build
jrose-signal Jul 10, 2024
5816c03
Use zerocopy for safe transmutes
akonradi-signal Jul 10, 2024
31759a5
Add libsignal-bridge-testing for Node
akonradi-signal Jul 10, 2024
f794998
SVR3: implement migrate API
moiseev-signal Jul 10, 2024
7af57ad
backup: make recipient type vary with method
akonradi-signal Jul 10, 2024
8954767
Quick-fix for the race between auth and unauth ws connectors
moiseev-signal Jul 10, 2024
6d3c1b0
Add libsignal-bridge-testing for Swift
akonradi-signal Jul 10, 2024
1e8b738
net: Avoid hot loops in reconnect
jrose-signal Jul 10, 2024
efaa3c4
net: Remember to set the confirmation header name for proxies
jrose-signal Jul 11, 2024
eb0a8ef
Update to latest backup.proto definition
akonradi-signal Jul 11, 2024
21ddea4
node: If the logging channel backs up, drop logs
jrose-signal Jul 10, 2024
7261c37
Bump to version v0.52.2
jrose-signal Jul 11, 2024
5b63a03
node: Put an empty install script so node-gyp isn't invoked implicitly
jrose-signal Jul 11, 2024
a4a0663
Bump to version v0.52.3
jrose-signal Jul 11, 2024
670814f
Merge branch 'main' into patch-v0.52.3
tiainen Jul 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .clippy.toml
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
too-many-arguments-threshold = 8
disallowed-methods = [
{ path = "jni::JNIEnv::find_class", reason = "use lookup helper instead" },
".." # keep any defaults
]
43 changes: 43 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 120
trim_trailing_whitespace = true

[{*.java,*.java.in}]

[*.proto]
max_line_length = 80

[*.rs]
indent_size = 4

[*.gradle]
indent_size = 4

[{*.markdown,*.md}]
indent_size = 4

[*.py]
indent_size = 4

[*.toml]
indent_size = 4

[{*.js,*.ts,*.ts.in}]
max_line_length = 80

[*.sh]
indent_size = 4

[*.swift]
indent_size = 4

[Makefile]
indent_style = tab
indent_size = 4
4 changes: 2 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ acknowledgments/acknowledgments.* -merge -text
acknowledgments/acknowledgments.*.hbs merge text=auto

# Treat encrypted and unencrypted message backup files as binary
*.binproto binary
*.binproto.encrypted binary
**/*.binproto binary
**/*.binproto.encrypted binary
124 changes: 93 additions & 31 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ env:
NDK_VERSION: 25.2.9519653
RUST_BACKTRACE: 1
LIBSIGNAL_MINIMUM_SUPPORTED_RUST_VERSION: 1.72
# For dev builds, include limited debug info in the output. See
# https://doc.rust-lang.org/cargo/reference/profiles.html#debug
CARGO_PROFILE_DEV_DEBUG: limited

jobs:
changes:
Expand All @@ -30,7 +33,9 @@ jobs:
rust_ios: ${{ steps.filter.outputs.rust_ios }}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: recursive

- uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0
id: filter
Expand Down Expand Up @@ -80,6 +85,8 @@ jobs:
- '.github/workflows/**'
- '.gitignore'
- '.gitattributes'
- '.editorconfig'
- 'justfile'

- name: Check pattern completeness
run: echo "::error file=.github/workflows/build_and_test.yml::File not included in any filter" && false
Expand All @@ -101,32 +108,47 @@ jobs:
include:
- version: nightly
toolchain: "$(cat rust-toolchain)"
cargo-keep-going: "--keep-going"
- version: stable
toolchain: "${LIBSIGNAL_MINIMUM_SUPPORTED_RUST_VERSION}"
# Remove this switch once our MSRV is at least 1.74, which stablilized the --keep-going flag.
cargo-keep-going: ""

timeout-minutes: 45

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: recursive

- run: sudo apt-get update && sudo apt-get install protobuf-compiler

- run: rustup toolchain install ${{ matrix.toolchain }} --profile minimal --component rustfmt,clippy

- name: Cache locally-built tools
uses: actions/cache@v4
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
with:
path: local-tools
key: ${{ runner.os }}-local-tools-${{ matrix.version }}-${{ hashFiles('acknowledgments/cargo-about-version') }}
key: ${{ runner.os }}-local-tools-${{ matrix.version }}-${{ hashFiles('acknowledgments/cargo-about-version', '.taplo-cli-version') }}

- name: Build cargo-about if needed
run: cargo +stable install --version $(cat acknowledgments/cargo-about-version) --locked cargo-about --root local-tools
if: matrix.version == 'nightly'

- name: Build taplo-cli if needed
run: cargo +stable install --version $(cat .taplo-cli-version) --locked taplo-cli --root local-tools
if: matrix.version == 'nightly'

# This should be done before anything else
# because it also checks that the lockfile is up to date.
- name: Check for duplicate dependencies
run: ./bin/verify_duplicate_crates
if: matrix.version == 'nightly'

- name: Cargo.toml formatting check
run: PATH="$PATH:$PWD/local-tools/bin" taplo format -c .taplo.toml --check
if: matrix.version == 'nightly'

- name: Rustfmt check
run: cargo fmt --all -- --check
if: matrix.version == 'nightly'
Expand All @@ -151,39 +173,52 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Build
run: cargo +${{ matrix.toolchain }} build --workspace --features libsignal-ffi/signal-media --verbose
run: cargo +${{ matrix.toolchain }} build --workspace --features libsignal-ffi/signal-media --verbose ${{ matrix.cargo-keep-going }}

- name: Run tests
run: cargo +${{ matrix.toolchain }} test --workspace --all-features --verbose -- --include-ignored
run: cargo +${{ matrix.toolchain }} test --workspace --all-features --verbose --no-fail-fast -- --include-ignored

- name: Test run benches
run: cargo +${{ matrix.toolchain }} test --workspace --benches --all-features --verbose
run: cargo +${{ matrix.toolchain }} test --workspace --benches --all-features --verbose --no-fail-fast

- name: Build bins and examples
run: cargo +${{ matrix.toolchain }} build --workspace --bins --examples --all-features --verbose
run: cargo +${{ matrix.toolchain }} build --workspace --bins --examples --all-features --verbose ${{ matrix.cargo-keep-going }}

- name: Clippy
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
run: cargo clippy --workspace --all-targets --all-features ${{ matrix.cargo-keep-going }} -- -D warnings
if: matrix.version == 'nightly'

- name: cargo clean (reclaim disk space)
# Clean the contents of the target directory to avoid running out of disk space during the
# doc build.
run: cargo clean
if: matrix.version == 'stable'

- name: Rust docs
run: cargo doc --workspace --all-features
run: cargo +${{ matrix.toolchain }} doc --workspace --all-features ${{ matrix.cargo-keep-going }}
if: matrix.version == 'stable'
env:
RUSTFLAGS: -D warnings

# We check the fuzz targets on stable because they don't have lockfiles,
# and crates don't generally support arbitrary nightly versions.
# See https://github.com/dtolnay/proc-macro2/issues/307 for an example.

- name: cargo clean (reclaim disk space)
# Clean the contents of the target directory to avoid running out of disk space during the
# following steps.
run: cargo clean
if: matrix.version == 'stable'

- name: Check that the protocol fuzz target still builds
run: cargo +${{ matrix.toolchain }} check --all-targets
run: cargo +${{ matrix.toolchain }} check --all-targets ${{ matrix.cargo-keep-going }}
working-directory: rust/protocol/fuzz
env:
RUSTFLAGS: --cfg fuzzing
if: matrix.version == 'stable'

- name: Check that the attest fuzz target still builds
run: cargo +${{ matrix.toolchain }} check --all-targets
run: cargo +${{ matrix.toolchain }} check --all-targets ${{ matrix.cargo-keep-going }}
working-directory: rust/attest/fuzz
env:
RUSTFLAGS: --cfg fuzzing
Expand All @@ -208,16 +243,20 @@ jobs:
- version: stable
toolchain: "${LIBSIGNAL_MINIMUM_SUPPORTED_RUST_VERSION}"

timeout-minutes: 45

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: recursive

- run: sudo apt-get update && sudo apt-get install gcc-multilib g++-multilib protobuf-compiler

- run: rustup toolchain install ${{ matrix.toolchain }} --profile minimal --target i686-unknown-linux-gnu

- name: Run tests (32-bit)
# Exclude signal-neon-futures because those tests run Node
run: cargo +${{ matrix.toolchain }} test --workspace --all-features --verbose --target i686-unknown-linux-gnu --exclude signal-neon-futures -- --include-ignored
run: cargo +${{ matrix.toolchain }} test --workspace --all-features --verbose --target i686-unknown-linux-gnu --exclude signal-neon-futures --no-fail-fast -- --include-ignored

java:
name: Java
Expand All @@ -233,9 +272,14 @@ jobs:

if: ${{ needs.changes.outputs.java == 'true' }}

timeout-minutes: 45

steps:
- uses: actions/checkout@v4
- run: echo "JAVA_HOME=$JAVA_HOME_17_X64" >> "$GITHUB_ENV"

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: recursive
# Download all commits so we can search for the merge base with origin/main.
fetch-depth: 0

Expand All @@ -255,7 +299,7 @@ jobs:
- name: Verify that the JNI bindings are up to date
run: rust/bridge/jni/bin/gen_java_decl.py --verify

- run: ./gradlew build assembleDebugAndroidTest android:lintDebug | tee ./gradle-output.txt
- run: ./gradlew build assembleDebugAndroidTest android:lintDebug -PandroidArchs=arm,arm64 -PandroidTestingArchs=x86_64 | tee ./gradle-output.txt
working-directory: java
shell: bash # Explicitly setting the shell turns on pipefail in GitHub Actions

Expand All @@ -280,8 +324,12 @@ jobs:

if: ${{ needs.changes.outputs.node == 'true' }}

timeout-minutes: 45

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: recursive

- run: rustup toolchain install $(cat rust-toolchain) --profile minimal

Expand All @@ -300,7 +348,7 @@ jobs:
- run: brew install protobuf
if: matrix.os == 'macos-latest'

- uses: actions/setup-node@v4
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: '.nvmrc'

Expand All @@ -311,6 +359,9 @@ jobs:
- run: yarn install --frozen-lockfile
working-directory: node

- run: yarn node-gyp rebuild
working-directory: node

- run: yarn tsc
working-directory: node

Expand All @@ -334,50 +385,62 @@ jobs:

if: ${{ needs.changes.outputs.swift == 'true' }}

timeout-minutes: 45

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: recursive

- run: rustup toolchain install $(cat rust-toolchain) --profile minimal

- run: sudo apt-get update && sudo apt-get install protobuf-compiler

- run: swift/verify_error_codes.sh

- name: Build libsignal-ffi
run: swift/build_ffi.sh -d -v --verify-ffi

- name: Build Swift and run tests
run: swift test -v
working-directory: swift

- name: Build and run Swift benchmarks (in debug mode)
run: swift run -v Benchmarks --allow-debug-build
working-directory: swift/Benchmarks

- name: Build Swift package documentation
run: swift package plugin generate-documentation --analyze --warnings-as-errors
working-directory: swift

swift_cocoapod:
name: Swift CocoaPod

runs-on: macOS-latest
runs-on: macOS-12

needs: changes

if: ${{ needs.changes.outputs.swift == 'true' }}

timeout-minutes: 45

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: recursive

- run: brew install protobuf swiftlint

- name: Check formatting
run: swiftformat --swiftversion 5 --reporter github-actions-log --lint .
working-directory: swift

- name: Run lint
run: swiftlint lint --strict --reporter github-actions-logging
working-directory: swift

- name: Check out SignalCoreKit
uses: actions/checkout@v4
with:
repository: signalapp/SignalCoreKit
path: SignalCoreKit

- run: rustup toolchain install $(cat rust-toolchain) --profile minimal --target x86_64-apple-ios,aarch64-apple-ios-sim

- run: brew install protobuf

# Build only the targets that `pod lib lint` will test building.
- name: Build for x86_64-apple-ios
run: swift/build_ffi.sh --release
Expand All @@ -390,5 +453,4 @@ jobs:
CARGO_BUILD_TARGET: aarch64-apple-ios-sim

- name: Run pod lint
# No import validation because it tries to build unsupported platforms (like 32-bit iOS).
run: pod lib lint --verbose --platforms=ios --include-podspecs=SignalCoreKit/SignalCoreKit.podspec --skip-import-validation
run: pod lib lint --verbose --platforms=ios
Loading
Loading