Open
Conversation
Problem: at this moment we use our own format in editor mode. Reinventing the wheel can be hard and time consuming. Solution: changed this format to `TOML`.
Problem: at this moment `entry path` is required argument. Sometimes we don't want to specify entry path in editor mode while creating entry. Solution: made `entry path` in `create` command optional argument.
Problem: `tomland` is bugging on non-ascii characters and `toml` spec doesn't support some escape sequences like `\NUL` or `\DEL`. Solution: rollbacked on our homebrewed editor file format and added tags support.
Problem: after changes in editor mode unit and property tests are not compiling. Moreover, they are outdated. Solution: updated these tests.
904796a to
be67a10
Compare
sancho20021
reviewed
May 4, 2022
Contributor
sancho20021
left a comment
There was a problem hiding this comment.
Currently, the only option to abort creating an entry using editor mode is to somehow kill the terminal. Could we have another way to abort the creation? Maybe by putting special line in the beginning of the file or clearing the file totally.
| -} | ||
| annotateParseErrors :: [ParseError] -> [AnnotatedLine] -> [AnnotatedLine] | ||
| annotateParseErrors errors lines = foldl' annotateParseError lines errors | ||
| annotateEditorFile :: ParseErrorBundle Text Void -> Text -> [AnnotatedLine] |
Contributor
There was a problem hiding this comment.
When user tries to save incorrect file multiple times, the same error description appends to the end of the existing one.
Example:
BAD_FORMAT
[tags]
#^
# unexpected "[t"
# expecting "=~" or '='
#^
# unexpected "[t"
# expecting "=~" or '='
Maybe we could avoid this
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
An
[-e|--edit]implementation. It opens a temporary file where you seeTOML-like representation of an entry.Also, I've made
entry pathinCreateOptionsparser optional argument.Related issue(s)
No related issues.
✅ Checklist for your Pull Request
Related changes (conditional)
silently reappearing again.
of Public Contracts policy.
and
Stylistic guide (mandatory)