Roll Abseil and QUICHE

QUICHE needs to be rolled to Open Screen in order to permit removing the
obsolete QuicSession::CreateIncomingStream() method.

The new version of QUICHE requires absl::down_cast, so Abseil needs to
be rolled to permit QUICHE to be rolled.

The new version of Abseil no longer includes a definition of memcpy()
in string_view.h, which makes compilation fail on GCC with older
versions of QUICHE. For this reason, QUICHE and Abseil need to be
updated in the same CL.

Roll third_party/quiche/src/ d54ca111b..a849d35c9 (299 commits)

https://quiche.googlesource.com/quiche.git/+log/d54ca111b108..a849d35c908d

$ git log d54ca111b..a849d35c9 --date=short --no-merges --format='%ad %ae %s'
2026-05-07 ianswett Update CWND calculations to match the latest BBR draft. https://www.ietf.org/archive/id/draft-ietf-ccwg-bbr-05.html
2026-05-07 rch No public description
2026-05-06 ricea Temporarily add a dummy definition of CreateIncomingStream() to quic::QuicSession
2026-05-06 haoyuewang Increase the QUIC_BUG threshold.
2026-05-06 vasilvv Add functions to interop between absl::Cord and QuicheMemSlice.
2026-05-05 rch No public description
2026-05-04 rch Deprecate QUIC reloadable flag quic_close_connection_on_underflow.
2026-05-04 vasilvv Rewrite MOQT control message parser.
2026-05-02 ianswett Update BBR3 to more closely align with the BBRv3 draft.
2026-05-01 ianswett Remove tests for the deprecated kB201 connection option from BBR2 and BBR3 simulator tests.
2026-04-29 ianswett Enable gfe2_reloadable_flag_quic_reject_empty_cid_in_ncid in Chrome.
2026-04-29 ianswett Deprecate gfe2_reloadable_flag_quic_no_path_degrading_before_handshake_confirmed.
2026-04-28 ripere Add gzip response decompression support to Masque OHTTP client.
2026-04-28 dschinazi MasqueOhttpClient: Print chunked body to stdout
2026-04-27 dschinazi Deprecate quic_stop_sending_legacy_version_info and quic_stop_parsing_legacy_version_info
2026-04-27 ianswett BBR3: Update startup pacing gain, drain gain, and max ack height window to match the BBR IETF draft: https://datatracker.ietf.org/doc/draft-ietf-ccwg-bbr/
2026-04-23 rch Additional PendingStream cleanup * Remove unused constructors * Pass PendingStream by reference in CreateIncomingStream
2026-04-23 rch Remove unused QuicSession::CreateIncomingStream(PendingStream*). Remove overrides in subclasses which considered it an error to call this method. Move from override to virtual in those subclasses which actually use this method.
2026-04-22 wub No public description
2026-04-22 rch Refactor QuicSession PendingStream methods to take references.
2026-04-22 ianswett Refactor: Cache Bbr2DebugState in simulator tests.
2026-04-22 rch Refactor QuicStream constructor to take PendingStream by reference.
2026-04-21 martinduke Allow MoqtClient and MoqtServer to control session parameters.
2026-04-21 martinduke Move some non-message-related data structures out of moqt_messages.h
2026-04-21 ianswett Refactor BBR2/BBR3 initialization and inline some methods.
2026-04-21 rch Convert quic::PendingStream constructor to take QuicSession reference.
2026-04-20 ianswett Refactor BBR2/BBR3 parameters by moving kDefaultMinimumCongestionWindow and kInitialPacingGain into Bbr2Params.
2026-04-20 quiche-dev Add ohttp_ping_pong_mode_{gateway_name} to test ping-pong interactive chunking. It guarantees there is no buffering between the client and server, bidirectionally.
2026-04-20 ianswett Refactor: Extract DebugState from Bbr2Sender and Bbr3Sender to a common header.
2026-04-20 martinduke Get rid of moqt::SubscribeWindow.
2026-04-20 ianswett Refactor and simplify BBR3.
2026-04-20 quiche-dev Add support for sending OHTTP request bodies in multiple chunks.
2026-04-17 ianswett Branch Bbr2Sender to create Bbr3Sender and no long have modes extend from Bbr2ModeBase.
2026-04-16 martinduke Permanently cancel subgroups if the stream has STOP_SENDING.
2026-04-16 haoyuewang QUIC_BUG on the size of connection_state_map_.
2026-04-16 ianswett Move Bbr2ProbeBwMode::CyclePhase to bbr2_misc.h and rename it to ProbePhase.
2026-04-15 reubent Reset streams which surpass MAX_HEADER_LIST_SIZE
2026-04-15 ianswett Deprecate --gfe2_reloadable_flag_quic_send_connection_close_on_max_age.
2026-04-14 birenroy Enabling rolled out flags.
2026-04-14 martinduke Deprecate gfe2_reloadable_flag_quic_disconnect_early_exit.
2026-04-14 vasilvv Merge QuicStreamSendBufferBase into QuicStreamSendBufferInlining.
2026-04-14 martinduke Limit Joining FETCH to largest_object at time of SUBSCRIBE.
2026-04-13 dmcardle Deprecate MASQUE PerRequestConfig::SetExpectedEncapsulatedResponseBody()
2026-04-10 dmcardle Add encapsulated response body callback to MASQUE client's PerRequestConfig
2026-04-10 ripere Add `num_ohttp_chunks` flag and remove `chunked` flag.
2026-04-10 ripere Add `num_bhttp_chunks` flag and remove `indeterminate_length` flag.
2026-04-10 ianswett Reject NEW_CONNECTION_ID frames with empty connection IDs and close the connection, per RFC9000.  Based on cr/896368856
2026-04-10 wub No public description
2026-04-09 reubent Enforce a limit on the amount of total, uncompressed header bytes
2026-04-09 dschinazi Improve connection logging in OHTTP toy client
(...)
2026-01-15 ripere Refactor HttpHeaderBlock tests to use const-qualified functors.
2026-01-15 birenroy One more fix for the case of a nulled out pending frame.
2026-01-14 martinduke Consolidate MOQT *_ERROR message into REQUEST_ERROR.
2026-01-14 haoyuewang Add QuicServerSessionBase::enable_reset_ssl_after_handshake that reset SSL after handshake is done to save connection level memory on the server side.
2026-01-13 quiche-dev Add UpdateMaxSize to QuicLRUCache.
2026-01-13 birenroy Fixes behavior in OgHttp2Session::CloseStream when frames have been removed from the pending frames queue.
2026-01-12 dschinazi Unblock quic_stop_sending_legacy_version_info
2026-01-12 martinduke Rename MoqtRequestError to MoqtErrorPair.
2026-01-12 vasilvv Implement bandwidth probing in MoQ bitrate adjuster.
2026-01-12 ripere Refactor BHTTP test constants.
2026-01-12 dmcardle Deprecate gfe2_reloadable_flag_quic_delay_connection_close_on_invalid_sni
2026-01-12 wangsteve Automated g4 rollback of changelist 840297420.
2026-01-09 martinduke Update MoQT malformed track detection to draft-16.
2026-01-09 ripere Refactor BHTTP content terminated sections decoding.
2026-01-09 dmcardle Add --request_trust_anchors to the QUIC toy client
2026-01-09 ripere Return absl::Status from test helper functions
2026-01-09 ripere Refine IndeterminateLengthMessageSection enum for BinaryHttpResponse encoding.
2026-01-09 ripere Refactor OHTTP client, gateway, and BHTTP decoder creation methods to pass the retained parameter as pointer instead of a reference.
2026-01-08 vasilvv Add missing QUICHE_EXPORT directives.
2026-01-08 martinduke Implement MOQT draft-16 version negotiation.
2026-01-08 martinduke Change MOQT key-value pair lists to have diff-encoded keys.
2026-01-07 diannahu Mark --gfe2_restart_flag_quic_stop_sending_legacy_version_info as enabling_blocked_by.
2026-01-07 birenroy No public description
2026-01-07 quiche-dev Fix gap filling ACK logic in QuicReceivedPacketManager.
2026-01-06 haoyuewang Do not instantiate QpackSendStream if qpack_maximum_dynamic_table_capacity_ is 0 in QuicSpdySession.
2026-01-06 vasilvv Implement a dedicated WebTransport-only dispatcher.
2026-01-06 vasilvv Ensure WebTransport QUIC streams are always set to level-triggered mode.
2026-01-06 ianswett Deprecate --gfe2_reloadable_flag_quic_bbr2_probe_two_rounds.
2026-01-06 ripere Refactor BinaryHttpRequest IndeterminateLengthDecoder to use a local checkpoint.
2026-01-06 danzh Rename methods in QuicConnectionMigrationManager for readability. Callback methods like FinishFoo() are renamed to ContinueFoo() if Foo() is async or DoneWithFoo() if it merely does clean up.
2026-01-06 ripere Wrap chunk handler errors in InternalError.
2026-01-05 ianswett Deprecate quic_bbr2_simplify_inflight_hi.
2026-01-05 rch Remove unreachable return in quic_spdy_session_test.cc
2026-01-05 birenroy Uses `quiche::QuicheCircularDeque` as the type backing the pending frame queue, rather than `std::list`.
2026-01-05 vasilvv Move moqt::TrackNamespace and friends into a separate header.
2025-12-30 quiche-dev No public description
2025-12-29 rch Fix unused parameter warning in quic_session.h
2025-12-23 rch Add support for sending immediate GOAWAYs in HTTP/3.
2025-12-23 quiche-dev QBONE ICMP reachable: eliminate last usage of `SOCK_RAW`.
2025-12-23 quiche-dev Make the masque client return a special error when it gets an expected failure
2025-12-23 quiche-dev Move balsa_fuzz_util to a separate quiche_fuzz_support glob.
2025-12-22 quiche-dev QBONE ICMP reachable: convert to "ping sockets" to avoid the need for `SOCK_RAW` permissions.
2025-12-20 dschinazi Allow content-type parameters in MASQUE/OHTTP test code
2025-12-20 dschinazi Properly handle TLS error in MasqueH2Connection
2025-12-20 dschinazi Allow key fetch and key proxy requests without the Accept header in masque_tcp_server
2025-12-20 dschinazi Properly handle query parameters in MASQUE/OHTTP test code
2025-12-20 dschinazi Only respond to key requests on gateway path in masque_tcp_server
2025-12-20 dschinazi Add --key_proxy option to masque_tcp_server
2025-12-20 dschinazi Increase connection-level flow control in MasqueH2Connection
2025-12-19 dschinazi Make gateway actually proxy requests in masque_tcp_server

Created with:
  roll-dep third_party/quiche/src

Roll third_party/abseil/src/ 987c57f32..8a6b6ae90 (332 commits)

https://chromium.googlesource.com/external/github.com/abseil/abseil-cpp.git/+log/987c57f325f7..8a6b6ae902ac

$ git log 987c57f32..8a6b6ae90 --date=short --no-merges --format='%ad %ae %s'
2026-04-21 absl-team Automated rollback of commit 34e723033bf6e31b196258451c6cdc684804a88d.
2026-04-21 absl-team Change abseil hardening assertions in types directory from macros to functions
2026-04-21 absl-team Change abseil hardening assertions in types directory from macros to functions
2026-04-21 ckennelly Replace ABSL_INTERNAL_LOG with ABSL_RAW_LOG in ReadMonotonicClockNanos.
2026-04-21 goldvitaly Introduce HashtableCapacity wrapper for capacity_ and rename HashtableSize to HashtableInlineData and move capacity into it.
2026-04-20 ckennelly Use if constexpr around allocator type check for hashtable sampling.
2026-04-20 mkruskal Add a friendship for gloop testing
2026-04-16 absl-team Optimzie crc32 on AMD Milan+
2026-04-16 tokarip Optimzie crc32 on AMD Milan+
2026-04-16 dmauro Stop exporting internal Base64 escaping functions that do not need to be exported. The one function that is currently using it is easily implemented with absl::Base64Escape().
2026-04-14 absl-team Add additional bounds check functions to cover most ABSL_HARDENING_ASSERTs.
2026-04-13 absl-team Undo unintended inlining of absl::void_t -- the inlining didn't actually replace it with std::void_t
2026-04-10 ckennelly Consume result from various SampleRecorder methods.
2026-04-09 absl-team Remove unnecessary usages of absl::void_t
2026-04-09 akraman StrFormat: format %g without heap allocation
2026-04-09 absl-team Remove unnecessary namespace bracketing for an internal nullability macro.
2026-04-08 dmauro Introduce ABSL_OPTION_INLINE_HW_ACCEL_STRATEGY in absl/base/options.h to provide a centralized policy for hardware-accelerated implementations in headers.
2026-04-07 sbenza Refactor error factories to propagate static knowledge to the compiler, where supported.
2026-04-07 absl-team Inline absl::void_t to std::void_t wherever possible
2026-04-06 absl-team Deprecate and inline a lot of C++17 Abseil type traits
2026-04-06 absl-team Remove more lingering C++17 type traits polyfill usages
2026-04-06 absl-team nullstream: fix a header guard comment
2026-04-06 absl-team Add SKIP_ABSL_INLINE_NAMESPACE_CHECK to absl/base/internal/exception_safety_testing.h as it doesn't use the absl namespace at all
2026-04-06 mkruskal Expose gloop peer friendship for testing
2026-04-03 absl-team Stop using C++17 type traits polyfills
2026-04-03 dmauro Remove the forward declaration of base::scheduling::Schedulable from thread_identity by using a void*, and fix callers to use base::scheduling::Schedulable::GetBoundSchedulable().
2026-03-31 absl-team Support passing I/O manipulators such as std::endl to StringifyStream
2026-03-31 absl-team Add absl::Status::MakeNonOkStatusWithOkCode() and absl::status_internal::StatusPrivateAccessor for private/internal use
2026-03-30 dmauro Add cleanup dependency
2026-03-28 dmauro Prepare to move callers away from get_bound_schedulable() to remove the forward declaration of base::scheduling::Schedulable.
2026-03-26 absl-team Prevent users of absl::AnySpan::subspan(pos, len) from relying on truncation behavior while the migration from this nonstandard function is in progress.
2026-03-26 absl-team Add support for [[clang::annotate("clang-tidy", "bugprone-use-after-move", "null_after_move")]] annotations.
2026-03-25 lar Reduce duplication in absl/random/internal.
2026-03-25 cramertj Use absl::SourceLocation for Rust source locations in Status
2026-03-24 absl-team Avoid using lambdas in Abseil assertion macros
2026-03-23 dmauro Minor changes to #includes
2026-03-23 cmihelic Document that DemangleRustSymbolEncoding omits some details on purpose.
2026-03-20 mvels Add gloop/perftools/tracing visibility
2026-03-18 mkruskal Add //gloop/util/status:status_macros to Gloop
2026-03-17 absl-team Remove the legacy stateless symbol decorator API.
2026-03-16 dmauro Add additional tests in str_split_test.cc
2026-03-13 absl-team Add absl::strings_internal::AbslStringifyStream
2026-03-13 absl-team Add supporting code for absl::SourceLocation
2026-03-13 absl-team Open-source absl::AnySpan
2026-03-12 mkruskal Add //gloop/util/gtl:iterator_range to Gloop
2026-03-12 mkruskal Internal functionality
2026-03-12 goldvitaly Fix sampling for the insert into a non-SOO table with capacity==1.
2026-03-12 goldvitaly Add benchmark for string erase/emplace.
2026-03-11 dmauro Minor reformatting
2026-03-11 sbenza Prepare GenericPrinter for the rename of ArenaSafeUniquePtr.
(...)
2025-09-30 absl-team Remove unnecessary dep on `core_headers` from the `nullability` cc_library
2025-09-29 jmr type_traits: Add type_identity and type_traits_t backfills
2025-09-26 ezb Refactor raw_hash_set range insertion to call private insert_range function.
2025-09-25 absl-team Fix bug in absl::FunctionRef conversions from non-const to const
2025-09-24 anton.klaren PR #1937: Simplify ConvertSpecialToEmptyAndFullToDeleted
2025-09-23 absl-team Improve absl::FunctionRef compatibility with C++26
2025-09-23 dmauro Add a workaround for unused variable warnings inside of not-taken if-constexpr codepaths in older versions of GCC
2025-09-23 absl-team Annotate ABSL_DIE_IF_NULL's return type with `absl_nonnull`
2025-09-22 goldvitaly Move insert index computation into `PrepareInsertLarge` in order to reduce inlined part of insert/emplace operations.
2025-09-21 absl-team Automated Code Change
2025-09-20 keithbsmiley PR #1939: Add missing rules_cc loads
2025-09-19 durandal Expose (internally) a LogMessage constructor taking file as a string_view for (internal, upcoming) FFI integration.
2025-09-15 absl-team Fixed up some #includes in mutex.h
2025-09-15 absl-team Make absl::FunctionRef support non-const callables, aligning it with std::function_ref from C++26
2025-09-15 goldvitaly Move capacity update in `Grow1To3AndPrepareInsert` after accessing `common.infoz()` to prevent assertion failure in `control()`.
2025-09-13 sohaibiftikhar Fix check_op(s) compilation failures on gcc 8 which eagerly tries to instantiate std::underlying_type for non-num types.
2025-09-12 goldvitaly Use `ABSL_ATTRIBUTE_ALWAYS_INLINE`for lambda in `find_or_prepare_insert_large`.
2025-09-12 derekbailey Mark the implicit floating operators as constexpr for `absl::int128` and `absl::uint128`
2025-09-09 self PR #1931: raw_hash_set: fix instantiation for recursive types on MSVC with /Zc:__cplusplus
2025-09-09 absl-team Add std::pair specializations for IsOwner and IsView
2025-09-09 durandal Cast ABSL_MIN_LOG_LEVEL to absl::LogSeverityAtLeast instead of absl::LogSeverity.
2025-09-08 absl-team Fix a corner case in the aarch64 unwinder
2025-09-04 absl-team Fix inconsistent nullability annotation in ReleasableMutexLock
2025-09-04 absl-team Remove support for Native Client
2025-09-03 absl-team Rollback f040e96b93dba46e8ed3ca59c0444cbd6c0a0955
2025-09-02 durandal When printing CHECK_XX failures and both types are unprintable, don't bother printing " (UNPRINTABLE vs. UNPRINTABLE)".
2025-09-02 rsworktech PR #1929: Fix shorten-64-to-32 warning in stacktrace_riscv-inl.inc
2025-09-02 ezb Refactor `find_or_prepare_insert_large` to use a single return statement using a lambda.
2025-09-02 ckennelly Use possible CPUs to identify NumCPUs() on Linux.
2025-09-02 qrczak Fix incorrect nullability annotation of `absl::Cord::InlineRep::set_data()`.
2025-09-02 goldvitaly Move SetCtrl* family of functions to cc file.
2025-09-01 dmauro Change absl::InlinedVector::clear() so that it does not deallocate any allocated space. This allows allocations to be reused and matches the behavior specification of std::vector::clear().
2025-08-27 avassalotti Mark Abseil container algorithms as `constexpr` for C++20.
2025-08-27 dmauro Fix `CHECK_<OP>` ambiguous overload for `operator<<` in older versions of GCC when C-style strings are compared
2025-08-27 absl-team stacktrace_test: avoid spoiling errno in the test signal handler.
2025-08-26 nafi Optimize `CRC32AcceleratedX86ARMCombinedMultipleStreams::Extend` by interleaving the `CRC32_u64` calls at a lower level.
2025-08-26 absl-team stacktrace_test: avoid spoiling errno in the test signal handler.
2025-08-26 absl-team stacktrace_test: avoid spoiling errno in the test signal handler.
2025-08-26 bgraur std::multimap::find() is not guaranteed to return the first entry with the requested key. Any may be returned if many exist.
2025-08-26 derekbailey Mark `/`, `%`, and `*` operators as constexpr when intrinsics are available.
2025-08-26 dmauro Add the C++20 string_view contructor that uses iterators
2025-08-22 absl-team Implement absl::erase_if for absl::InlinedVector
2025-08-20 absl-team Adjust software prefetch to fetch 5 cachelines ahead, as benchmarking suggests this should perform better.
2025-08-20 goldvitaly Reduce maximum load factor to 27/32 (from 28/32).
2025-08-19 dmauro Remove unused include
2025-08-18 absl-team Remove unused include statement
2025-08-18 30942300+past-due PR #1921: Fix ABSL_BUILD_DLL mode (absl_make_dll) with mingw
2025-08-18 zebreus PR #1922: Enable mmap for WASI if it supports the mman header
2025-08-14 absl-team Rollback C++20 string_view constructor that uses iterators due to broken builds
2025-08-14 dmauro Add the C++20 string_view contructor that uses iterators

Created with:
  roll-dep third_party/abseil/src

Manual changes:
- Update abseil/BUILD.gn. Only add new source files that are actually
  used, for consistency with existing practice.
- Add -Wno-deprecated to the protobuf BUILD.gn, as protobuf uses
  absl::disjunction, which is deprecated in the newer versions of
  Abseil.

Bug: b:508413463
Change-Id: Iadaacdc024231789f7c9c62ade695fadc10596c2
Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/7831666
Commit-Queue: Adam Rice <ricea@chromium.org>
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
5 files changed
tree: 769076b5ba49e0654dbdf9ca20a30cf7796b012f
  1. build_overrides/
  2. cast/
  3. discovery/
  4. docs/
  5. gni/
  6. infra/
  7. osp/
  8. platform/
  9. test/
  10. testing/
  11. third_party/
  12. tools/
  13. util/
  14. .clang-format
  15. .clang-format-ignore
  16. .gitignore
  17. .gitmodules
  18. .gn
  19. .style.yapf
  20. .vpython3
  21. AUTHORS
  22. BUILD.gn
  23. codereview.settings
  24. DEPS
  25. LICENSE
  26. OWNERS
  27. PRESUBMIT.py
  28. PRESUBMIT_test_mocks.py
  29. README.md
README.md

Open Screen Library

The Open Screen Library implements the Open Screen Protocol, Multicast DNS and DNS-SD, and the Cast protocols (discovery, application control, and media streaming).

The library consists of feature modules that share a common platform API that must be implemented and linked by the embedding application.

The major feature modules in the library can be used independently and have their own documentation:

Getting the code

Installing depot_tools

Library dependencies are managed using gclient, from the depot_tools repo.

To get gclient, run the following command in your terminal:

    git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

Then add the depot_tools folder to your PATH environment variable.

Note that openscreen does not use other features of depot_tools like repo or drover. However, some git-cl functions do work, like git cl try, git cl format, git cl lint, and git cl upload.

Checking out code

From the parent directory of where you want the openscreen checkout (e.g., ~/my_project_dir), check out openscreen with the following command:

    fetch openscreen

This command will create an openscreen/ subdirectory, downloads the source code, all third-party dependencies, and the toolchain needed to build things; and at their appropriate revisions.

Syncing your local checkout

To update your local checkout from the openscreen reference repository, just run

   cd ~/my_project_dir/openscreen
   git pull
   gclient sync

This will rebase any local commits on the remote top-of-tree, and update any dependencies that have changed.

Build setup

The main tools required for development are listed below. The gclient tool, which you installed as part of “Getting the code,” will automatically download and install a pre-built toolchain that includes gn, clang-format, ninja, and clang.

  • Installed by gclient automatically:
    • Build file generator: gn (in buildtools/)
    • Code formatter: clang-format (in buildtools/)
    • Builder: ninja
    • Compiler/Linker: clang
  • Installed by you:
    • System-specific libraries and compilers.

System Dependencies

Building the library and its executables requires certain system-specific dependencies (such as libstdc++ on Linux or XCode on macOS). For certain targets, like the standalone cast_sender and cast_receiver, additional external media libraries (e.g., FFmpeg, SDL2) are also required.

For a comprehensive guide on setting up these system-specific and external library dependencies for Linux and macOS, please refer to:

→ cast/docs/external_libraries.md

Debug build

Setting the gn argument is_debug=true enables debug build.

  gn gen out/debug --args="is_debug=true"

GN configuration

Running gn args opens an editor that allows to create a list of arguments passed to every invocation of gn gen. gn args --list will list all of the possible arguments you can set.

  gn args out/debug

Providing compilation data to LSP tools (like clangd)

In order for Language Server Protocol (LSP) tools like clangd to properly interpret the codebase, they need access to a compile_commands.json file.

This file can be generated by GN by using the following command:

gn gen out/<Default> --add-export-compile-commands="*"

Building targets

We use the Open Screen Protocol demo application as an example, however, the instructions are essentially the same for all executable targets.

  mkdir out/debug
  gn gen out/debug             # Creates the build directory and necessary ninja files
  ninja -C out/debug osp_demo  # Builds the executable with ninja
  ./out/debug/osp_demo         # Runs the executable

The -C argument to ninja works just like it does for GNU Make: it specifies the working directory for the build. So the same could be done as follows:

  ./gn gen out/debug
  cd out/debug
  ninja osp_demo
  ./osp_demo

After editing a file, only ninja needs to be rerun, not gn. If you have edited a BUILD.gn file, ninja will re-run gn for you.

We recommend using autoninja instead of ninja, which takes the same command-line arguments but automatically parallelizes the build for your system, depending on number of processor cores, amount of RAM, etc.

Also, while specifying build targets is possible while using ninja, typically for development it is sufficient to just build everything, especially since the Open Screen repository is still quite small. That makes the invocation to the build system simplify to:

  autoninja -C out/debug

For details on running osp_demo, see its README.md.

Building all targets

Running ninja -C out/debug gn_all will build all non-test targets in the repository.

gn ls --type=executable out/debug will list all of the executable targets that can be built.

If you want to customize the build further, you can run gn args out/debug to pull up an editor for build flags. gn args --list out/debug prints all of the build flags available.

Building and running unit tests

  ninja -C out/debug openscreen_unittests
  ./out/debug/openscreen_unittests

Contributing changes

Open Screen library code should follow the Open Screen Library Style Guide.

This library uses Chromium Gerrit for patch management and code review (for better or worse). You will need to register for an account at chromium-review.googlesource.com to upload patches for review.

The following sections contain some tips about dealing with Gerrit for code reviews, specifically when pushing patches for review, getting patches reviewed, and committing patches.

Uploading a patch for review

The git cl tool handles details of interacting with Gerrit (the Chromium code review tool) and is recommended for pushing patches for review. Once you have committed changes locally, simply run:

  git cl format
  git cl upload

The first command will will auto-format the code changes using clang-format. Then, the second command runs the PRESUBMIT.py script to check style and, if it passes, a newcode review will be posted on chromium-review.googlesource.com.

If you make additional commits to your local branch, then running git cl upload again in the same branch will merge those commits into the ongoing review as a new patchset.

It's simplest to create a local git branch for each patch you want reviewed separately. git cl keeps track of review status separately for each local branch.

Addressing merge conflicts

If conflicting commits have been landed in the repository for a patch in review, Gerrit will flag the patch as having a merge conflict. In that case, use the instructions above to rebase your commits on top-of-tree and upload a new patchset with the merge conflicts resolved.

Tryjobs

Clicking the Cq Dry Run button (also, confusingly, labeled Commit Queue +1) will run the current patchset through all LUCI builders and report the results. It is always a good idea get a green tryjob on a patch before sending it for review to avoid extra back-and-forth.

You can also run git cl try from the commandline to submit a tryjob.

Code reviews

Send your patch to one or more owners from the OWNERS file for code review. All patches must receive at least one LGTM by a committer and endorsement by two Google employees to pass the Review-Enforcement check before it can be submitted.

Submitting patches

After your patch has received one or more LGTMs, commit it by clicking the Submit button (or, confusingly, Commit Queue +2) in Gerrit. This will run your patch through the builders again before committing to the main openscreen repository.

Additional resources