Commit graph

2498 commits

Author SHA1 Message Date
Charles Hall
40f9aa6f60
remove stale comments
Should've been removed in 98f1480e2b.
2024-05-15 23:45:54 -07:00
Charles Hall
034169bb8a
remove obvious comments 2024-05-15 16:43:52 -07:00
Charles Hall
f9f066417b
remove pointless else branch 2024-05-15 16:43:52 -07:00
Charles Hall
46731d1f85
how did clippy not catch this 2024-05-15 15:54:12 -07:00
Lambda
4aab4c9b2e
service/appservice: fix weird indirection through global services 2024-05-14 20:21:51 -07:00
Lambda
ad7a5ea777
Remove useless wrapper Services 2024-05-14 20:21:51 -07:00
Lambda
87a1012ab5
Replace Box::into_pin(Box::new( with Box::pin( 2024-05-14 20:21:51 -07:00
Charles Hall
509b70bd82
use the version function for s2s API too
This way the extra version information can appear there as well. Mainly
useful for showing off :P
2024-05-14 20:21:51 -07:00
Charles Hall
a25f2ec950
add conduit compat mode
This makes it possible to deploy Grapevine while using a database
originally created by Conduit, including leaving the admin bot user's
localpart the same as before.
2024-05-14 20:21:51 -07:00
Charles Hall
33e7a46b53
add a nixos module 2024-05-14 20:21:51 -07:00
Charles Hall
17eb354590
prevent bindgen and dependents from building twice
See also <https://crane.dev/faq/rebuilds-bindgen.html>.
2024-05-14 20:21:51 -07:00
Charles Hall
21a4b9e5a1
only set GRAPEVINE_VERSION_EXTRA for final build
This prevents us from needing to recompile the dependencies when that
environment variable changes, which generally changes on every commit,
which is far more frequently than the dependencies are actually changed.
2024-05-14 20:21:51 -07:00
Charles Hall
bbb1a6fea4
make it easy to configure cargo profiles from nix
This way you can easily build in debug mode with Nix.
2024-05-14 20:21:51 -07:00
Charles Hall
51f9650ca7
make it easy to configure cargo features from nix
Users of the nix package can now just use `.override` to choose what
features they want.

This also makes RocksDB automatically use jemalloc when Grapevine is
configured to use jemalloc.
2024-05-14 20:21:51 -07:00
Charles Hall
09751227ea
get rocksdb via flake inputs
Flake lock file updates:

• Added input 'rocksdb':
    'github:facebook/rocksdb/bcf88d48ce8aa8b536aee4dd305533b3b83cf435' (2024-04-16)
2024-05-14 20:21:51 -07:00
Charles Hall
0f8d1a5ed7
factor out nix code into new files via makeScope
This makes the Nix code a lot easier to reason about.
2024-05-14 20:21:51 -07:00
Charles Hall
8d8d4425f3
always go through inputs
This way we don't have to modify the destructuring of `outputs`'
argument when adding or removing inputs.
2024-05-14 20:08:37 -07:00
Charles Hall
238bc85b1d
sort flake inputs 2024-05-14 20:08:37 -07:00
Charles Hall
17cb7732bd
flatten flake inputs 2024-05-14 20:08:37 -07:00
Charles Hall
81d85153e9
specify ref for all flake inputs 2024-05-14 20:08:37 -07:00
Charles Hall
b7df5a7da6
allow loading env vars from .env if it exists
This is primarily useful for replicating the environment from CI so that
the `nix-build-and-cache` script is easier to invoke.
2024-05-14 20:08:37 -07:00
Charles Hall
ca03722072
build and cache all packages and CI dependencies
This fixes the problem where some artifacts were not being cached when
they should have been. The secret sauce is the  `nix-store` command.

Also stops emitting artifacts to GitLab. Automatic build scheduling via
Nix is too convenient. Maybe I'll figure out a way to do both later on.

Also pins the remaining unpinned dependencies, namely direnv and
nix-direnv.
2024-05-14 20:08:37 -07:00
Charles Hall
ce5ce60dd9
use nix-output-monitor if available 2024-05-14 20:08:37 -07:00
Charles Hall
f205280520
use the intended default port by default
Why was it not like this before? All the documentation and examples used
this as the default port.
2024-05-14 20:08:37 -07:00
Charles Hall
e3c57fa83d
enable most pedantic lints as a group
I'm turning off the documentation related ones because they generate
way too many warnings, this kind of thing will need to be improved over
a longer timespan.
2024-05-14 20:01:25 -07:00
Charles Hall
a569bf8d99
enable zero_sized_map_values lint 2024-05-14 20:01:25 -07:00
Charles Hall
44b15dcb08
enable wildcard_imports lint 2024-05-14 20:01:25 -07:00
Charles Hall
3978b9c580
enable used_underscore_binding lint 2024-05-14 20:01:25 -07:00
Charles Hall
e3672eb4e0
enable unused_self lint
Functions using `services()` are allowed to pointlessly take `self`
because the existence of `services()` is a crime and the solution is
making the types store references to their dependencies and then going
through `self`, so just allowing the lint saves us from modifying some
code only to switch it back later. Much later. Getting rid of
`services()` will probably be an ordeal.
2024-05-14 20:01:25 -07:00
Charles Hall
f855bd09d1
enable unused_async lint
This also caused a "new" `unnecessary_wraps` lint to fire too, so that
got fixed too.
2024-05-14 20:01:25 -07:00
Charles Hall
4419e855ae
enable unreadable_literal lint 2024-05-14 20:01:25 -07:00
Charles Hall
a4ff32667e
enable unnested_or_patterns lint 2024-05-14 20:01:25 -07:00
Charles Hall
4e80dc028e
enable unnecessary_wraps lint 2024-05-14 20:01:25 -07:00
Charles Hall
86218f4771
enable uninlined_format_args lint 2024-05-14 20:01:24 -07:00
Charles Hall
baab928281
enable too_many_lines lint
And just disable it everywhere it fires, I know.
2024-05-14 20:01:24 -07:00
Charles Hall
8ef278d358
enable struct_excessive_bools lint
And ignore it in the one place it fires, I know.
2024-05-14 20:01:24 -07:00
Charles Hall
75358340bb
enable single_match_else lint
Also collapses some if statements in the federation name resolution code
2024-05-14 20:01:24 -07:00
Charles Hall
a62fa7b6ee
enable similar_names lint 2024-05-14 20:01:24 -07:00
Charles Hall
db4951c5fd
enable semicolon_if_nothing_returned lint 2024-05-14 20:01:24 -07:00
Charles Hall
96e1877639
enable redundant_closure_for_method_calls lint 2024-05-14 20:01:24 -07:00
Charles Hall
a636405bed
enable needless_pass_by_value lint 2024-05-14 20:01:24 -07:00
Charles Hall
c4a9bca16f
enable match_wildcard_for_single_variants lint 2024-05-14 20:01:24 -07:00
Charles Hall
2b8b5ccb1a
enable match_same_arms lint 2024-05-14 20:01:24 -07:00
Charles Hall
4e6c8451ca
enable match_bool lint 2024-05-14 20:01:24 -07:00
Charles Hall
224ba65d06
enable map_unwrap_or lint 2024-05-14 20:01:24 -07:00
Charles Hall
645d88177a
enable manual_string_new lint 2024-05-14 20:01:24 -07:00
Charles Hall
9606f59141
enable manual_let_else lint 2024-05-14 20:01:23 -07:00
Charles Hall
c51e87ec9a
enable items_after_statements lint 2024-05-14 19:59:43 -07:00
Charles Hall
5c9967f89c
enable inconsistent_struct_constructor lint 2024-05-14 19:59:43 -07:00
Charles Hall
ebae8ceeb0
enable implicit_clone lint 2024-05-14 19:59:43 -07:00