Forcing the formatting to go through `Formatter<FormatString>` is
completely unnecessary, increases code size, performs a String
allocation and prevents us from using the formatting options available
on that type.
This commit also removes explicit formatters from
`BlockBasedFileSystem::BlockIndex` and `Kernel::InodeIndex`, as those
are already covered by the blanket implementation for all
`DistinctNumeric` types.
Previously, only `manual` installs would register dependencies of an
installed port package. Since in the future we might want to check all
dependents, not only those for manually installed packages, we should
take care to register dependencies for `auto` installs as well.
Additionally, this surpresses some unnecessary verbose output from the
package management and fixes warnings when the package DB directory did
not yet exist.
GNU statement expressions fit the definition of IfAbruptRejectPromise
rather nicely, where we need to reject the failed promise (and return
the failed promise itself) on failure, and otherwise store a value on
success.
This is a bit ugly because, rather than simply wrapping the invocation
to GetPromiseResolve with TRY(), we have to invoke the promise's reject
method with any error. But this will be a bit cleaner in a subsequent
commit to change how IfAbruptRejectPromise is invoked.
Both at the same time because many of them call construct() in call()
and I'm not keen on adding a bunch of temporary plumbing to turn
exceptions into throw completions.
Also changes the return value of construct() to Object* instead of Value
as it always needs to return an object; allowing an arbitrary Value is a
massive foot gun.
TL;DR: Instead of this:
return { TRY(my_object()) };
we can now do:
return TRY(my_object());
just like we mostly did for Value return types before ThrowCompletionOr.
This one is a bit unusual, so to clarify:
Previously, callers of get_iterator_values() would supply a callback
that would return an IterationDecision, and an enum to indicate whether
iterator_close() should be invoked upon IterationDecision::Break.
Now, use of both those enums is removed, and callers must return an
Optional<Completion>. If a Completion is provided, the iterator will be
closed, and that completion will be returned from get_iterator_values.
Otherwise, once the iterator is exhausted, a default-initialized
Completion will be returned.
Previously, you could get crashes when you tried to search for a font
size in the Font Picker or a screen resolution in Display Settings.
This is because their list models aren't made of strings
and Variant::as_string() only accepts strings.
Prior to this change, there was no requirement to build this server.
If you build serenity without -DBUILD_EVERYTHING flag, or just play
around with your build configuration[1], it left you with a blank
screen and this debug line:
SystemServer(6:6): LoginServer: binary "/bin/LoginServer" does not
exist, skipping service.
[1]: Documentation/AdvancedBuildInstructions.md#component-configuration
This is necessary as we might have to perform named evaluation with the
field name.
Ideally we would also skip some setup parts of the function like
function_declaration_instantiation however this would require bigger
changes to ECMAScriptFunctionObject.