Commit graph

1919 commits

Author SHA1 Message Date
Timothy Flynn afeb7273cc LibJS+Everywhere: Rename Value::to_string to to_deprecated_string 2023-01-15 01:00:20 +00:00
Andrew Kaster f5d253dcfa Everywhere: Fully qualify IsLvalueReference in TRY() macros
If USING_AK_GLOBALLY is not defined, the name IsLvalueReference might
not be available in the global namespace. Follow the pattern established
in LibTest to fully qualify AK types in macros to avoid this problem.
2023-01-15 00:56:31 +00:00
Ben Wiederhake 23d111a459 LibWeb: Implement value_id_from_string by hash lookup
The old approach was basically a linear scan, which is slower than a
hash map for the currently 303 elements, as evidenced by the new
benchmark in TestCSSIDSpeed.

Before: Completed benchmark 'value_id_from_string' in 3238ms
After: Completed benchmark 'value_id_from_string' in 193ms
2023-01-14 15:43:27 -07:00
Ben Wiederhake 0687a75eaa LibWeb: Run tests in lagom if ENABLE_LAGOM_LIBWEB is set 2023-01-14 15:43:27 -07:00
Timothy Flynn afc0e461e1 AK+Everywhere: Disallow returning a reference from a fallible expression
This will silently make a copy. Rather than masking this behavior, let's
explicitly disallow it.
2023-01-13 18:50:47 -05:00
Linus Groh 5411adca22 LibWebView+Ladybird: Begin de-duplicate WebView implementations
This starts moving code equally shared between the OOPWV and Ladybird
WebContentView implementations to WebView::ViewImplementation, beginning
with the client state.
2023-01-12 23:39:36 +01:00
MacDue 1cf45ee930 Utilities: Add ttfdisasm for disassembling OpenType instructions
This utility when given a .tff font provides options for disassembling:

 - The 'fpgm' table, this a program that's run once when the font is
   loaded. It's used to define instructions and functions used by used
   by other programs.

 - The 'prep' table, this is a general program that's run when ever
   the font size (or other properties) changes.

 - And the programs associated with any individual glyph.

The disassembly is printed in a format that matches the examples from:
https://learn.microsoft.com/en-us/typography/opentype/spec/tt_instructions

I'm mainly adding this because I think it's neat to be able to look
at these things, and think it'll be helpful for debugging an
interpreter.

With this you can see that all of the LiberationSerif-XXX.tff fonts in
Serenity have these programs ready to go.
2023-01-12 11:27:57 +01:00
Timothy Flynn 491edaffc7 LibWeb: Ensure legacy constructors are defined on the global object
This regressed in 6e93d89ee3.
2023-01-10 17:55:23 +00:00
Timothy Flynn 6e93d89ee3 LibWeb: Generate exposed Window/Worker interfaces as lazy objects
We now lazily create these instances on-demand rather than all at once
when a Window/Worker object is created.
2023-01-10 16:08:14 +01:00
Timothy Flynn 7bd8fd000f LibWeb: Generate dedicated methods to create Web constructors/prototypes
Currently, for each exposed interface, we generate one massive function
to create every Web constructor and prototype. In an effort to lazily
create these instead, this first step is to extract the creation of each
of these into its own method.

First, this generates a forwarding header for all IDL types. This is to
allow callers to remain unchanged without forcing them to include the
(very heavy) generated IDL headers. This header is included by LibWeb's
forwarding header.

Next, this defines a base template method on Web::Bindings::Intrinsics
to create a prototype/constructor pair. Specializations of this template
are now generated in a new .cpp file, IntrinsicDefinitions.cpp. The base
Intrinsics class is updated to use this new method, and will continue to
cache the result.

Last, some WebAssembly classes are updated to use this new mechanism.
They were using some ad hoc cache keys that are now in line with the
generated specializations.

That one massive function is still used to invoke these specializations,
so they are not lazy as of this commit.
2023-01-10 16:08:14 +01:00
Timothy Flynn 6fcc1c7426 AK+LibUnicode: Provide Unicode-aware String case transformations
Since AK can't refer to LibUnicode directly, the strategy here is that
if you need case transformations, you can link LibUnicode and receive
them. If you try to use either of these methods without linking it, then
you'll of course get a linker error (note we don't do any fallbacks to
e.g. ASCII case transformations). If you don't need these methods, you
don't have to link LibUnicode.
2023-01-09 19:23:46 -07:00
Timothy Flynn 12f6793223 LibUnicode: Move Unicode-aware case transformations to a helper file
These will be needed by AK::String as well, so move them to a helper
file where they can be re-used.
2023-01-09 19:23:46 -07:00
martinfalisse ce0f41b9fb LibWeb+WebContent: Use new String class in CSS::StyleValue
Converts uses of DeprecatedString to String in StyleValue, and patches
surrounding files that depend on these functions.
2023-01-09 11:09:31 +01:00
Liav A c876412b1b Kernel: Remove the NE2000 PCI network adapter driver
Nobody tests this network card as the person who added it, Jean-Baptiste
Boric (known as boricj) is not an active contributor in the project now.
After a discussion with him on the Discord server, we agreed it's for
the best to remove the driver, as for two reasons:
- The original author (boricj) agreed to do this, stating that he will
  not be able to test the driver anymore after his Athlon XP machine is
  no longer supported after the removal of the i686 port.
- It was agreed that the NE2000 network card family is far from the
  ideal hardware we would want to support, similarly to the RTL8139 that
  got removed recently for almost the same reason.
2023-01-08 21:51:59 +01:00
kleines Filmröllchen e430667923 Meta/build-manpages-website: Use absolute paths for all links
Previously, we had some broken cross-manpage links on the website after
the introduction of subsections. This is fixed by simply always using an
absolute path (leading '/') for links, making all images, icons and page
links work in all subsections.

Unfortunately, this change means that navigating the website build while
opening the files in the browser directly will no longer work. However,
a local static server such as `python -m http.server 8080` in the
output/ directory will work just fine for testing.
2023-01-08 13:35:29 +01:00
kleines Filmröllchen 76e601d758 Meta/build-manpages-website: Copy all manpage PNGs
This will allow using images in manpages elsewhere in the future without
adjusting the PNG copying command.

rsync unfortunately cannot place all files into the root folder when
receiving a list of files via --files-from=-.
2023-01-08 13:35:29 +01:00
implicitfield 28c99e7a1f LibArchive+Utilities: Stop using DeprecatedString
This also slightly improves error propagation in tar, unzip and zip.
2023-01-08 09:54:08 +00:00
Liav A 5c97c6d874 Kernel: Remove the RTL8139 PCI network adapter driver
Nobody tests this network card, and the driver has bugs (see the issue
https://github.com/SerenityOS/serenity/issues/10198 for more details),
so it's almost certain that this happened due to code being rotting when
there's simply no testing of it.

Essentially this has been determined to be dead-code so this is the most
important reason to drop this code. Another good reason to do so is
because the RTL8139 only supports Fast Ethernet connections (10/100
Megabits per second), and is considered obsolete even for bare metal
setups.
2023-01-07 11:37:57 -07:00
Ben Wiederhake 3281050359 Everywhere: Remove "LibC/" includes, add lint-rule against it 2023-01-07 10:01:37 -07:00
MacDue b0ac88cf89 Meta/Lagom: Link Threads::Threads
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-06 08:04:23 -07:00
Lucas CHOLLET 4e164c9de7 Meta: Pass Core::Stream::OpenMode by value in the IPCCompiler 2023-01-06 14:52:29 +00:00
Luke Wilde a6716e694d CI: Automatically apply pull request labels for generic PR actions
Generic PR actions include opening a PR, submit review comments, adding
new commits, etc. This prevents the reviewer and PR submitter from
having to manually bounce the labels back and forth in the general
case. The reviewer also may not have permission to set labels, meaning
the reviewer won't be able to update the labels accordingly themselves.

This does not handle more subjective labels such as pr-is-blocked and
pr-unclear. Unfortunately, there does not seem to be a GitHub Actions
trigger for when a PR has merge conflicts, so the pr-has-conflicts
label cannot be automatically applied.

Co-authored-by: kleines Filmröllchen <filmroellchen@serenityos.org>
2023-01-06 15:25:30 +01:00
kleines Filmröllchen 8fb7c32ec3 Meta: Create nested manpage section indices for the website
This is probably committing some sed crimes, but it looks very nice!
2023-01-05 15:03:52 +01:00
kleines Filmröllchen 20f44e095d Meta: Use parallel rsync for file coyping for online manpages
The main point is to bring this in line with all the other file copying,
which is always done via rsync.

On my machine this leads to very little speedup, but I'm also on WSL, so
🤷

Timings:
Before:
  Time (abs ≡): 20.440 s [User: 133.928 s, System: 12.290 s]
After:
  Time (abs ≡): 20.346 s [User: 135.534 s, System: 11.207 s]
2023-01-05 15:03:52 +01:00
kleines Filmröllchen a205efd900 Meta: Generate manpages for website in parallel
pandoc is a single-threaded and pretty slow application, so we can run
it in the background and "synchronize" before generating section
indices.

Timing results:
Before:
  Time (abs ≡):        59.833 s [User: 49.541 s, System: 6.943 s]
After:
  Time (abs ≡):        20.440 s [User: 133.928 s, System: 12.290 s]

(both generated with hyperfine -p "rm -r output || true" -r 1
	Meta/build-manpages-website.sh )
2023-01-05 15:03:52 +01:00
kleines Filmröllchen a196fafd0f Meta: Print progress during the website manpage build
This especially helps when building locally.
2023-01-05 15:03:52 +01:00
kleines Filmröllchen 3affa922e3 Meta: Make the manpage website build work with manpage subsection
For now, we create simple but complete indices and actually generate the
HTML for the manpages in subsections. For these purposes, switch to
using "find" as a file finding tool everywhere, instead of the very
limited globs from before.
2023-01-05 15:03:52 +01:00
kleines Filmröllchen 69e5645955 Meta: Remove duplicate manpage section generation for the website 2023-01-05 15:03:52 +01:00
Timothy Flynn 8b7b03b369 IPCCompiler+LibIPC: Propagate IPC encoder errors
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-04 11:49:15 +01:00
Tim Schumacher 77ea609cd3 Lagom: Fix up a missed usage of Compress::Zlib in the fuzzers 2023-01-03 23:26:45 +01:00
Ben Wiederhake 6fd478b6ce Everywhere: Remove unused includes of AK/Format.h
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-02 20:27:20 -05:00
Ben Wiederhake 8a331d4fa0 Everywhere: Move AK/Debug.h include to using files or remove 2023-01-02 20:27:20 -05:00
Timothy Flynn 0a7d0362ea CI: Remove extraneous toolchain job from Azure CI
This was useful when building both i686 and x86_64 SerenityOS targets as
we could use a single toolchain build for both targets. But now all this
extra job does is create the opportunity for the toolchain to need to be
built twice (i.e. if the pipelines are backed up and the toolchain cache
is busted between these jobs while the x86_64 step is waiting for a VM).
2022-12-28 15:26:12 -05:00
Liav A fb0dee5a54 Meta: Force compilation with DWARF revision 4
We currently don't support DWARF revision 5 and LLVM/Clang might create
such debug info into our binaries in x86_64, which will lead to a crash
in CrashReporter that is unable to parse that information correctly.
2022-12-28 11:53:41 +01:00
Liav A 55f17fff36 Meta: Remove i686 target 2022-12-28 11:53:41 +01:00
Nico Weber 7f52f45e9d LibGfx: Start adding a utility for handling ICC color profiles
For now, this dumps file version and device class.

https://github.com/saucecontrol/compact-icc-profiles has good
test inputs.
2022-12-27 07:44:37 -07:00
Timothy Flynn 9b483625e6 LibIPC+Everywhere: Change IPC decoders to construct values in-place
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-26 09:36:16 +01:00
Timothy Flynn 765c5b416f IPCCompiler+LibIPC: Generate message decoders with better TRY semantics
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-26 09:36:16 +01:00
Timothy Flynn dc77ec733f IPCCompiler: Fix build when GENERATE_DEBUG is enabled
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-26 09:36:16 +01:00
Andrew Kaster 4ae2a54f3d CI: Bump macOS Azure runners to macos-12 tag 2022-12-25 07:58:58 -07:00
Andrew Kaster e8c2f67d47 Meta: Enable starting ladybird from serenity.sh
This solution feels really hacky and should be refined later.
2022-12-25 07:58:58 -07:00
Andrew Kaster 03edff1f39 CI: Enable ladybird builds in Lagom CI 2022-12-25 07:58:58 -07:00
Andrew Kaster 0384513779 Lagom: Add option to build Ladybird as part of a Lagom build
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-25 07:58:58 -07:00
Timothy Flynn 2334b4cebd Meta: Move UCD/CLDR/TZDB downloaded artifacts to Build/caches
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-24 09:46:28 -05:00
Tim Schumacher 1c630316ec CMake: Fall back to the Web Archive when downloading files 2022-12-21 09:13:50 +00:00
Andreas Kling f982400063 LibGfx: Rename TTF/TrueType to OpenType
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-21 08:44:22 +01:00
Timothy Flynn ed84a6f6ee LibUnicode: Use www.unicode.org domain to download emoji-test.txt
The non-www domain does not appear to be available now. We use the www
domain for UCD.zip already.

Co-authored-by: Stephan Unverwerth <s.unverwerth@serenityos.org>
2022-12-20 12:09:16 -05:00
Sam Atkins 3507679659 Lagom: Remove test apps
These are no longer useful or necessary now that a lot of different
applications run on Lagom.
2022-12-20 12:09:01 -05:00
Nico Weber c6f81b5b83 Meta: Tweak shell_include.sh
* `chmod -x` as it's for sourcing, not for executing
* Remove run line, for the same reason
* Rename it from .shell_include.sh to shell_include.sh, since e.g.
  `rg` doesn't search in hidden files by default

No behavior change.
2022-12-20 09:23:32 -05:00
Andrew Kaster c0542ed40b Meta+test262-runner: Check for signature of __assert_fail in CMake
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-20 11:04:05 +01:00
Jelle Raaijmakers 2da1c1c10e LibGL: Generate the API wrappers
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-20 10:42:31 +01:00
MacDue 9dea61e095 Meta: Include StylePropertiesModel.cpp in lagom LibWebView 2022-12-19 11:37:56 -05:00
0xxFF c4bc889346 Documentation: Adjust default TARGET to x86_64 in the documentation 2022-12-19 09:00:34 -05:00
Nico Weber 1a85539741 Meta: Find mke2fs on macOS even if HOMEBREW_PREFIX is not set
...as long as `brew` is on the path and `brew --prefix e2fsprogs`
tells us where it is.

This is for people who don't have `"$(brew shellenv)"` in their .zshrc.
2022-12-18 17:49:49 -07:00
Nico Weber 15ce757f12 Meta: Disable gdbstub when running under HVF on macOS
Without this, `serenity.sh run` fails with

    gdbstub: current accelerator doesn't support guest debugging

on an intel mac.
2022-12-18 17:46:29 -07:00
Stephan Unverwerth 67b2f8d68d LibGLSL: Add LibGLSL
This adds a new library, LibGLSL for parsing and compiling GLSL programs
to LibGPU IR. Currently the compiler consists only of stubs.
2022-12-17 22:39:09 -07:00
Andrew Kaster 37517ba8bb Meta: Prefer clang as a host compiler to gcc 2022-12-17 22:21:43 -07:00
Andrew Kaster d2e4565f72 Meta: Allow building with Apple clang 14.x
We previously disregarded Apple clang entirely, since no released
version was able to succesfully build Lagom. Xcode 14 seems to have
all the features we need, as we haven't added any code that needs
trunk clang features in quite a while.
2022-12-17 22:21:43 -07:00
EWouters 74927ac76d Meta: Fix mke2fs on MacOS
Use `Meta/.shell_include.sh` to find the `mke2fs` executable.
2022-12-17 16:12:48 -07:00
Tim Schumacher c6d71ca727 LibCore: Rename MemoryStream to FixedMemoryStream
This is to differentiate between the upcoming `AllocatingMemoryStream`,
which automatically allocates memory as needed instead of operating on a
static memory area.
2022-12-15 13:28:29 +00:00
Linus Groh 6ae79a84df LibJS: Convert Object::construct() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
Linus Groh 22089436ed LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
implicitfield 9665f41979 Kernel: Ignore an invalid QEMU multiboot entry
This was introduced in the QEMU commit 8504f12 and was causing the
kernel to fail to boot on the q35 machine.

Fixes #14952.
2022-12-14 17:05:06 +00:00
Andrew Kaster 733a318709 Meta+CMake: Extract Wasm spec tests into the binary directory
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-14 20:29:43 +03:30
Lucas CHOLLET d3cdf151a4 Meta: Rename E2FSCK => E2FSCK_PATH
Done to increase consistency with other binaries' path.
2022-12-14 16:43:44 +00:00
Lucas CHOLLET 0fde7fe3c5 Meta: Factorize path resolution
This patch adds the `find_executable()` function that will hopefully
find executables in a distro-agnostic way and that is (hopefully as
well) easily upgradable.

The function uses some bash functionalities. So, we now require bash
for each script that includes `.shell_include.sh`.
2022-12-14 16:43:44 +00:00
Timothy Flynn d382e77d38 LibUnicode: Fix compilation when the UCD download is disabled 2022-12-14 15:24:48 +00:00
Tim Schumacher 9ec2cb3741 ConfigureComponents: Use Core::Stream to read output from whiptail 2022-12-14 15:19:35 +00:00
Baitinq 88c9e4f3b0 Meta: Don't depend on sudo for privileged operations
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-14 14:38:13 +00:00
Andreas Kling 4abdb68655 LibJS: Remove Object(Object& prototype) footgun
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-14 15:11:57 +01:00
Andrew Kaster 16d4791212 CMake: Pass NO_POLICY_SCOPE to options cmake helpers
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-14 12:43:12 +01:00
Linus Groh a4d85cd522 LibJS: Convert Promise::create() to NonnullGCPtr 2022-12-14 09:59:45 +00:00
Linus Groh ddc6e139a6 LibJS: Convert Object::create() to NonnullGCPtr 2022-12-14 09:59:45 +00:00
Linus Groh 91b0123eaf LibJS: Convert Array::create{,_from}() to NonnullGCPtr 2022-12-14 09:59:45 +00:00
Filiph Siitam Sandström f050534991 Lagom: Don't compile with -fPIC on WIN32 2022-12-13 21:53:29 +00:00
Timothy Flynn bb6a84cc85 LibTimeZone: Update to TZDB version 2022g
https://mm.icann.org/pipermail/tz-announce/2022-November/000076.html
2022-12-13 16:04:32 -05:00
Andrew Kaster 3ca661314f Meta: Build CMake from source if version is too old in serenity.sh 2022-12-13 11:36:14 +01:00
Andrew Kaster e4a59f664b Toolchain+Meta: Add script to build CMake from source
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-13 11:36:14 +01:00
Daniel Bertalan 24d2c90a28 BindingsGenerator+CMake: Keep track of IDL dependencies
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-13 11:31:24 +01:00
Daniel Bertalan 8d1ad592a1 BindingsGenerator: Write generated code to disk instead of stdout
This commit adds the `-o` option for specifying an output path to
BindingsGenerator.
2022-12-13 11:31:24 +01:00
Jan200101 483c18437b Meta: Detect ccache being passed as the compiler
This prevents ccache from being invoking itself.
Icecc fails to ran this way because of recursion detection.
2022-12-12 21:34:09 -07:00
Jan200101 10d40af167 Meta: Separate ccache setup into its own component 2022-12-12 21:34:09 -07:00
Tim Schumacher 9a3e95785e LibCore: Propagate errors from Stream::*_entire_buffer 2022-12-12 14:16:42 +01:00
Tim Schumacher 6c7c5a6786 LibCore: Rename Stream::*_or_error to *_entire_buffer
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-12 14:16:42 +01:00
Tim Schumacher ed4c2f2f8e LibCore: Rename Stream::read_all to read_until_eof
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-12 14:16:42 +01:00
Tim Schumacher 5061a905ff LibCore: Remove Stream::is_{readable,writable}
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-12 14:16:42 +01:00
Timothy Flynn 78353ec184 sql: Support running the sql REPL on Lagom 2022-12-11 10:08:17 -05:00
Tim Schumacher 20f0858f67 Meta: Return 0 from the fuzzing function in most cases
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-10 16:21:12 -07:00
Thomas Queiroz 6debd967ba Lagom/CodeGenerators: Use HashMap::try_ensure_capacity 2022-12-10 14:29:46 +01:00
Tim Schumacher b0af53749d Meta: Switch to the Lagom directory before building fuzzers
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-10 14:03:46 +01:00
Lucas CHOLLET 839c1a574d CI: Add a check to report git merge commit 2022-12-10 12:07:06 +00:00
Tim Schumacher f93c7fbb5e LibCompress: Port GzipDecompressor to Core::Stream 2022-12-10 12:05:55 +00:00
Andrew Kaster 0e90b0921e Meta: Use absolute paths in Meta/analyze-qemu-coverage.sh
This is a bit easier to read in the output when running locally, and a
bit better script hygiene overall.
2022-12-10 11:51:16 +00:00
Andrew Kaster 8356677868 CMake: Force-link clang_rt.profile.a to LibC when building with coverage
This used to be in place until 671712cae6.

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-10 11:51:16 +00:00
Luke Wilde 565dc0f296 LibWeb: Add namespace qualifier to type names equal to a C++ namespace
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-10 00:21:10 +00:00
Tim Schumacher 2fc2025f49 LibCore: Move Core::Stream::File::exists() to Core::File
`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-08 12:52:14 +00:00
Linus Groh 525f22d018 LibJS: Replace standalone js_string() with PrimitiveString::create()
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-07 16:43:06 +00:00
Timothy Flynn 3a915483b0 IPCCompiler: Mark size_t as a primitive type
This allows size_t to be used within an IPC message without being passed
by const-reference.
2022-12-07 13:09:00 +01:00
MacDue 1574f2c3f6 Meta+Userland: Pass Gfx::FloatSize by value
Just two floats like Gfx::FloatPoint.
2022-12-07 11:48:27 +01:00
MacDue 27fae78335 Meta+Userland: Pass Gfx::IntSize by value
Just two ints like Gfx::IntPoint.
2022-12-07 11:48:27 +01:00