Fixes#972
This required regenerating the protobufs generated files, which seem to
have tons of extra changes, and needed some manual changes to get them
to compile.
Overall, the entire protobuf idea wasn't the best in retrospect, and in
the next version of GitJournal, I'll be going with a simple relational
database instead.
This commit was already in PR #625 but this new one is based on a more
recent version of the master branch.
As discussed in https://github.com/GitJournal/GitJournal/pull/625 the
problem was that if there is no yaml header, the title does not get
stored anywhere and hence gets lost. The fix is to write the title back
to the file as a first heading. This is used for loading the title
anyway, afaict.
The side effect is of course that any *other* application using the note
in the meantime will see the heading containing the note title. This is
way less disruptive than losing the title fully, though.
Lets use dart-git instead. It seems stable enough, and I'm soon going to
be moving away from libgit2 to go-git anyway. This is the first step towards
that.
I'm going to be moving away from libgit2 for the next release, and while
my own dart-git's merging is quite bad in comparison to libgit2, it's
the only way to move forward without libgit2.
The cross-compilation and all is too much of a pain for me to continue
using it. I haven't had an iOS release in over a year because of it.
Plus it sucks all the fun out this project.
Fixes#934
Instead we're going to move back to standard exceptions.
Using a custom Result class has created far far more problems
- The Stacktraces aren't always right
- Sometimes one forgets to check the Result error
- All other exception throwing code needing to be converted to Results
- Non idiomatic Dart code
I think it's better to just go back to exceptions. They have their
problems, but overall, I think it's a better approach.
I haven't made any progress in it over 1.5 years now. It's clear that
I'm not going to.
GitJournal is already way too big, and it doesn't have space for
features which I don't personally use.
This is a lot of boilerplate, but overall its less than what was there
previously. And if I didn't care about preserving the settings, I could
simplify it a lot more.
Any files with external contributions need to be Apache2 licensed, since
I don't have any CLA, and need to release this on the ios store where
*GPL apps are a problem.
This allows switching the precision of Unix timestamps in YAML
frontmatter between second (the current beahaviour) and millisecond
(compatible with Dendron) precision.
I'm trying to get ride of this huge 'Note' class, and have it be quite
dumb. The idea is that we'll have separate Note subclasses - TxtNote,
MdNote, etc
Reason for changes
In debug/dev mode it is impossible to enter metadata edition
screen since it results in an assertion error. The production
flavour doesn't have this problem, because asserts are removed.
The error is caused by empty repo and file paths that in the Note
constructor inserted by metadata screen build method. This screen
needs a note just to show effects of a user configuration.
What changed?
I added a new factory method to File in order to avoid assertion
checks.
What changed?
Notes' properties are now compared using Map interface
and not IMap. IMap is incorrectly handled by DeepCollectionEquality,
which causes equal lists (for example of tags) to be marked as unequal.