ladybird/Meta
Timothy Flynn 357fd76e30 Meta: Generate a helper constructor for single-value IPC responses
When an IPC message returns a single value, we generate a class with a
constructor that is something like:

    class MessageResponse {
        MessageResponse(SingleReturnType value)
            : m_value(move(value))
        {
        }
    };

If that IPC message wants to return a value that SingleReturnType is
constructible from, you have to wrap that return call with braces:

    return { value_that_could_construct_single_return_type };

That isn't really an issue except for when we want to mix TRY semantics
with the return type. If SingleReturnType is constructible from an Error
type (i.e. something similar to ErrorOr), the following doesn't work:

    TRY(fallible_function());

Because MessageResponse would not be constructible from Error. Instead,
we must do some workaround with a custom TRY macro, as in 31bb792.

This patch generates a constructor that makes TRY usable as-is without
any custom macros. We perform a very similar trick in ThrowCompletionOr
inside LibJS. This constructor will allow you to create MessageResponse
from any type that SingleReturnType is constructible from.
2022-11-09 14:15:59 +00:00
..
Azure Everywhere: Require version >= 12 for GCC host compiler 2022-10-25 23:15:51 +01:00
CMake LibTimeZone: Update to TZDB version 2022f 2022-11-04 08:56:11 +00:00
HeaderCheck HeaderCheck: Also check AK for broken headers 2022-09-18 13:27:24 -04:00
Lagom Meta: Generate a helper constructor for single-value IPC responses 2022-11-09 14:15:59 +00:00
Screenshots Meta: Move screenshots into subdir 2022-04-03 13:14:15 +01:00
ShellCompletions/zsh Meta: Add copy-src to commands in ZSH autocomplete script 2022-03-14 22:20:35 +00:00
Websites Everywhere: Use title case for man section titles 2022-02-25 12:06:31 -05:00
.shell_include.sh Meta: Start moving common shell definitions into a common file 2022-10-16 23:39:45 +02:00
analyze-qemu-coverage.sh Meta: Make x86-64 target the default 2022-10-03 11:14:53 +02:00
bochsrc Meta: Add SSE3, SMAP and SMEP to our bochsrc 2021-12-28 11:51:50 +01:00
build-image-extlinux.sh Meta: Start moving common shell definitions into a common file 2022-10-16 23:39:45 +02:00
build-image-grub.sh Meta: Start moving common shell definitions into a common file 2022-10-16 23:39:45 +02:00
build-image-limine.sh Meta: Start moving common shell definitions into a common file 2022-10-16 23:39:45 +02:00
build-image-qemu.sh Meta: Make file-system resizing work on macOS 2022-11-04 09:05:36 +00:00
build-manpages-website.sh Documentation: Merge UsingFontEditor into existing FontEditor manpage 2022-07-11 11:35:56 +02:00
build-native-partition.sh Meta: Start moving common shell definitions into a common file 2022-10-16 23:39:45 +02:00
build-root-filesystem.sh Meta: Get rid of /res/version.ini 2022-10-14 13:45:33 +02:00
check-ak-test-files.sh Meta: Fix check for AK test inclusion 2022-09-13 08:29:09 +00:00
check-debug-flags.sh Kernel: Split the Ext2FileSystem.{cpp,h} files into smaller components 2022-11-08 02:54:48 -07:00
check-emoji.py Meta: Disallow emoji images with invalid code points in their file name 2022-10-26 18:40:20 +01:00
check-markdown.sh Meta: Also check CONTRIBUTING with check-markdown.sh 2022-07-11 11:35:56 +02:00
check-newlines-at-eof.py Kernel: Split the Ext2FileSystem.{cpp,h} files into smaller components 2022-11-08 02:54:48 -07:00
check-png-sizes.sh Meta: Add a PNG size check to CI and pre-commit checks 2022-06-18 21:58:43 +04:30
check-style.py Kernel: Split the Ext2FileSystem.{cpp,h} files into smaller components 2022-11-08 02:54:48 -07:00
check-symbols.sh Meta: Make x86-64 target the default 2022-10-03 11:14:53 +02:00
convert-markdown-links.lua Meta: Update manpages website build script to handle non-icon images 2022-05-29 10:24:31 +02:00
debug-kernel.sh Meta: Make x86-64 target the default 2022-10-03 11:14:53 +02:00
export-argsparser-manpages.sh CI: Ensure the manpage generation step shuts down the VM on failure 2022-10-31 22:10:14 +00:00
extlinux.conf Everywhere: Get rid of the fbdev kernel boot argument remainders 2022-08-14 01:03:23 +01:00
generate-embedded-resource-assembly.sh Meta: Get building on NixOS (#5005) 2021-01-22 17:44:05 +01:00
generate-libwasm-spec-test.py Meta: Skip wasm tests whose modules cannot be loaded 2022-03-20 10:44:32 +03:30
generate-libwasm-spec-test.sh Meta: Run the Wasm spec tests in CI 2021-05-27 17:28:41 +04:30
grub-ebr.cfg Meta: Use correct boot device selections when using GRUB images 2022-09-02 23:36:08 +01:00
grub-gpt.cfg Meta: Use correct boot device selections when using GRUB images 2022-09-02 23:36:08 +01:00
grub-mbr.cfg Meta: Use correct boot device selections when using GRUB images 2022-09-02 23:36:08 +01:00
install-ports-tree.sh Everywhere: Replace SERENITY_ROOT with SERENITY_SOURCE_DIR 2021-04-20 15:27:52 +02:00
limine.cfg Everywhere: Get rid of the fbdev kernel boot argument remainders 2022-08-14 01:03:23 +01:00
lint-ci.sh Meta: Remove 'time' invocation in lint-ci 2022-09-22 00:45:10 +02:00
lint-clang-format.sh Kernel: Split the Ext2FileSystem.{cpp,h} files into smaller components 2022-11-08 02:54:48 -07:00
lint-commit.sh Meta: Revise lint-commit.sh regex for the title 2022-09-15 13:55:32 +01:00
lint-executable-resources.sh Meta: Add special case for macOS 2021-11-02 12:23:30 +01:00
lint-gml-format.sh Meta: Only check changed files in lint-gml-format.sh 2022-09-18 18:45:25 -07:00
lint-keymaps.py Everywhere: "file name" => "filename" 2021-04-29 22:16:18 +02:00
lint-ports.py Meta: Add check if AvailablePorts.md is sorted 2022-06-02 23:18:06 +01:00
lint-prettier.sh LibJS: Implement ImportCall and HostImportModuleDynamically 2022-01-22 01:21:18 +00:00
lint-python.sh Meta: Get building on NixOS (#5005) 2021-01-22 17:44:05 +01:00
lint-shell-scripts.sh Meta: Allow shellcheck to search sourced files in the script directory 2022-10-16 23:39:45 +02:00
new-project.sh Meta: Add new-project.sh :^) 2021-08-13 21:12:17 +04:30
refresh-serenity-qtcreator.sh Meta: Make QtCreator aware of all CMake files 2021-09-15 20:21:19 +00:00
run.sh Meta: Default to the SDL QEMU frontend on SerenityOS 2022-10-24 15:52:42 +02:00
serenity_gdb.py Meta: Avoid showing elements in extremely large vectors in gdb 2022-04-01 21:41:41 +01:00
serenity.sh Everywhere: Require version >= 12 for GCC host compiler 2022-10-25 23:15:51 +01:00
text-to-cpp-string.sh Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
tweet-commits.js Meta: Ensure long messages fit in commit tweet 2021-06-18 13:34:17 +01:00