* Use URL type in most outstanding struct fields
This fixes all known remaining cases where url fields are stored as
plain strings, with the exception of form fields where empty strings
are used as sentinels (see `diesel_option_overwrite_to_url`).
Tested for regressions in the federated docker setup attempting to
exercise all changed fields, including through apub federation.
Fixes#1385
* Add migration to fix blank-string post.url values to be null
This also then fixes#602
* Address review feedback
- Fixed some unwraps and err message formatting
- Bumped the `url` library to 2.2.1 to fix a bug with serde error
messages
- Add unit tests for the two diesel option override functions
- Fix migration teardown by adding a no-op
* Rename lemmy_db_queries::Url to lemmy_db_queries::DbUrl
* fix compile error
* box PostOrComment variants
Since DB tests execute diesel migrations automatically, concurrent
execution causes flaky failures from simultaneous migrations. This can
be worked around using `cargo test --workspace -- --test-threads=1`,
which is what the CI config does, but this is not intuitive for
newcomer developers and unnecessarily slows down the test suite for
the majority of tests which are safe to run concurrently. This fixes
this issue by integrating with the small test crate `serial_test` and
using it to explicitly mark DB tests to run sequentially while
allowing all other tests to run in parallel.
Additionally, this greatly improves the speed of `cargo test` by
disabling doc-tests in all crates, since these are aren't currently
used and cargo's doc-test pass, even when no doc-tests exist, has
significant overhead. On my machine, this change significantly
improves test suite times by about 85%, making it much more practical
to develop with tools like `cargo watch` auto-running tests.
* Adding some recurring lemmy tasks.
- Add active users by day, week, month, and half year to site and
community. Fixes#1195
- Periodically re-index the aggregates tables that use hot_rank.
Fixes#1384
- Clear out old activities (> 6 months). Fixes#1133
* Some cleanup, recalculating actives every hour.
* Trying to fix arm build.
* Version 0.9.0-rc.8
* Trying to fix arm build 2.
* Version 0.9.0-rc.9
* Checking time when removing lto.
* Version 0.9.0-rc.10
* Adding back in arm tests.
* Version 0.9.0-rc.11
Adjust dockerfiles, fix cargo.toml and remove unused deps
Merge branch 'main' into move-websocket-to-workspace
Move api code into workspace
Move apub to separate workspace
Move websocket code into separate workspace
Some code cleanup
Remove websocket dependency on API
Co-authored-by: Felix Ableitner <me@nutomic.com>
Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/107
* Adding a way to GetComments for a community given its name only.
* Adding getcomments to api docs.
* A first pass at locally working isomorphic integration.
* Testing out cargo-husky.
* Testing a fail hook.
* Revert "Testing a fail hook."
This reverts commit 0941cf1736.
* Moving server to top level, now that UI is gone.
* Running cargo fmt using old way.
* Adding nginx, fixing up docker-compose files, fixing docs.
* Trying to re-add API tests.
* Fixing prod dockerfile.
* Redoing nightly fmt
* Trying to fix private message api test.
* Adding CommunityJoin, PostJoin instead of joins from GetComments, etc.
- Fixes#1122
* Fixing fmt.
* Fixing up docs.
* Removing translations.
* Adding apps / clients to readme.
* Fixing main image.
* Using new lemmy-isomorphic-ui with better javascript disabled.
* Try to fix image uploads in federation test
* Revert "Try to fix image uploads in federation test"
This reverts commit a2ddf2a90b.
* Fix post url federation
* Adding some more tests, some still broken.
* Don't need gitattributes anymore.
* Update local federation test setup
* Fixing tests.
* Fixing travis build.
* Fixing travis build, again.
* Changing lemmy-isomorphic-ui to lemmy-ui
* Error in travis build again.
Co-authored-by: Felix Ableitner <me@nutomic.com>