-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use RON as the primary format #100
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 19 files reviewed, 2 unresolved discussions
a discussion (no related file):
ron-storage in separate patch
a discussion (no related file):
Types2 -> Types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 19 files reviewed, 2 unresolved discussions
a discussion (no related file):
Previously, cblp (Yuriy Syrovetskiy) wrote…
ron-storage in separate patch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 15 files reviewed, 2 unresolved discussions
a discussion (no related file):
Remove FF.Storage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 14 files at r4.
Reviewable status: 1 of 16 files reviewed, all discussions resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 7 files at r3, 1 of 14 files at r4, 1 of 1 files at r5.
Reviewable status: 5 of 16 files reviewed, all discussions resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 14 files at r4.
Reviewable status: 6 of 16 files reviewed, all discussions resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r6.
Reviewable status: 7 of 16 files reviewed, all discussions resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 14 files at r4.
Reviewable status: 9 of 16 files reviewed, all discussions resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 14 files at r4.
Reviewable status: 10 of 16 files reviewed, all discussions resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 3 files at r7.
Reviewable status: 10 of 17 files reviewed, all discussions resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 3 files at r7.
Reviewable status: 11 of 17 files reviewed, all discussions resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 14 files at r4, 1 of 3 files at r7.
Reviewable status:complete! all files reviewed, all discussions resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 3 unresolved discussions
a discussion (no related file):
ronRoundtrip
a discussion (no related file):
stack exec ff
a discussion (no related file):
stack exec ff upgrade
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 4 files at r8.
Reviewable status: all files reviewed, 3 unresolved discussions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 3 unresolved discussions
a discussion (no related file):
stack exec ff track
note_status_assign $ TaskStatus Archived | ||
|
||
cmdUnarchive :: MonadStorage m => NoteId -> m (Entity Note) | ||
cmdUnarchive nid = modifyAndView nid $ note_status_assign $ TaskStatus Active |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Хорошо код упростился и более читаемым стал.
pure () | ||
unless (start <= end) $ throwError "task cannot end before it is started" | ||
|
||
note_status_assignIfDiffer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Функция для решения конфликтов двух статусов?
lwwAssignIfDiffer
была для любого поля?
{ track_provider = "github" | ||
, track_source = address | ||
, track_externalId | ||
, track_url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Почему теперь стиль нижнего подчеркивания вместо camelCase
?
singletonTaskModeMap today note = Map.singleton (taskMode today note) [note] | ||
|
||
noteView :: NoteId -> Note -> NoteView | ||
noteView nid Note {..} = NoteView |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Теперь все через тип Note
? Не нашел, где он объявлен.
|
||
import FF.Storage (Collection, MonadStorage (..), listDocuments, | ||
modify) | ||
import FF.Types (Note) | ||
|
||
upgradeDatabase :: MonadStorage m => m () |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Апргрейд базы данных будет происходить в ручном режиме или автоматическом?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Теперь все через тип Note?
Вроде того
Не нашел, где он объявлен.
Генерится в FF.Types
Reviewable status: all files reviewed, 7 unresolved discussions (waiting on @willbasky)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 7 unresolved discussions (waiting on @cblp and @willbasky)
ff-core/lib/FF.hs, line 309 at r8 (raw file):
Previously, willbasky (Vladislav Sabanov) wrote…
Хорошо код упростился и более читаемым стал.
Спасибо
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 7 unresolved discussions (waiting on @willbasky and @cblp)
ff-core/lib/FF.hs, line 391 at r8 (raw file):
Функция для решения конфликтов двух статусов?
В CRDT нет конфликтов по определению. Эта функция обновляет поле, только если его надо обновить.
lwwAssignIfDiffer была для любого поля?
Да, но использовалась только для одного.
Я завёл задачу о том, чтобы имет возможность обобщать такие конструкции — ff-notes/ron#13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 7 unresolved discussions (waiting on @willbasky and @cblp)
ff-core/lib/FF/Github.hs, line 107 at r8 (raw file):
Previously, willbasky (Vladislav Sabanov) wrote…
Почему теперь стиль нижнего подчеркивания вместо
camelCase
?
Мне так кажется более понятным. Например, fooBarBaz — это поле barBaz в структуре foo или поле baz в структуре fooBar? А если написать foo_barBaz или fooBar_baz, то становится понятно.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 8 unresolved discussions (waiting on @willbasky)
a discussion (no related file):
CHANGELOG
В строчках 127-152, templete haskell? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 8 unresolved discussions (waiting on @willbasky and @cblp)
ff-core/lib/FF/Upgrade.hs, line 14 at r8 (raw file):
Previously, willbasky (Vladislav Sabanov) wrote…
Апргрейд базы данных будет происходить в ручном режиме или автоматическом?
Полное обновление формата — в ручном, если я правильно понял вопрос. По команде ff upgrade
.
Но при любом изменении данных новая версия всегда записывается в самом новом формате.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r14.
Reviewable status: all files reviewed, 3 unresolved discussions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 4 files at r15.
Reviewable status: all files reviewed, 3 unresolved discussions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 3 files at r16.
Reviewable status: all files reviewed, 1 unresolved discussion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r17.
Reviewable status: all files reviewed, 1 unresolved discussion
ff-core/lib/FF.hs, line 323 at r16 (raw file):
что означает eStart, время начала редактирования? |
ff-core/lib/FF.hs, line 346 at r16 (raw file):
может mEnd? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r18.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @willbasky and @cblp)
ff-core/lib/FF.hs, line 323 at r16 (raw file):
Previously, willbasky (Vladislav Sabanov) wrote…
что означает eStart, время начала редактирования?
Время начала задачи после редактирования пользователем. Оно же из editStart берётся.
…N as the primary format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @willbasky)
ff-core/lib/FF.hs, line 346 at r16 (raw file):
Previously, willbasky (Vladislav Sabanov) wrote…
может mEnd?
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r19.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @willbasky)
ff-core/lib/FF/Types.hs, line 130 at r16 (raw file):
Все-таки, мн не ясно, почему для объявления типов используется темплейт хаскель. |
ff-core/lib/FF/Types.hs, line 185 at r16 (raw file):
А для этих типов не используется. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @willbasky and @cblp)
ff-core/lib/FF/Types.hs, line 130 at r16 (raw file):
Previously, willbasky (Vladislav Sabanov) wrote…
Все-таки, мн не ясно, почему для объявления типов используется темплейт хаскель.
Для того, чтобы из этой же схемы сгенерить типы и функции в других языках.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @willbasky)
ff-core/lib/FF/Types.hs, line 185 at r16 (raw file):
Previously, willbasky (Vladislav Sabanov) wrote…
А для этих типов не используется.
Эти не входят в схему БД.
ff-core/lib/FF.hs, line 323 at r16 (raw file): Previously, cblp (Yuriy Syrovetskiy) wrote…
А зачем засекать время начала и конца редактирования? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @willbasky)
ff-core/lib/FF.hs, line 323 at r16 (raw file):
Previously, willbasky (Vladislav Sabanov) wrote…
А зачем засекать время начала и конца редактирования?
Никто его не засекает.
ff-core/lib/FF/Types.hs, line 130 at r16 (raw file): Previously, cblp (Yuriy Syrovetskiy) wrote…
То есть это задел на перспективу, чтобы другие из других языков могли пользоваться библиотекой? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @willbasky)
ff-core/lib/FF/Types.hs, line 130 at r16 (raw file):
Previously, willbasky (Vladislav Sabanov) wrote…
То есть это задел на перспективу, чтобы другие из других языков могли пользоваться библиотекой?
Чтобы для других языков можно было написать другие библиотеки, совместимые с этими же типами.
For #25
This change is