Skip to content

Commit

Permalink
Add friend UI different (#118)
Browse files Browse the repository at this point in the history
* πŸ”„ "Real world testing (#35)

* fix install script

* fix even more install things"
Update anysphere/client commit SHA
πŸ”— 0126583

* πŸ”„ "add story to public id response
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@6dbadec

* πŸ”„ "Public identifier (#38)

* implement base58

* implement identifier

* πŸ”„ "implement identifier
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@15117f2"
Update anysphere/client commit SHA
πŸ”— 67a91f0

* πŸ”„ "Public identifier (#18)

* add identifier.proto

* implement base58

* implement identifier"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@f8a52a0

* Let the ID of the selectable list be a number or string

* πŸ”„ "Merge branch 'main' into friends
"
Update anysphere/client commit SHA
πŸ”— 7944dd5

* πŸ”„ "Merge branch 'main' into friends
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@b4b457d

* πŸ”„ " Implement friend acking (#21)

* update message.proto with control message

* handle control message properly

* check for ack of control message"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@5cdc265

* πŸ”„ " Implement friend acking (#41)

* update message.proto with control message

* πŸ”„ "update message.proto with control message
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@e92e27b

* handle control message properly

* πŸ”„ "handle control message properly
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@420185b

* check for ack of control message

* πŸ”„ "check for ack of control message
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@fd692ae

* normal message shall not be control message

* make compile (almost)"
Update anysphere/client commit SHA
πŸ”— b607bfc

* Async friending schema (#108)

* rename kx_key

* πŸ”„ "rename kx_key
"
Update anysphere/client commit SHA
πŸ”— aec1b8b

* rewrite crypto in the new protocol

* πŸ”„ "rewrite crypto in the new protocol
"
Update anysphere/client commit SHA
πŸ”— fdcafcd

* πŸ”„ "rewrite crypto in the new protocol
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@49b488b

* DB change complete

* πŸ”„ "DB change complete
"
Update anysphere/client commit SHA
πŸ”— 1b6e9bf

* πŸ”„ "redesign daemon schema
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@96073e4

* πŸ”„ "fix typo
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@1b0185f

* πŸ”„ "add story to sync friend request
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@0485f68

* configure server for async requests

* πŸ”„ "configure server for async requests
"
Update anysphere/client commit SHA
πŸ”— 5b360b9

* πŸ”„ "configure server for async requests
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@a0458e2

* πŸ”„ "add public_id to database
"
Update anysphere/client commit SHA
πŸ”— da589ea

* πŸ”„ "check point. Most of the code compiles
"
Update anysphere/client commit SHA
πŸ”— e5d3588

* πŸ”„ "checkpoint. All programs build
"
Update anysphere/client commit SHA
πŸ”— 757fe13

* checkpoint: rewriting test files

* πŸ”„ "checkpoint: rewriting test files
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@b60891f

* πŸ”„ "merge arvid's friend branch
"
Update anysphere/client commit SHA
πŸ”— 75dbc77

* πŸ”„ "Merge remote-tracking branch 'origin/friends' into async_friending_schema
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@b56fda2

* πŸ”„ "checkpoint in merging friend
"
Update anysphere/client commit SHA
πŸ”— 1f391d5

* checkpoint in merging friend

* weird bug. debugging

* πŸ”„ "weird bug. debugging
"
Update anysphere/client commit SHA
πŸ”— 7da1032

* mystery bug resolve. Do not call set_allocated()

* πŸ”„ "mystery bug resolve. Do not call set_allocated()
"
Update anysphere/client commit SHA
πŸ”— 8b247bd

* πŸ”„ "checkpoint: another bug
"
Update anysphere/client commit SHA
πŸ”— 2ec90a8

* update workspace

* πŸ”„ "add linkstatic
"
Update anysphere/client commit SHA
πŸ”— 38ce866

* finally builds correctly

* πŸ”„ "finally builds correctly
"
Update anysphere/client commit SHA
πŸ”— 46ce1bd

* checkpoint: use standard logging

* πŸ”„ "checkpoint: use standard logging
"
Update anysphere/client commit SHA
πŸ”— a90e0b0

* add friend workinggit ca add

* πŸ”„ "add friend workinggit ca add
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@c64027e

* πŸ”„ "Merge branch 'friends' into async_friending_schema"
Update anysphere/client commit SHA
πŸ”— 5b23eb9

* πŸ”„ "Merge remote-tracking branch 'origin/friends' into async_friending_schema
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@45a1a19

* merging friends and async_friend_request

* πŸ”„ "add outgoing_friend_request
"
Update anysphere/client commit SHA
πŸ”— e37a115

* fix fast test

* πŸ”„ "remove comment from crypto'
"
Update anysphere/client commit SHA
πŸ”— 737c86c

* πŸ”„ "fix bug in crypto
"
Update anysphere/client commit SHA
πŸ”— 65e51dd

* fix bug

* πŸ”„ "fix bug
"
Update anysphere/client commit SHA
πŸ”— 294d04b

* πŸ”„ "fix daemonrpc bug
"
Update anysphere/client commit SHA
πŸ”— 9177252

* πŸ”„ "add identifier
"
Update anysphere/client commit SHA
πŸ”— 2a32e5c

* πŸ”„ "Merge remote-tracking branch 'origin/async_friending_schema' into async_friending_schema
"
Update anysphere/client commit SHA
πŸ”— 3700ab7

Co-authored-by: Shengtong Zhang <[email protected]>

* πŸ”„ "Async friending schema (#36)

* rename kx_key

* rewrite crypto in the new protocol

* πŸ”„ "rewrite crypto in the new protocol
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@49b488b

* DB change complete

* πŸ”„ "redesign daemon schema
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@96073e4

* πŸ”„ "fix typo
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@1b0185f

* πŸ”„ "add story to sync friend request
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@0485f68

* configure server for async requests

* πŸ”„ "configure server for async requests
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@a0458e2

* add public_id to database

* check point. Most of the code compiles

* checkpoint. All programs build

* checkpoint: rewriting test files

* πŸ”„ "checkpoint: rewriting test files
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@b60891f

* πŸ”„ "Merge remote-tracking branch 'origin/friends' into async_friending_schema
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@b56fda2

* checkpoint in merging friend

* weird bug. debugging

* mystery bug resolve. Do not call set_allocated()

* checkpoint: another bug

* update workspace

* add linkstatic

* finally builds correctly

* checkpoint: use standard logging

* add friend workinggit ca add

* πŸ”„ "add friend workinggit ca add
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@c64027e

* πŸ”„ "Merge remote-tracking branch 'origin/friends' into async_friending_schema
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@45a1a19

* add outgoing_friend_request

* remove comment from crypto'

* fix bug in crypto

* fix bug

* fix daemonrpc bug

* add identifier

* correct mistake in key exchange

Co-authored-by: Shengtong Zhang <[email protected]>"
Update anysphere/client commit SHA
πŸ”— 4f97e12

* πŸ”„ "Async friending schema (#22)

* configure server for async requests

* checkpoint: rewriting test files

* add friend workinggit ca add

Co-authored-by: Shengtong Zhang <[email protected]>"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@a0a42dc

* πŸ”„ "remove rust warning
"
Update anysphere/client commit SHA
πŸ”— 0ebd6d3

* fix tests

* change api

* πŸ”„ "change api
"
Update anysphere/client commit SHA
πŸ”— 293509d

* update protos

* πŸ”„ "update protos
"
Update anysphere/client commit SHA
πŸ”— b518cc0

* add sync test

* πŸ”„ "add sync test
"
Update anysphere/client commit SHA
πŸ”— b3c8ddb

* πŸ”„ "add sync test
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@6f74e52

* πŸ”„ "push without compile
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@e0bbbc1

* make compile

* πŸ”„ "make compile
"
Update anysphere/client commit SHA
πŸ”— 3469f6b

* πŸ”„ "some things only if registered
"
Update anysphere/client commit SHA
πŸ”— b887016

* use enums instead of integer constants

* πŸ”„ "use enums instead of integer constants
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@b54435f

* πŸ”„ "it builds!
"
Update anysphere/client commit SHA
πŸ”— d7e9c33

* everything builds

* πŸ”„ "daemon.protoo changes
"
Update anysphere/client commit SHA
πŸ”— 6e6f0b9

* πŸ”„ "daemon.protoo changes
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@785fc95

* update daemon-js protos

* πŸ”„ "update daemon-js protos
"
Update anysphere/client commit SHA
πŸ”— be4c41f

* daemon.proto has been fully sualeh-ified

* πŸ”„ "daemon.proto has been fully sualeh-ified
"
Update anysphere/client commit SHA
πŸ”— ef1e014

* add vsls

* async partitions and a basic test passes

* πŸ”„ "async partitions and a basic test passes
"
Update anysphere/client commit SHA
πŸ”— ced8449

* πŸ”„ "async partitions and a basic test passes
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@e32c1b6

* some questions about how to handle name of requests

* πŸ”„ "update proto. time for disaster to happen. Gooddddd luck
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@778e942

* πŸ”„ "update protos. We are good.
"
Update anysphere/client commit SHA
πŸ”— 33e39f7

* πŸ”„ "update protos. We are good.
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@e0d9a9d

* update protos for Invitation Progres

* πŸ”„ "update protos for Invitation Progres
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@32a45d0

* fix tests

* πŸ”„ "fix tests
"
Update anysphere/client commit SHA
πŸ”— 8120b25

* replace friend_request -> invitation on server

* πŸ”„ "replace friend_request -> invitation on server
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@7cf56b7

* added test for people being in different blocks

* πŸ”„ "added test for people being in different blocks
"
Update anysphere/client commit SHA
πŸ”— dd95b76

* commit tests

* πŸ”„ "Merge branch 'friends' into sualeh/add-friend-ui
"
Update anysphere/client commit SHA
πŸ”— 6b4e2d2

* update protos for the ts

* πŸ”„ "update protos for the ts
"
Update anysphere/client commit SHA
πŸ”— 5673a44

* all relevant APIs for contextBridge are implemented.

* πŸ”„ "all relevant APIs for contextBridge are implemented.
"
Update anysphere/client commit SHA
πŸ”— a6bb514

* πŸ”„ "Friends implementation (#42)

* merge friends

* πŸ”„ "change to system message
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@4415feb

* make transmitter use the new db types

* finish transmitter changes

* it builds

* πŸ”„ "it builds
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@209b037

* it builds!

* it builds!

* outgoing async and sync now done

* it builds!

* it builds!

* it builds!

* it builds!

* it builds!

* it builds!

* it builds!

* fix warnings

* add check_rep

* some changes with errors

* make build

* initial tests passing!!!

* πŸ”„ "initial tests passing!!!
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@cd37145"
Update anysphere/client commit SHA
πŸ”— 3abbdb6

* πŸ”„ "Friends implementation (#23)

* change to system message

* it builds

* initial tests passing!!!"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@f5f22e7

* πŸ”„ "fix bug!
"
Update anysphere/client commit SHA
πŸ”— 6a547de

* πŸ”„ "add more check_rep consistency constraints
"
Update anysphere/client commit SHA
πŸ”— ab0bdf2

* πŸ”„ "more checkrep!
"
Update anysphere/client commit SHA
πŸ”— b72388b

* revamp crypto

* πŸ”„ "revamp crypto
"
Update anysphere/client commit SHA
πŸ”— 7a2356d

* πŸ”„ "revamp crypto
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@a156ca9

* πŸ”„ "add even more check_rep
"
Update anysphere/client commit SHA
πŸ”— 999a256

* πŸ”„ "more checkrep!!! i love checkrep
"
Update anysphere/client commit SHA
πŸ”— f7bf199

* πŸ”„ "Merge remote-tracking branch 'origin/friends' into friends
"
Update anysphere/client commit SHA
πŸ”— 86d93a9

* πŸ”„ "typescript now has no type errors
"
Update anysphere/client commit SHA
πŸ”— d1ca953

* πŸ”„ "many more check rep
"
Update anysphere/client commit SHA
πŸ”— cd61b82

* πŸ”„ "add check_rep comment
"
Update anysphere/client commit SHA
πŸ”— 06a7825

* πŸ”„ "update comment
"
Update anysphere/client commit SHA
πŸ”— f91ae43

* πŸ”„ "even more checkreppp
"
Update anysphere/client commit SHA
πŸ”— bb9c86e

* πŸ”„ "Merge branch 'friends' into sualeh/add-friend-ui
"
Update anysphere/client commit SHA
πŸ”— 06b0f56

* πŸ”„ "even more checkrep
"
Update anysphere/client commit SHA
πŸ”— 826873c

* πŸ”„ "update a TON of dependencies to latest commits.
"
Update anysphere/client commit SHA
πŸ”— 180728d

* add a few anyhow errors

* πŸ”„ "Merge remote-tracking branch 'origin/friends' into friends
"
Update anysphere/client commit SHA
πŸ”— dcd6d85

* πŸ”„ "update daemon_pb.js
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@0b02484

* test passes

* πŸ”„ "test passes
"
Update anysphere/client commit SHA
πŸ”— fcb30e4

* πŸ”„ "rules_proto_grpc doesnt build off master??
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@e8a3578

* πŸ”„ "story Component
"
Update anysphere/client commit SHA
πŸ”— 05b7b35

* πŸ”„ "story component update to use numberOfLines
"
Update anysphere/client commit SHA
πŸ”— 13fe103

* update readme

* πŸ”„ "update readme
"
Update anysphere/client commit SHA
πŸ”— 3ce2f53

* πŸ”„ "add story command
"
Update anysphere/client commit SHA
πŸ”— bc3094e

* πŸ”„ "update with a real story
"
Update anysphere/client commit SHA
πŸ”— 2112930

* πŸ”„ "different ui
"
Update anysphere/client commit SHA
πŸ”— 5916320

* πŸ”„ "fix all old UI
"
Update anysphere/client commit SHA
πŸ”— a255dc7

* πŸ”„ "reformat
"
Update anysphere/client commit SHA
πŸ”— a67e68a

* πŸ”„ "each other
"
Update anysphere/client commit SHA
πŸ”— aaed08e

* new commits

* πŸ”„ "add rng
"
Update anysphere/client commit SHA
πŸ”— 83e915e

* πŸ”„ "add eslint
"
Update anysphere/client commit SHA
πŸ”— 71819e0

* πŸ”„ "add eslint-react
"
Update anysphere/client commit SHA
πŸ”— 1aaf046

* πŸ”„ "copy daemon
"
Update anysphere/client commit SHA
πŸ”— 8bb4c9b

* πŸ”„ "copy schema
"
Update anysphere/client commit SHA
πŸ”— 96df23e

* πŸ”„ "Merge branch 'main' into add-friend-ui-different"
Update anysphere/client commit SHA
πŸ”— 0feb1ab

* πŸ”„ "Merge branch 'main' into add-friend-ui-different"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@7017ebe

* πŸ”„ "fix things
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@6323fdd

* πŸ”„ "fix things
"
Update anysphere/client commit SHA
πŸ”— d334c83

* copy over server

* fix integration_tests

* more resets

* remove file

* add newline

* update daemon proto

* πŸ”„ "update daemon proto
"
Update anysphere/client commit SHA
πŸ”— 69f52e7

* add framer motion

* πŸ”„ "add framer motion
"
Update anysphere/client commit SHA
πŸ”— e9ee3bc

* πŸ”„ "add preliminary animation
"
Update anysphere/client commit SHA
πŸ”— b8c6dcc

* πŸ”„ "no blur
"
Update anysphere/client commit SHA
πŸ”— b09ae37

* πŸ”„ "big circles
"
Update anysphere/client commit SHA
πŸ”— eace34c

* πŸ”„ "small css changes
"
Update anysphere/client commit SHA
πŸ”— 882fd72

* πŸ”„ "make eslint less annoying
"
Update anysphere/client commit SHA
πŸ”— f70d401

* πŸ”„ "fix duration bugs
"
Update anysphere/client commit SHA
πŸ”— ec875bb

* πŸ”„ "fully implement addsyncfriend
"
Update anysphere/client commit SHA
πŸ”— d535a91

* πŸ”„ "initial async page
"
Update anysphere/client commit SHA
πŸ”— 52225fe

* πŸ”„ "able to send to outgoing friend in the UI
"
Update anysphere/client commit SHA
πŸ”— 8757dd9

* πŸ”„ "remove autofocus
"
Update anysphere/client commit SHA
πŸ”— 3030ec7

* add add gui cmd

* πŸ”„ "add add gui cmd
"
Update anysphere/client commit SHA
πŸ”— c99e2ac

* npm install

* fix db problems

* πŸ”„ "fix db problems
"
Update anysphere/client commit SHA
πŸ”— 62315f3

* fix streaming problems and add a regression test

* fix the streaming test finally!

* πŸ”„ "fix streaming problems and add a regression test
"
Update anysphere/client commit SHA
πŸ”— f89f4b6

* the death test finally works

* πŸ”„ "remove todo
"
Update anysphere/client commit SHA
πŸ”— 33e39cc

* πŸ”„ "fix type problems
"
Update anysphere/client commit SHA
πŸ”— b2e0592

* πŸ”„ "fix the UI
"
Update anysphere/client commit SHA
πŸ”— 5a3a345

* πŸ”„ "run trunk fmt
"
Update anysphere/client commit SHA
πŸ”— 4bf9547

* πŸ”„ "clean up preload
"
Update anysphere/client commit SHA
πŸ”— 51e2e69

* πŸ”„ "fix the type of the daemon api in preload.ts
"
Update anysphere/client commit SHA
πŸ”— 7381fb5

* πŸ”„ "use registerUser not register
"
Update anysphere/client commit SHA
πŸ”— 259dbea

* πŸ”„ "fix access key form box
"
Update anysphere/client commit SHA
πŸ”— 901e61e

* πŸ”„ "fix missing return type
"
Update anysphere/client commit SHA
πŸ”— 9fcfa1e

* πŸ”„ "fix more eslint errors
"
Update anysphere/client commit SHA
πŸ”— e55275d

* πŸ”„ "add update-rust-project script
"
Update anysphere/client commit SHA
πŸ”— 214ed0a

* πŸ”„ "busy timeout!
"
Update anysphere/client commit SHA
πŸ”— ac3be62

* πŸ”„ "fix trunk fmt
"
Update anysphere/asphr commit SHA
πŸ”— anysphere/asphr@6ccc8a4

* πŸ”„ "getcolor string
"
Update anysphere/client commit SHA
πŸ”— 9b701ca

* πŸ”„ "remove trunk linters
"
Update anysphere/client commit SHA
πŸ”— 23b8037

* πŸ”„ "explain animations
"
Update anysphere/client commit SHA
πŸ”— a4666e2

* πŸ”„ "add comment:
"
Update anysphere/client commit SHA
πŸ”— c637d1d

* πŸ”„ "add seed log
"
Update anysphere/client commit SHA
πŸ”— b56b149

* πŸ”„ "sort the array
"
Update anysphere/client commit SHA
πŸ”— fd98b5f

* πŸ”„ "fix spaces between sentences
"
Update anysphere/client commit SHA
πŸ”— 3b6eefe

* πŸ”„ "remove stupid at most 1 friend debugging thing
"
Update anysphere/client commit SHA
πŸ”— 3b43922

* πŸ”„ "refactor the story list component
"
Update anysphere/client commit SHA
πŸ”— 3506557

* πŸ”„ "add unimplemented method
"
Update anysphere/client commit SHA
πŸ”— c1386a0

* πŸ”„ "remove legacy friend
"
Update anysphere/client commit SHA
πŸ”— 0ce5826

Co-authored-by: Sualeh Asif <[email protected]>
Co-authored-by: Shengtong Zhang <[email protected]>
Co-authored-by: Sualeh Asif <[email protected]>
  • Loading branch information
4 people authored Jul 12, 2022
1 parent 4d63209 commit 3951bb9
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ build --repo_env=RULES_RUST_TOOLCHAIN_INCLUDE_RUSTC_SRCS=true
try-import %workspace%/.user.bazelrc

# setting up remote caching
# build --bes_results_url=https://app.buildbuddy.io/invocation/
# build --bes_backend=grpcs://remote.buildbuddy.io
# build --remote_cache=grpcs://remote.buildbuddy.io
# build --remote_upload_local_results
# build --remote_timeout=3600
#build --bes_results_url=https://app.buildbuddy.io/invocation/
#build --bes_backend=grpcs://remote.buildbuddy.io
#build --remote_cache=grpcs://remote.buildbuddy.io
#build --remote_upload_local_results
#build --remote_timeout=3600
# build --experimental_remote_cache_compression
# build --experimental_remote_cache_async
# build --remote_download_toplevel
Expand Down
4 changes: 2 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

git_repository(
name = "asphr",
commit = "27c4710f38add042030e01867c3e0a6f8a8199a3", # autoupdate anysphere/asphr
commit = "6ccc8a4cf8502de4a6d78beaf34f833d4bec598e", # autoupdate anysphere/asphr
init_submodules = True,
remote = "https://github.com/anysphere/asphr.git",
)
Expand Down Expand Up @@ -39,7 +39,7 @@ setup_asphr("@asphr")

git_repository(
name = "client",
commit = "b014cf1c7e62c4896c5d4d3600f9cff31cd7ec27", # autoupdate anysphere/client
commit = "0ce5826883bcc9b4dd7956091bd3bf0d19970e34", # autoupdate anysphere/client
init_submodules = True,
remote = "https://github.com/anysphere/client.git",
)
Expand Down
55 changes: 55 additions & 0 deletions integration_tests/daemon_tests/daemon_stream_messages_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,61 @@
namespace asphr::testing {
namespace {

using DaemonRpcDeathTest = DaemonRpcTest;

// regression test
TEST_F(DaemonRpcDeathTest, StreamMessagesWithoutAnyMessages) {
ResetStub();

GTEST_FLAG_SET(death_test_style, "threadsafe");

ASSERT_DEATH(
{
auto v = register_people(1);
auto friend1 = std::move(v.at(0));

const int rpc1_port = absl::Uniform(bitgen_, 10'000, 65'000);
std::ostringstream rpc1_addr;
rpc1_addr << "localhost:" << rpc1_port;
grpc::ServerBuilder builder;
builder.AddListeningPort(rpc1_addr.str(),
grpc::InsecureServerCredentials());
builder.RegisterService(&(*friend1.rpc));
auto rpc1_server = builder.BuildAndStart();
std::shared_ptr<grpc::Channel> rpc1_channel = grpc::CreateChannel(
rpc1_addr.str(), grpc::InsecureChannelCredentials());
auto rpc1_stub = asphrdaemon::Daemon::NewStub(rpc1_channel);

auto did_unblock = false;

// launch a thread
std::thread t([&]() {
GetMessagesRequest request;
request.set_filter(GetMessagesRequest::ALL);
grpc::ClientContext context;
auto stream = rpc1_stub->GetMessagesStreamed(&context, request);
GetMessagesResponse response;
stream->Read(&response);
stream->Read(&response);
did_unblock = true;
});
cout << "waiting for thread to block" << endl;

// wait for 5 seconds
std::this_thread::sleep_for(std::chrono::seconds(5));
if (did_unblock) {
// bad case β€” the thread is not stalling, which is very very bad...
// there are no messages so we shouldn't receive any messages!!
t.join();
return;
} else {
// good case β€” the thread is stalling, which is just what we want!
std::terminate();
}
},
"");
}

TEST_F(DaemonRpcTest, StreamMessages) {
ResetStub();

Expand Down
2 changes: 1 addition & 1 deletion research/whitepaper

0 comments on commit 3951bb9

Please sign in to comment.