summaryrefslogtreecommitdiff
path: root/Meta
AgeCommit message (Collapse)Author
2022-12-14ConfigureComponents: Use `Core::Stream` to read output from `whiptail`Tim Schumacher
2022-12-14Meta: Don't depend on sudo for privileged operationsBaitinq
We previously depended on sudo's specific -E flag to keep all the environment variables when performing a privilege escalation. We now incorporate the -E flag into the $SUDO variable, allowing for other privilege escalation binaries (such as doas) to be used (as long as they preserve the current environment variables).
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-13Lagom: Don't compile with `-fPIC` on WIN32Filiph Siitam Sandström
2022-12-13LibTimeZone: Update to TZDB version 2022gTimothy Flynn
https://mm.icann.org/pipermail/tz-announce/2022-November/000076.html
2022-12-13Meta: Build CMake from source if version is too old in serenity.shAndrew Kaster
2022-12-13Toolchain+Meta: Add script to build CMake from sourceAndrew Kaster
Since we upstreamed CMake support for Serenity, we can use the Platform files from upstream instead of keeping our local copy. While not added in this commit, we can add patching capabilities for the platform files similar to what we do for gdb, llvm, gcc, and binutils later.
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: Detect ccache being passed as the compilerJan200101
This prevents ccache from being invoking itself. Icecc fails to ran this way because of recursion detection.
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-10CI: Add a check to report git merge commitLucas CHOLLET
2022-12-10LibCompress: Port GzipDecompressor to `Core::Stream`Tim Schumacher
2022-12-10Meta: Use absolute paths in Meta/analyze-qemu-coverage.shAndrew Kaster
This is a bit easier to read in the output when running locally, and a bit better script hygiene overall.
2022-12-10CMake: Force-link clang_rt.profile.a to LibC when building with coverageAndrew Kaster
This used to be in place until 671712cae67d7b8782afa94c09e980a77450efd6. I had commented on that PR that "yeah should be good to remove". Turns out that's not the case. A future patch to the clang driver might make this obsolete :^).
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.
2022-12-06Meta: Manually compute the length of the WASM JS REPL source stringTimothy Flynn
The REPL does not have a reliable way to tell us the UTF-8 byte count of the source string, so we must use strlen() ourselves.
2022-12-06Everywhere: Rename to_{string => deprecated_string}() where applicableLinus Groh
This will make it easier to support both string types at the same time while we convert code, and tracking down remaining uses. One big exception is Value::to_string() in LibJS, where the name is dictated by the ToString AO.
2022-12-06AK+Everywhere: Rename String to DeprecatedStringLinus Groh
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
2022-12-05Meta: Initialize the WASM JS REPL with a known time zoneTimothy Flynn
The runtime environment of the WASM REPL does not have time zone information; the file system is virtual (does not have /etc/localtime), and the TZ environment variable is not set. This causes LibTimeZone to always fall back to UTC. Instead, we can get the time zone from the user's browser before we enter this limited environment. The REPL website will pass the time zone into the WASM REPL.
2022-12-05Meta: Explicitly link generated compile-time data into the WASM JS REPLTimothy Flynn
Without this, we were in a weird state where LibTimeZone believed it had TZDB data, but that data wasn't actually available to it. This caused functions like JS::get_named_time_zone_offset_nanoseconds() to trip an assertion when entering "new Date();" into the REPL.
2022-12-05LibAudio: Switch LoaderPlugin to a more traditional constructor patternTim Schumacher
This now prepares all the needed (fallible) components before actually constructing a LoaderPlugin object, so we are no longer filling them in at an arbitrary later point in time.
2022-12-03Everywhere: Remove 'clang-format off' comments that are no longer neededLinus Groh
https://github.com/SerenityOS/serenity/pull/15654#issuecomment-1322554496
2022-12-03Everywhere: Run clang-formatLinus Groh
2022-12-03Meta: Switch to clang-format-15 as the standard formatterLinus Groh
The two major changes noticeable on the SerenityOS codebase are: - Much improved support for const placement, clang-format-14 ignored our east-const configuration in various places - Different formatting for requires clauses, now breaking them onto their own line, which helps with readability a bit Current versions of CLion also ship LLVM 15, so the built-in formatting now matches CI formatting again :^)
2022-12-03Meta+CI: Add CI job specifically for bundling serenity-js artifactsAndrew Kaster
These are used by esvu, and it is sad that we don't have macOS binaries availble for consumption by esvu users. Add a matrix job to handle this separately from the test262 results.
2022-11-30LibWeb: Add @@toStringTag to platform object prototypesLuke Wilde
This was forgotten to be added in the LibWeb GC conversion. This caused some brand checks to fail in skribbl.io's JavaScript and thus caused unexpected exceptions.
2022-11-30LibCore: Add support for ReadonlyBytes to MemoryStreamTim Schumacher
2022-11-30LibArchive: Move loading the next tar header into a helper functionTim Schumacher
This now also validates the first header that is loaded, so we can drop the corresponding FIXME from `tar`.
2022-11-30LibArchive: Use Core::Stream inside `TarInputStream`Tim Schumacher