summaryrefslogtreecommitdiff
path: root/Meta/Lagom
AgeCommit message (Collapse)Author
2023-01-06Meta/Lagom: Link Threads::ThreadsMacDue
This is required for me to be able to build both Serenity and Ladybird from the same repo. Without this the two builds seem to stomp on each other, then fail to link.
2023-01-06Meta: Pass `Core::Stream::OpenMode` by value in the `IPCCompiler`Lucas CHOLLET
2023-01-04IPCCompiler+LibIPC: Propagate IPC encoder errorsTimothy Flynn
This propagates errors from user-defined encoders up to IPC::Connection. There, we currently just log the error, as we aren't in a position to propagate it further (i.e. we are inside a deferred invocation).
2023-01-03Lagom: Fix up a missed usage of `Compress::Zlib` in the fuzzersTim Schumacher
2023-01-02Everywhere: Remove unused includes of AK/Format.hBen Wiederhake
These instances were detected by searching for files that include AK/Format.h, but don't match the regex: \\b(CheckedFormatString|critical_dmesgln|dbgln|dbgln_if|dmesgln|FormatBu ilder|__FormatIfSupported|FormatIfSupported|FormatParser|FormatString|Fo rmattable|Formatter|__format_value|HasFormatter|max_format_arguments|out |outln|set_debug_enabled|StandardFormatter|TypeErasedFormatParams|TypeEr asedParameter|VariadicFormatParams|v_critical_dmesgln|vdbgln|vdmesgln|vf ormat|vout|warn|warnln|warnln_if)\\b (Without the linebreaks.) This regex is pessimistic, so there might be more files that don't actually use any formatting functions. Observe that this revealed that Userland/Libraries/LibC/signal.cpp is missing an include. In theory, one might use LibCPP to detect things like this automatically, but let's do this one step after another.
2023-01-02Everywhere: Move AK/Debug.h include to using files or removeBen Wiederhake
2022-12-27LibGfx: Start adding a utility for handling ICC color profilesNico Weber
For now, this dumps file version and device class. https://github.com/saucecontrol/compact-icc-profiles has good test inputs.
2022-12-26LibIPC+Everywhere: Change IPC decoders to construct values in-placeTimothy Flynn
Currently, the generated IPC decoders will default-construct the type to be decoded, then pass that value by reference to the concrete decoder. This, of course, requires that the type is default-constructible. This was an issue for decoding Variants, which had to require the first type in the Variant list is Empty, to ensure it is default constructible. Further, this made it possible for values to become uninitialized in user-defined decoders. This patch makes the decoder interface such that the concrete decoders themselves contruct the decoded type upon return from the decoder. To do so, the default decoders in IPC::Decoder had to be moved to the IPC namespace scope, as these decoders are now specializations instead of overloaded methods (C++ requires specializations to be in a namespace scope).
2022-12-26IPCCompiler+LibIPC: Generate message decoders with better TRY semanticsTimothy Flynn
Instead of a bunch of manual error checking and returning a null OwnPtr, we can propagate the errors up and return NonnullOwnPtr on success.
2022-12-26IPCCompiler: Fix build when GENERATE_DEBUG is enabledTimothy Flynn
1. We don't need to escape the quotes in the dbgln() statements because these are raw strings. 2. The dbgln() statements must end with a semicolon.
2022-12-25Lagom: Add option to build Ladybird as part of a Lagom buildAndrew Kaster
This means that Ladybird can be built with either Meta/Lagom or Ladybird as the top-level source directory. This setup is a bit awkward, but will preserve the packaging story for Ladybird until we come up with a more permanent solution.
2022-12-24Meta: Move UCD/CLDR/TZDB downloaded artifacts to Build/cachesTimothy Flynn
They currently reside under Build/<arch>, meaning that they would be redownloaded for each architecture/toolchain build combo. Move them to a location that can be re-used for all builds.
2022-12-21LibGfx: Rename TTF/TrueType to OpenTypeAndreas Kling
OpenType is the backwards-compatible successor to TrueType, and the format we're actually parsing in LibGfx. So let's call it that.
2022-12-20Lagom: Remove test appsSam Atkins
These are no longer useful or necessary now that a lot of different applications run on Lagom.
2022-12-20Meta+test262-runner: Check for signature of __assert_fail in CMakeAndrew Kaster
Rather than trying to assume the only two C libraries on Linux are musl and glibc, this solution fixes musl builds by explicitly checking for the one C library function we are overwriting. That being said, we should find another solution to retrieving this error information from crashing tests. Possibly just overriding the SIGABRT handler would work. The full solution might require checking stderr as well as stdout in the test driver though.
2022-12-20LibGL: Generate the API wrappersJelle Raaijmakers
We now generate all LibGL API wrappers from a single API method definition list stored in `GLAPI.json`. Since a significant portion of the OpenGL API methods are relatively consistent variants, we take advantage of this to generate a lot of these variants at once. The autogenerated methods check for the non-nullness of the current `GLContext`, and only perform an action if a `GLContext` is present. This prevents a crash in ports like GLTron, who assume you can still call the OpenGL API without an active context. This increases our API wrapper method count from 211 to 356. Fixes #15814.
2022-12-19Meta: Include StylePropertiesModel.cpp in lagom LibWebViewMacDue
2022-12-17LibGLSL: Add LibGLSLStephan Unverwerth
This adds a new library, LibGLSL for parsing and compiling GLSL programs to LibGPU IR. Currently the compiler consists only of stubs.
2022-12-15LibCore: Rename `MemoryStream` to `FixedMemoryStream`Tim Schumacher
This is to differentiate between the upcoming `AllocatingMemoryStream`, which automatically allocates memory as needed instead of operating on a static memory area.
2022-12-15LibJS: Convert Object::construct() to NonnullGCPtrLinus Groh
2022-12-15LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtrLinus Groh
2022-12-14Meta+CMake: Extract Wasm spec tests into the binary directoryAndrew Kaster
Clean up the Wasm spec tests CMake rules to extract and compile the wat files into wasm files in the LibWasm binary directory instead of its source directory. Also make the rules more robust to missing host tools, and use more CMake install rules for the test files rather than relying on build-root-filesystem.sh. Add some FIXMEs for later, we really shouldn't be doing installation of test files into /home/anon at the build-root-filesystem stage in $CURRENT_YEAR. Tests go in /usr/Tests
2022-12-14LibUnicode: Fix compilation when the UCD download is disabledTimothy Flynn
2022-12-14ConfigureComponents: Use `Core::Stream` to read output from `whiptail`Tim Schumacher
2022-12-14LibJS: Remove Object(Object& prototype) footgunAndreas Kling
This constructor was easily confused with a copy constructor, and it was possible to accidentally copy-construct Objects in at least one way that we dicovered (via generic ThrowCompletionOr construction). This patch adds a mandatory ConstructWithPrototypeTag parameter to the constructor to disambiguate it.
2022-12-14CMake: Pass NO_POLICY_SCOPE to options cmake helpersAndrew Kaster
Tell CMake to not create a new policy scope for the (lagom|serenity|common)_options.cmake helpers, and lets us set common policies for both projects in common_options.cmake that actually apply to the rest of the project, instead of just common_options.cmake itself.
2022-12-14LibJS: Convert Promise::create() to NonnullGCPtrLinus Groh
2022-12-14LibJS: Convert Object::create() to NonnullGCPtrLinus Groh
2022-12-14LibJS: Convert Array::create{,_from}() to NonnullGCPtrLinus Groh
2022-12-13BindingsGenerator+CMake: Keep track of IDL dependenciesDaniel Bertalan
This commit teaches BindingsGenerator to generate depfiles, which can be used by CMake to ensure that bindings are properly regenerated when imported IDL files change. Two new options, `--depfile` and `--depfile-target` are added. - `--depfile` sets the path for the dependency file. - `--depfile-target` lets us set a target name different than the output file in the depfile. This option is needed because generated files are first written to a temporary file, but depfiles have to refer to the final location. These are analogous to GCC's `-MF` and `-MT` options respectively. The depfile's syntax matches the ones generated by GCC. Note: This changes the minimal required CMake version to 3.20 if the Make generator is used, and to 3.21 for the Xcode generator. Ninja is not affected.
2022-12-13BindingsGenerator: Write generated code to disk instead of stdoutDaniel Bertalan
This commit adds the `-o` option for specifying an output path to BindingsGenerator.
2022-12-12Meta: Separate ccache setup into its own componentJan200101
2022-12-12LibCore: Propagate errors from `Stream::*_entire_buffer`Tim Schumacher
2022-12-12LibCore: Rename `Stream::*_or_error` to `*_entire_buffer`Tim Schumacher
All of our functions are `_or_error` (or are about to be), and maybe making it less reminiscient of AK::Stream will make people use it more.
2022-12-12LibCore: Rename `Stream::read_all` to `read_until_eof`Tim Schumacher
This generally seems like a better name, especially if we somehow also need a better name for "read the entire buffer, but not the entire file" somewhere down the line.
2022-12-12LibCore: Remove `Stream::is_{readable,writable}`Tim Schumacher
Next to functions like `is_eof` these were really confusing to use, and the `read`/`write` functions should fail anyways if a stream is not readable/writable.
2022-12-11sql: Support running the sql REPL on LagomTimothy Flynn
2022-12-10Meta: Return 0 from the fuzzing function in most casesTim Schumacher
LibFuzzer documentation [1] states that all return values except for 0 and -1 are currently reserved for future use. -1 is a special return value that causes LibFuzzer to not add a testing input to the testing corpus, regardless of the code coverage that it causes. [1] https://llvm.org/docs/LibFuzzer.html
2022-12-10Lagom/CodeGenerators: Use HashMap::try_ensure_capacityThomas Queiroz
2022-12-10Meta: Switch to the Lagom directory before building fuzzersTim Schumacher
This confused quite a number of people in the past, and it is still slightly annoying to always switch the directory when testing both the OS and the fuzzer build. Instead, let's just switch to the correct directory automatically.
2022-12-10LibCompress: Port GzipDecompressor to `Core::Stream`Tim Schumacher
2022-12-10LibWeb: Add namespace qualifier to type names equal to a C++ namespaceLuke Wilde
For example, Document.getSelection returns Selection, which is in the Selection namespace. Namespaces.h has Linus' copyright since he changed the "is_one_of" list to an Array.
2022-12-08LibCore: Move `Core::Stream::File::exists()` to `Core::File`Tim Schumacher
`Core::Stream::File` shouldn't hold any utility methods that are unrelated to constructing a `Core::Stream`, so let's just replace the existing `Core::File::exists` with the nicer looking implementation.
2022-12-07LibJS: Replace standalone js_string() with PrimitiveString::create()Linus Groh
Note that js_rope_string() has been folded into this, the old name was misleading - it would not always create a rope string, only if both sides are not empty strings. Use a three-argument create() overload instead.
2022-12-07IPCCompiler: Mark size_t as a primitive typeTimothy Flynn
This allows size_t to be used within an IPC message without being passed by const-reference.
2022-12-07Meta+Userland: Pass Gfx::FloatSize by valueMacDue
Just two floats like Gfx::FloatPoint.
2022-12-07Meta+Userland: Pass Gfx::IntSize by valueMacDue
Just two ints like Gfx::IntPoint.
2022-12-07Meta+Userland: Pass Gfx::FloatPoint by valueMacDue
Just a small 8-byte value like Gfx::IntPoint.
2022-12-07Meta+Userland: Pass Gfx::IntPoint by valueMacDue
This is just two ints or 8 bytes or the size of the reference on x86_64 or AArch64.
2022-12-07Meta+Userland: Pass Gfx::Color by valueMacDue
Gfx::Color is always 4 bytes (it's just a wrapper over u32) it's less work just to pass the color directly. This also updates IPCCompiler to prevent from generating Gfx::Color const &, which makes replacement easier.