Add support for generic timeline #525

Birleştirildi
Plume_migration_agent 5 yıl önce timeline içindeki 58 işlemeyi master ile birleştirdi
Sahibi

fix #450
Query example : lang in [fr, en] and license in [cc] or followed or title contains "Plume"

todolist

  • design a query language for timeline definition
  • make a parser for it
  • make the parser return meaning-full syntax error
  • add tests for parser
  • make a query executor for it
  • make the query executor return meaning-full runtime error (list not found...)
  • add a keyword to show/hide boosts/likes
  • add tests for query executor
  • define timeline in sql model
  • implement timeline in rust
  • add tests for timeline
  • define list in sql model
  • implement lists in rust
  • add tests for lists
  • create migration for pgsql
  • create migration for sqlite
  • modify circleci config to run migration before compilling
  • make a gui to manage timelines for user
  • make a gui to manage timelines for instance
  • make a gui to manage lists for user&instance
  • replace old timeline system with this one
  • add tests for front end??

Abstract syntax for query language

S -> A or S | A
A -> B and A | B
B -> ( S ) | C
C -> not D | D
D -> E in L | F contains W | G
E -> blog | author | license | tags | lang
F -> title | subtitle | content
G -> followed H | has_cover | local | all
H -> include I H | exclude I H | ε
I -> boosts | boost | likes | like
L -> [ M ] | W
M -> W, M | W
W -> <char+>
fix #450 Query example : `lang in [fr, en] and license in [cc] or followed or title contains "Plume"` #### todolist - [x] design a query language for timeline definition - [x] make a parser for it - [x] make the parser return meaning-full syntax error - [x] add tests for parser - [x] make a query executor for it - [x] make the query executor return meaning-full runtime error (list not found...) - [x] add a keyword to show/hide boosts/likes - [x] add tests for query executor - [x] define timeline in sql model - [x] implement timeline in rust - [x] add tests for timeline - [x] define list in sql model - [x] implement lists in rust - [x] add tests for lists - [x] create migration for pgsql - [x] create migration for sqlite - [x] modify circleci config to run migration before compilling - [x] ~~make a gui to manage timelines for user~~ - [x] ~~make a gui to manage timelines for instance~~ - [x] ~~make a gui to manage lists for user&instance~~ - [x] replace old timeline system with this one - [x] ~~add tests for front end??~~ #### Abstract syntax for query language ``` S -> A or S | A A -> B and A | B B -> ( S ) | C C -> not D | D D -> E in L | F contains W | G E -> blog | author | license | tags | lang F -> title | subtitle | content G -> followed H | has_cover | local | all H -> include I H | exclude I H | ε I -> boosts | boost | likes | like L -> [ M ] | W M -> W, M | W W -> <char+> ```
codecov[bot] 5 yıl önce yorum yaptı (github.com konumundan göç edildi)

Codecov Report

Merging #525 into master will increase coverage by 5.48%.
The diff coverage is 69.63%.

@@            Coverage Diff             @@
##           master     #525      +/-   ##
==========================================
+ Coverage   34.35%   39.83%   +5.48%     
==========================================
  Files          68       72       +4     
  Lines        8104     9368    +1264     
  Branches     1923     2219     +296     
==========================================
+ Hits         2784     3732     +948     
- Misses       4538     4580      +42     
- Partials      782     1056     +274
# [Codecov](https://codecov.io/gh/Plume-org/Plume/pull/525?src=pr&el=h1) Report > Merging [#525](https://codecov.io/gh/Plume-org/Plume/pull/525?src=pr&el=desc) into [master](https://codecov.io/gh/Plume-org/Plume/commit/b36e12b65460f25f1d6aeb7823bc1154d928b1fd?src=pr&el=desc) will **increase** coverage by `5.48%`. > The diff coverage is `69.63%`. ```diff @@ Coverage Diff @@ ## master #525 +/- ## ========================================== + Coverage 34.35% 39.83% +5.48% ========================================== Files 68 72 +4 Lines 8104 9368 +1264 Branches 1923 2219 +296 ========================================== + Hits 2784 3732 +948 - Misses 4538 4580 +42 - Partials 782 1056 +274 ```
Poster
Sahibi

blocked by #555
interface for managing timelines and lists will be made in a further pr

blocked by #555 interface for managing timelines and lists will be made in a further pr
elegaanz (github.com konumundan göç edildi) 5 yıl önce incelendi
@ -0,0 +5,4 @@
use schema::{posts, timeline, timeline_definition};
use std::ops::Deref;
use {Connection, Error, PlumeRocket, Result};
elegaanz (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

What is this field for? Is it important to always have a defined order for timelines? And how should it be determined: by the user, or automatically?

What is this field for? Is it important to always have a defined order for timelines? And how should it be determined: by the user, or automatically?
trinity-1686a 5 yıl önce incelendi
@ -0,0 +5,4 @@
use schema::{posts, timeline, timeline_definition};
use std::ops::Deref;
use {Connection, Error, PlumeRocket, Result};
Poster
Sahibi

hum, I don't know, my through was that the first one would be on top, the second under and so on, but it clearly limit what can be done, I'll revert that

hum, I don't know, my through was that the first one would be on top, the second under and so on, but it clearly limit what can be done, I'll revert that
igalic (github.com konumundan göç edildi) 5 yıl önce incelendi
igalic (github.com konumundan göç edildi) bir yorum yaptı

*snort

*snort
@ -0,0 +268,4 @@
let tl2_u1 = Timeline::new_for_user(
conn,
users[0].id,
"another timeline".to_owned(),
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

haah

haah
trinity-1686a 5 yıl önce incelendi
@ -0,0 +268,4 @@
let tl2_u1 = Timeline::new_for_user(
conn,
users[0].id,
"another timeline".to_owned(),
Poster
Sahibi

I'm not good at this whole "giving name to lists" thing

I'm not good at this whole "giving name to lists" thing
igalic (github.com konumundan göç edildi) 5 yıl önce incelendi
@ -0,0 +268,4 @@
let tl2_u1 = Timeline::new_for_user(
conn,
users[0].id,
"another timeline".to_owned(),
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

i disagree, i think you're very good 😸

i disagree, i think you're very good 😸
elegaanz 5 yıl önce yorum yaptı (github.com konumundan göç edildi)

I think this PR is now complete. If you are fine with my commits, I think we can merge it?

I think this PR is now complete. If you are fine with my commits, I think we can merge it?
Poster
Sahibi

there seems to be some failure when running migrations

there seems to be some failure when running migrations
trinity-1686a 5 yıl önce incelendi
trinity-1686a bir yorum yaptı
Poster
Sahibi

at first glance this looks good. I'll run some tests when I get the time, to make sure all is ok

at first glance this looks good. I'll run some tests when I get the time, to make sure all is ok
@ -0,0 +23,4 @@
)))
}
// TODO
Poster
Sahibi

will it be done in this pr, or is this just basic support and actual customization will be added later?

will it be done in this pr, or is this just basic support and actual customization will be added later?
elegaanz (github.com konumundan göç edildi) 5 yıl önce incelendi
@ -0,0 +23,4 @@
)))
}
// TODO
elegaanz (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

I will add it later I think, this PR is big enough.

I will add it later I think, this PR is big enough.
trinity-1686a 5 yıl önce incelendi
trinity-1686a bir yorum yaptı
Poster
Sahibi

I think you are not calling the query parser when handling local like/reshare

I think you are not calling the query parser when handling local like/reshare
Poster
Sahibi

I might be reading this wrong, but this enum (Kind) is made to tell if this is a new post, or a like/reshare of an "old" one, and by whom. This is in the part that handle likes, so I think this should be Kind::Like(&actor). There is probably the same issue with reshare in other places

I might be reading this wrong, but this enum (Kind) is made to tell if this is a new post, or a like/reshare of an "old" one, and by whom. This is in the part that handle likes, so I think this should be `Kind::Like(&actor)`. There is probably the same issue with reshare in other places
Poster
Sahibi

see previous comment

see previous comment
elegaanz (github.com konumundan göç edildi) 5 yıl önce incelendi
elegaanz (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

Indeed, thanks. I probably copied it from somewhere else and forgot to change it (I should really stop copy/pasting code…)

Indeed, thanks. I probably copied it from somewhere else and forgot to change it (I should really stop copy/pasting code…)
elegaanz 5 yıl önce yorum yaptı (github.com konumundan göç edildi)

Thanks for the review, everything is fixed now.

But… I think posts are correctly removed from timelines when deleted, but not when un-liked or un-boosted (but this can probably be fixed later?).

Thanks for the review, everything is fixed now. But… I think posts are correctly removed from timelines when deleted, but not when un-liked or un-boosted (but this can probably be fixed later?).
Poster
Sahibi

they are remove because of cascading remove from sql. The easiest way to have the same comportment might be to add a reference to the like/reshare in 2 optional (and useless) columns, that cascade remove too

they are remove because of cascading remove from sql. The easiest way to have the same comportment might be to add a reference to the like/reshare in 2 optional (and useless) columns, that cascade remove too
trinity-1686a 5 yıl önce incelendi
trinity-1686a bir yorum yaptı
Poster
Sahibi

I can't approve this myself as it's my pr, so if someone could review it that would be nice
we should also do a little todolist of things yet missing.
What come to mind is :

  • boost/like deletion doesn't remove from tl
  • new tl are not automatically filled (make a magic sql query that does this?)
  • related to the above, modifying the query of a tl should clear the tl and rebuild it
  • having an actual way to modify a tl, else they are not really custom
  • I believe query parsing errors are not translated
I can't approve this myself as it's my pr, so if someone could review it that would be nice we should also do a little todolist of things yet missing. What come to mind is : - boost/like deletion doesn't remove from tl - new tl are not automatically filled (make a magic sql query that does this?) - related to the above, modifying the query of a tl should clear the tl and rebuild it - having an actual way to modify a tl, else they are not really custom - I believe query parsing errors are not translated
@ -0,0 +1,51 @@
#![allow(dead_code)]
Poster
Sahibi

?

?
elegaanz (github.com konumundan göç edildi) 5 yıl önce incelendi
@ -0,0 +1,51 @@
#![allow(dead_code)]
elegaanz (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

It is because of the unimplemented routes, to avoid a few compilation warnings.

It is because of the unimplemented routes, to avoid a few compilation warnings.
elegaanz 5 yıl önce yorum yaptı (github.com konumundan göç edildi)

I can't approve this myself as it's my pr, so if someone could review it that would be nice

I seems OK for me (excepted for the things you listed), but I worked on it too, maybe you want to review it, @igalic ? (don't feel forced to do it, I think we can safely merge it if someone else approves the few commits I pushed).

And for the issue you listed, maybe it could be handled in another PR ? The basics are here, and this branch is already pretty big…

> I can't approve this myself as it's my pr, so if someone could review it that would be nice I seems OK for me (excepted for the things you listed), but I worked on it too, maybe you want to review it, @igalic ? (don't feel forced to do it, I think we can safely merge it if someone else approves the few commits I pushed). And for the issue you listed, maybe it could be handled in another PR ? The basics are here, and this branch is already pretty big…
igalic 5 yıl önce yorum yaptı (github.com konumundan göç edildi)

I'll see what i can do tonight.

I'll see what i can do tonight.
trinity-1686a 5 yıl önce incelendi
@ -0,0 +1,51 @@
#![allow(dead_code)]
Poster
Sahibi

There is not warning about them, it's actually... dead code badoum tss

(no warning because functions are public, so the are maybe just used in a crate that depends on Plume, aka none)

There is not warning about them, it's actually... dead code *badoum tss* (no warning because functions are public, so the are maybe just used in a crate that depends on Plume, aka none)
Poster
Sahibi

What I listed was just to have a small todolist of things to add later, not now. This should end in an issue to not get forgotten

What I listed was just to have a small todolist of things to add later, not now. This should end in an issue to not get forgotten
igalic (github.com konumundan göç edildi) 5 yıl önce incelendi
igalic (github.com konumundan göç edildi) bir yorum yaptı

weak 👀 very tired, not finished this review sorry

weak 👀 very tired, not finished this review sorry
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

why is this mutable?
can't we do:

for i in i.. {
    let users = super::users::User::get_local_page(conn, (i * 20, (i + 1) * 20))
    if users.is_err() {
        break;
    }

    let users = users.ok();
    if users.is_empty() {
        return;
    }

    for u in users {
        super::timeline::Timeline::new_for_user(conn, u.id, "Your feed".into(), format!("followed or author in [ {} ]", u.fqn)).expect("User feed creation error");
    }
}
why is this mutable? can't we do: ```rust for i in i.. { let users = super::users::User::get_local_page(conn, (i * 20, (i + 1) * 20)) if users.is_err() { break; } let users = users.ok(); if users.is_empty() { return; } for u in users { super::timeline::Timeline::new_for_user(conn, u.id, "Your feed".into(), format!("followed or author in [ {} ]", u.fqn)).expect("User feed creation error"); } } ```
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

same as above.

same as above.
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

👍

👍
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

Invalid without the e

`Invalid` without the `e`
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

i dunno, this feels like an error…

i dunno, this feels like an error…
@ -0,0 +23,4 @@
0 => Ok(ListType::User),
1 => Ok(ListType::Blog),
2 => Ok(ListType::Word),
3 => Ok(ListType::Prefix),
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

it would be nice if we had the same enum in SQL… but i digress.

it would be nice if we had the same enum in SQL… but i digress.
trinity-1686a 5 yıl önce incelendi
Poster
Sahibi

there are some errors in your code (i..instead of 0.., ok() instead of unwrap...) but overall using for seems more logic than loop

there are some errors in your code (`i..`instead of `0..`, ok() instead of unwrap...) but overall using for seems more logic than loop
igalic (github.com konumundan göç edildi) 5 yıl önce incelendi
igalic (github.com konumundan göç edildi) bir yorum yaptı

slightly less tired, more comments, would love to hear your feedback

slightly less tired, more comments, would love to hear your feedback
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

👍

👍
@ -0,0 +1,4 @@
-- This file should undo anything in `up.sql`
DELETE FROM timeline_definition WHERE name = 'Your feed';
DELETE FROM timeline_definition WHERE name = 'Local feed' AND query = 'local';
DELETE FROM timeline_definition WHERE name = 'Federared feed' AND query = 'all';
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

how does this work with translations?

how does this work with translations?
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

i'm confused… why can't we just say .first(&*c.conn)?;

i'm confused… why can't we just say `.first(&*c.conn)?;`
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

mumbles something about macros

*mumbles something about macros*
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

what does this do?

what does this do?
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

if we're searching by name, why do we need the user_id (i understand it's Optional, but still)

if we're searching by name, why do we need the user_id (i understand it's `Option`al, but still)
@ -0,0 +284,4 @@
.select(list_elems::word)
.load::<Option<String>>(conn)
.map_err(Error::from)
.map(|r| r.into_iter().filter_map(|o| o).collect::<Vec<String>>())
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

i'm confused about the filter_map() in these functions.
can you explain what it does?

i'm confused about the `filter_map()` in these functions. can you explain what it does?
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

is this still needed, or was this just for debugging?

is this still needed, or was this just for debugging?
@ -0,0 +53,4 @@
.map_err(Error::from)
} else {
timeline_definition::table
.filter(timeline_definition::user_id.is_null())
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

this is the only difference between the two expressions. I find it odd that there's no sensible, generic way to solve this.

this is the only difference between the two expressions. I find it odd that there's no sensible, generic way to solve this.
@ -0,0 +68,4 @@
.map_err(Error::from)
} else {
timeline_definition::table
.filter(timeline_definition::user_id.is_null())
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

again, this duplication begs to be solved generically

again, this duplication begs to be solved generically
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

if you turn the logic in this if around, we get one indentation level less.

if you turn the logic in this `if` around, we get one indentation level less.
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

turn logic in if around to break out on top, and get one indentation level less.

turn logic in `if` around to break out on top, and get one indentation level less.
@ -0,0 +121,4 @@
*$state = Some(Token::Word($i,1,&""));
vec![]
},
_ => unreachable!(),
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

how informative is this unreachable!() actually gonna be, if we do ever hit it?

how informative is this `unreachable!()` actually gonna be, if we do ever hit it?
@ -0,0 +151,4 @@
/// Private internals of TimelineQuery
#[derive(Debug, Clone, PartialEq)]
enum TQ<'a> {
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

what does TQ mean?

what does `TQ` mean?
@ -0,0 +490,4 @@
fn parse_d<'a, 'b>(mut stream: &'b [Token<'a>]) -> QueryResult<(&'b [Token<'a>], Arg<'a>)> {
match stream.get(0).map(Token::get_text)? {
s @ "blog" | s @ "author" | s @ "license" | s @ "tags" | s @ "lang" => {
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

what does this mean?

what does this mean?
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

yay for refs

yay for refs
@ -0,0 +27,4 @@
#[get("/timeline/new")]
pub fn new() -> Result<Ructe, ErrorPage> {
unimplemented!()
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

what are these supposed to do ?

what are these supposed to do ?
@ -111,0 +113,4 @@
"Your feed" => i18n!(cat, "Your feed"),
"Local feed" => i18n!(cat, "Local feed"),
"Federated feed" => i18n!(cat, "Federated feed"),
n => n.to_string(),
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

neato…
also, i just realized what this does, thanks to this awful example: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=ba47f87eb9d03239e40287e8c405e4ae

neato… also, i just realized what this does, thanks to this awful example: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=ba47f87eb9d03239e40287e8c405e4ae
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

i'm quite happy with how the repetition of these ⬆️ in the templates you deleted is gone

i'm quite happy with how the repetition of these ⬆️ in the templates you deleted is gone
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

i think we'll need dir="auto" here

i think we'll need `dir="auto"` here
@ -0,0 +9,4 @@
@:base(ctx, tl.name.clone(), {}, {}, {
<section class="flex wrap" dir="auto">
<h1 class="grow">@i18n_timeline_name(ctx.1, &tl.name)</h1>
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

dir="auto"?

`dir="auto"`?
igalic (github.com konumundan göç edildi) 5 yıl önce incelendi
@ -0,0 +1,4 @@
-- This file should undo anything in `up.sql`
DELETE FROM timeline_definition WHERE name = 'Your feed';
DELETE FROM timeline_definition WHERE name = 'Local feed' AND query = 'local';
DELETE FROM timeline_definition WHERE name = 'Federared feed' AND query = 'all';
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

i think i found the answer to this somewhere below in the code!

i think i found the answer to this somewhere below in the code!
trinity-1686a 5 yıl önce incelendi
Poster
Sahibi

First return a Result<Blog, _>, optional convert it to a Result<Option<Blog>,...> so that if the error is not found, we can fetch the blog instead of not knowing it ever, but if the error is anything else, it's still an error

First return a `Result<Blog, _>`, [optional](https://docs.diesel.rs/diesel/result/trait.OptionalExtension.html) convert it to a `Result<Option<Blog>,...>` so that if the error is not found, we can fetch the blog instead of not knowing it ever, but if the error is anything else, it's still an error
trinity-1686a 5 yıl önce incelendi
@ -0,0 +284,4 @@
.select(list_elems::word)
.load::<Option<String>>(conn)
.map_err(Error::from)
.map(|r| r.into_iter().filter_map(|o| o).collect::<Vec<String>>())
Poster
Sahibi

It map each Option<String> to it's inner String, and filter Nones away

It map each `Option<String>` to it's inner `String`, and filter `None`s away
trinity-1686a 5 yıl önce incelendi
Poster
Sahibi

this gives this module more visibility from the outer code, while keeping it private from other crates. It was probably necessary at some point, but rn it could be plain private

this gives this module more visibility from the outer code, while keeping it private from other crates. It was probably necessary at some point, but rn it could be plain private
trinity-1686a 5 yıl önce incelendi
@ -0,0 +27,4 @@
#[get("/timeline/new")]
pub fn new() -> Result<Ructe, ErrorPage> {
unimplemented!()
Poster
Sahibi

allow creation/edition/deletion of custom timelines

allow creation/edition/deletion of custom timelines
trinity-1686a 5 yıl önce incelendi
@ -0,0 +121,4 @@
*$state = Some(Token::Word($i,1,&""));
vec![]
},
_ => unreachable!(),
Poster
Sahibi
thread 'main' panicked at 'internal error: entered unreachable code', src/main.rs:2:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

I could probably rewrite that without unreachable! if it's needed (it's truly unreachable atm)

``` thread 'main' panicked at 'internal error: entered unreachable code', src/main.rs:2:5 note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace. ``` I could probably rewrite that without unreachable! if it's needed (it's truly unreachable atm)
trinity-1686a 5 yıl önce incelendi
@ -0,0 +151,4 @@
/// Private internals of TimelineQuery
#[derive(Debug, Clone, PartialEq)]
enum TQ<'a> {
Poster
Sahibi

TimelineQuery, but more hidden (it's private while TimelineQuery is public)

TimelineQuery, but more hidden (it's private while `TimelineQuery` is public)
trinity-1686a 5 yıl önce incelendi
@ -0,0 +490,4 @@
fn parse_d<'a, 'b>(mut stream: &'b [Token<'a>]) -> QueryResult<(&'b [Token<'a>], Arg<'a>)> {
match stream.get(0).map(Token::get_text)? {
s @ "blog" | s @ "author" | s @ "license" | s @ "tags" | s @ "lang" => {
Poster
Sahibi

if it's equal to "blog", "author", "license"... store the value in s and match the given arm

if it's equal to "blog", "author", "license"... store the value in s and match the given arm
trinity-1686a 5 yıl önce incelendi
Poster
Sahibi

I have no idea, @BaptisteGelez ?

I have no idea, @BaptisteGelez ?
trinity-1686a 5 yıl önce incelendi
Poster
Sahibi

I's a find by (list) name, in context of the given user (or instance if None)

I's a find by (list) name, in context of the given user (or instance if None)
trinity-1686a 5 yıl önce incelendi
@ -0,0 +53,4 @@
.map_err(Error::from)
} else {
timeline_definition::table
.filter(timeline_definition::user_id.is_null())
Poster
Sahibi

Welcome to the party!
Diesel consider that anything eq None unless we are that explicit

Welcome to the party! Diesel consider that anything eq None unless we are that explicit
igalic (github.com konumundan göç edildi) 5 yıl önce incelendi
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

that needs either documentation or different names, because this way it's just way too confusing

that needs either documentation or different names, because this way it's just way too confusing
igalic (github.com konumundan göç edildi) 5 yıl önce incelendi
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

thank you for the explanation!

thank you for the explanation!
igalic (github.com konumundan göç edildi) 5 yıl önce incelendi
@ -0,0 +151,4 @@
/// Private internals of TimelineQuery
#[derive(Debug, Clone, PartialEq)]
enum TQ<'a> {
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

perhaps add a comment such as:

/// These are the private internals of TImeQuery

or something along the lines

perhaps add a comment such as: ```rust /// These are the private internals of TImeQuery ``` or something along the lines
igalic (github.com konumundan göç edildi) 5 yıl önce incelendi
@ -0,0 +490,4 @@
fn parse_d<'a, 'b>(mut stream: &'b [Token<'a>]) -> QueryResult<(&'b [Token<'a>], Arg<'a>)> {
match stream.get(0).map(Token::get_text)? {
s @ "blog" | s @ "author" | s @ "license" | s @ "tags" | s @ "lang" => {
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

i have never seen that before! where is that documented?

i have never seen that before! where is that documented?
igalic (github.com konumundan göç edildi) 5 yıl önce incelendi
@ -0,0 +27,4 @@
#[get("/timeline/new")]
pub fn new() -> Result<Ructe, ErrorPage> {
unimplemented!()
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

I the user interface? for which we have no design concept yet?
or via APIs?

I the user interface? for which we have no design concept yet? or via APIs?
trinity-1686a 5 yıl önce incelendi
@ -0,0 +27,4 @@
#[get("/timeline/new")]
pub fn new() -> Result<Ructe, ErrorPage> {
unimplemented!()
Poster
Sahibi

for the user interface. APIs are in their own directory

for the user interface. APIs are in their own directory
trinity-1686a 5 yıl önce incelendi
@ -0,0 +151,4 @@
/// Private internals of TimelineQuery
#[derive(Debug, Clone, PartialEq)]
enum TQ<'a> {
Poster
Sahibi

I think we should #![warn(missing_docs)] and progressively document everything in general

I think we should `#![warn(missing_docs)]` and progressively document everything in general
trinity-1686a 5 yıl önce incelendi
@ -0,0 +490,4 @@
fn parse_d<'a, 'b>(mut stream: &'b [Token<'a>]) -> QueryResult<(&'b [Token<'a>], Arg<'a>)> {
match stream.get(0).map(Token::get_text)? {
s @ "blog" | s @ "author" | s @ "license" | s @ "tags" | s @ "lang" => {
Poster
Sahibi

https://doc.rust-lang.org/1.5.0/book/patterns.html#bindings
It's not useful very often, but when it is, it's very nice to have

https://doc.rust-lang.org/1.5.0/book/patterns.html#bindings It's not useful very often, but when it is, it's very nice to have
trinity-1686a 5 yıl önce incelendi
@ -0,0 +53,4 @@
.map_err(Error::from)
} else {
timeline_definition::table
.filter(timeline_definition::user_id.is_null())
Poster
Sahibi

I've tried for a few hours to add a eq_optional via some trait, but the best I got was "only" 4 compiler error, of which the shortest was 4 lines long. I'm giving up on this

I've tried for a few hours to add a `eq_optional` via some trait, but the best I got was "only" 4 compiler error, of which the shortest was 4 lines long. I'm giving up on this
igalic (github.com konumundan göç edildi) 5 yıl önce incelendi
@ -0,0 +53,4 @@
.map_err(Error::from)
} else {
timeline_definition::table
.filter(timeline_definition::user_id.is_null())
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

kudos for trying.

kudos for trying.
Poster
Sahibi

and I failed my merge >_<

and I failed my merge >_<
igalic (github.com konumundan göç edildi) 5 yıl önce incelendi
igalic (github.com konumundan göç edildi) bir yorum yaptı

👍

👍
@ -0,0 +119,4 @@
}
})
{
Err(err)?;
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

That is 21 lines of error handling

That is 21 lines of error handling
@ -0,0 +157,4 @@
}
})
{
Err(err)?;
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

that's another 21 lines of error handling

that's another 21 lines of error handling
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

there should be a better way to do that …
(I'm not saying you have to find that now)

there should be a better way to do that … (I'm not saying you have to find that *now*)
@ -0,0 +724,4 @@
/*
#[test]
fn test_matches_lists_saved() {
let r = &rockets();
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

why is this one commented out?

why is this one commented out?
@ -0,0 +805,4 @@
conn,
users[0].id,
"Linux subtitle".to_owned(),
"subtitle contains Stallman".to_owned(),
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

(i'd rather it didn't… lolsob…)

(i'd rather it didn't… lolsob…)
trinity-1686a 5 yıl önce incelendi
@ -0,0 +724,4 @@
/*
#[test]
fn test_matches_lists_saved() {
let r = &rockets();
Poster
Sahibi

I have no idea

I have no idea
trinity-1686a 5 yıl önce incelendi
@ -0,0 +805,4 @@
conn,
users[0].id,
"Linux subtitle".to_owned(),
"subtitle contains Stallman".to_owned(),
Poster
Sahibi

shall I edit that?

shall I edit that?
igalic (github.com konumundan göç edildi) 5 yıl önce incelendi
@ -0,0 +805,4 @@
conn,
users[0].id,
"Linux subtitle".to_owned(),
"subtitle contains Stallman".to_owned(),
igalic (github.com konumundan göç edildi) 5 yıl önce yorum yaptı

We can do a cleanup PR and just remove all problematic techmen from our test examples

We can do a cleanup PR and just remove all problematic techmen from our test examples
elegaanz (github.com konumundan göç edildi) 5 yıl önce bu değişiklikleri onayladı
elegaanz (github.com konumundan göç edildi) bir yorum yaptı

LGTM, this great PR have been waiting for too long!

LGTM, this great PR have been waiting for too long!

Gözden Geçirenler

Değişiklik isteği 006b44f580 olarak birleştirildi.
komut satırı talimatlarını da görüntüleyebilirsiniz.

1. Adım:

Proje deponuzdan yeni bir dala göz atın ve değişiklikleri test edin.
git checkout -b timeline master
git pull origin timeline

2. Adım:

Forgejo'daki değişiklikleri ve güncellemeleri birleştirin.
git checkout master
git merge --no-ff timeline
git push origin master
Bu konuşmaya katılmak için oturum aç.
Değerlendirici yok
Kilometre Taşı Yok
Atanan Kişi Yok
2 Katılımcı
Bildirimler
Bitiş Tarihi
Bitiş tarihi geçersiz veya aralık dışında. Lütfen 'yyyy-aa-gg' biçimini kullanın.

Bitiş tarihi atanmadı.

Bağımlılıklar

Bağımlılık yok.

Referans: Plume/Plume#525
Yükleniyor…
Henüz bir içerik yok.