2025-05-03 18:39:36 +02:00
|
|
|
#+title: Notes
|
2025-05-04 14:22:19 +02:00
|
|
|
#+property: EFFORT_ALL 0 10
|
2025-05-03 18:39:36 +02:00
|
|
|
|
2025-05-03 21:56:12 +02:00
|
|
|
* DONE show errors with ariadne
|
2025-05-03 18:39:36 +02:00
|
|
|
:PROPERTIES:
|
|
|
|
|
:EFFORT: 10min
|
|
|
|
|
:END:
|
2025-05-03 19:00:41 +02:00
|
|
|
** [X] errors should have a generic show() function
|
2025-05-03 18:39:36 +02:00
|
|
|
:PROPERTIES:
|
|
|
|
|
:EFFORT: 10min
|
|
|
|
|
:END:
|
|
|
|
|
:LOGBOOK:
|
|
|
|
|
CLOCK: [2025-05-03 sam. 18:40]--[2025-05-03 sam. 18:46] => 0:06
|
|
|
|
|
:END:
|
2025-05-03 21:25:19 +02:00
|
|
|
** DONE OSDBError::display() should take a filename and display it alongside the error
|
|
|
|
|
:LOGBOOK:
|
2025-05-03 21:29:40 +02:00
|
|
|
CLOCK: [2025-05-03 sam. 21:24]--[2025-05-03 sam. 21:28] => 0:04
|
|
|
|
|
:END:
|
|
|
|
|
** DONE OSDBError::display() should take an input string, to be able to resolve spans inside the error
|
|
|
|
|
:PROPERTIES:
|
|
|
|
|
:EFFORT: 10
|
|
|
|
|
:END:
|
|
|
|
|
:LOGBOOK:
|
|
|
|
|
CLOCK: [2025-05-03 sam. 21:28]--[2025-05-03 sam. 21:30] => 0:02
|
2025-05-03 21:25:19 +02:00
|
|
|
:END:
|
2025-05-03 21:31:26 +02:00
|
|
|
** DONE OSDBError::display() should generate ariadne errors and return those
|
|
|
|
|
:PROPERTIES:
|
|
|
|
|
:EFFORT: 10
|
|
|
|
|
:END:
|
|
|
|
|
:LOGBOOK:
|
|
|
|
|
CLOCK: [2025-05-03 sam. 21:30]--[2025-05-03 sam. 21:50] => 0:20
|
|
|
|
|
:END:
|
2025-05-03 21:55:06 +02:00
|
|
|
** DONE error display should include a span to show where the error occured
|
|
|
|
|
:PROPERTIES:
|
|
|
|
|
:EFFORT: 10
|
|
|
|
|
:END:
|
|
|
|
|
:LOGBOOK:
|
|
|
|
|
CLOCK: [2025-05-03 sam. 21:51]--[2025-05-03 sam. 21:54] => 0:03
|
|
|
|
|
:END:
|
2025-05-03 21:56:12 +02:00
|
|
|
** DONE deduplicate error display code
|
|
|
|
|
:PROPERTIES:
|
|
|
|
|
:EFFORT: 10
|
|
|
|
|
:END:
|
|
|
|
|
:LOGBOOK:
|
|
|
|
|
CLOCK: [2025-05-03 sam. 21:55]--[2025-05-03 sam. 22:01] => 0:06
|
|
|
|
|
:END:
|
2025-05-03 21:21:59 +02:00
|
|
|
* DONE snapshot testing
|
2025-05-03 19:00:41 +02:00
|
|
|
|
|
|
|
|
** DONE Find the snapshot testing library
|
|
|
|
|
:PROPERTIES:
|
|
|
|
|
:EFFORT: 10min
|
|
|
|
|
:END:
|
|
|
|
|
:LOGBOOK:
|
|
|
|
|
CLOCK: [2025-05-03 sam. 18:48]--[2025-05-03 sam. 18:49] => 0:01
|
|
|
|
|
:END:
|
|
|
|
|
|
|
|
|
|
** DONE document myself on insta, the snapshot testing library
|
|
|
|
|
:PROPERTIES:
|
|
|
|
|
:EFFORT: 10min
|
|
|
|
|
:END:
|
|
|
|
|
:LOGBOOK:
|
|
|
|
|
CLOCK: [2025-05-03 sam. 18:49]--[2025-05-03 sam. 18:57] => 0:08
|
|
|
|
|
:END:
|
|
|
|
|
|
2025-05-03 19:06:59 +02:00
|
|
|
** DONE insta test startup message
|
2025-05-03 19:00:41 +02:00
|
|
|
:PROPERTIES:
|
|
|
|
|
:EFFORT: 10min
|
|
|
|
|
:END:
|
|
|
|
|
:LOGBOOK:
|
2025-05-03 19:06:59 +02:00
|
|
|
CLOCK: [2025-05-03 sam. 19:00]--[2025-05-03 sam. 19:05] => 0:05
|
2025-05-03 19:00:41 +02:00
|
|
|
:END:
|
2025-05-03 21:13:46 +02:00
|
|
|
** DONE insta test insert
|
2025-05-03 19:00:41 +02:00
|
|
|
:PROPERTIES:
|
|
|
|
|
:EFFORT: 10min
|
|
|
|
|
:END:
|
2025-05-03 19:21:05 +02:00
|
|
|
:LOGBOOK:
|
2025-05-03 21:13:46 +02:00
|
|
|
CLOCK: [2025-05-03 sam. 21:10]--[2025-05-03 sam. 21:14] => 0:04
|
2025-05-03 19:21:05 +02:00
|
|
|
CLOCK: [2025-05-03 sam. 19:08]--[2025-05-03 sam. 19:21] => 0:13
|
|
|
|
|
:END:
|
|
|
|
|
*** DONE all display of command results must be made via a display method on CommandExecutionResult
|
|
|
|
|
:PROPERTIES:
|
|
|
|
|
:EFFORT: 10min
|
|
|
|
|
:END:
|
|
|
|
|
:LOGBOOK:
|
|
|
|
|
CLOCK: [2025-05-03 sam. 21:02]--[2025-05-03 sam. 21:09] => 0:07
|
|
|
|
|
:END:
|
2025-05-03 21:15:33 +02:00
|
|
|
** DONE insta test select
|
2025-05-03 19:00:41 +02:00
|
|
|
:PROPERTIES:
|
|
|
|
|
:EFFORT: 10min
|
|
|
|
|
:END:
|
2025-05-03 21:15:33 +02:00
|
|
|
:LOGBOOK:
|
|
|
|
|
CLOCK: [2025-05-03 sam. 21:15]--[2025-05-03 sam. 21:16] => 0:01
|
|
|
|
|
:END:
|
2025-05-03 21:18:20 +02:00
|
|
|
** DONE insta test .exit
|
2025-05-03 19:00:41 +02:00
|
|
|
:PROPERTIES:
|
|
|
|
|
:EFFORT: 10min
|
|
|
|
|
:END:
|
2025-05-03 21:18:20 +02:00
|
|
|
:LOGBOOK:
|
|
|
|
|
CLOCK: [2025-05-03 sam. 21:16]--[2025-05-03 sam. 21:18] => 0:02
|
|
|
|
|
:END:
|
2025-05-03 21:20:54 +02:00
|
|
|
** DONE insta test wrong statement
|
2025-05-03 19:00:41 +02:00
|
|
|
:PROPERTIES:
|
|
|
|
|
:EFFORT: 10min
|
|
|
|
|
:END:
|
2025-05-03 21:20:54 +02:00
|
|
|
:LOGBOOK:
|
|
|
|
|
CLOCK: [2025-05-03 sam. 21:18]--[2025-05-03 sam. 21:21] => 0:03
|
|
|
|
|
:END:
|
2025-05-03 21:21:59 +02:00
|
|
|
** DONE insta test wrong meta-command
|
2025-05-03 19:00:41 +02:00
|
|
|
:PROPERTIES:
|
|
|
|
|
:EFFORT: 10min
|
|
|
|
|
:END:
|
2025-05-03 21:21:59 +02:00
|
|
|
:LOGBOOK:
|
|
|
|
|
CLOCK: [2025-05-03 sam. 21:21]--[2025-05-03 sam. 21:22] => 0:01
|
|
|
|
|
:END:
|
2025-05-03 19:06:59 +02:00
|
|
|
|
|
|
|
|
* DONE exit message is not displayed when pressing C-d :bug:
|
|
|
|
|
:PROPERTIES:
|
|
|
|
|
:EFFORT: 10min
|
|
|
|
|
:END:
|
|
|
|
|
:LOGBOOK:
|
|
|
|
|
CLOCK: [2025-05-03 sam. 19:06]--[2025-05-03 sam. 19:07] => 0:01
|
|
|
|
|
:END:
|
2025-05-03 21:31:26 +02:00
|
|
|
|
2025-05-04 14:22:19 +02:00
|
|
|
* DONE switch statement parsing to more extensible token-based algorithm
|
2025-05-04 12:06:47 +02:00
|
|
|
:PROPERTIES:
|
|
|
|
|
:EFFORT: 10
|
|
|
|
|
:END:
|
|
|
|
|
:LOGBOOK:
|
|
|
|
|
CLOCK: [2025-05-04 dim. 12:07]--[2025-05-04 dim. 12:10] => 0:03
|
|
|
|
|
CLOCK: [2025-05-04 dim. 12:10]--[2025-05-04 dim. 12:22] => 0:12
|
|
|
|
|
:END:
|
2025-05-04 14:22:19 +02:00
|
|
|
** DONE recognize meta-commands as tokens
|
2025-05-04 12:06:47 +02:00
|
|
|
:PROPERTIES:
|
|
|
|
|
:EFFORT: 10
|
|
|
|
|
:END:
|
|
|
|
|
:LOGBOOK:
|
|
|
|
|
CLOCK: [2025-05-04 dim. 13:32]--[2025-05-04 dim. 13:35] => 0:03
|
|
|
|
|
CLOCK: [2025-05-04 dim. 13:27]--[2025-05-04 dim. 13:32] => 0:05
|
|
|
|
|
:END:
|
|
|
|
|
|
2025-05-04 14:22:19 +02:00
|
|
|
** DONE CommandParseError must have a ScanError variant with an Into impl
|
2025-05-04 12:06:47 +02:00
|
|
|
:PROPERTIES:
|
|
|
|
|
:EFFORT: 10
|
|
|
|
|
:END:
|
2025-05-04 13:36:39 +02:00
|
|
|
:LOGBOOK:
|
|
|
|
|
CLOCK: [2025-05-04 dim. 13:35]--[2025-05-04 dim. 13:38] => 0:03
|
|
|
|
|
:END:
|
2025-05-04 12:06:47 +02:00
|
|
|
|
2025-05-04 14:22:19 +02:00
|
|
|
** DONE ScanErrors must be convertible to ariadne reports
|
2025-05-04 12:06:47 +02:00
|
|
|
:PROPERTIES:
|
|
|
|
|
:EFFORT: 10
|
|
|
|
|
:END:
|
|
|
|
|
|
2025-05-04 14:22:19 +02:00
|
|
|
*** DONE Remove the CommandParseError Display implementation
|
2025-05-04 13:43:05 +02:00
|
|
|
:PROPERTIES:
|
|
|
|
|
:EFFORT: 10
|
|
|
|
|
:END:
|
|
|
|
|
:LOGBOOK:
|
|
|
|
|
CLOCK: [2025-05-04 dim. 13:38]--[2025-05-04 dim. 13:44] => 0:06
|
|
|
|
|
:END:
|
|
|
|
|
|
2025-05-04 14:22:19 +02:00
|
|
|
*** DONE implement OSDBError for ScanError
|
2025-05-04 12:06:47 +02:00
|
|
|
:PROPERTIES:
|
|
|
|
|
:EFFORT: 10
|
|
|
|
|
:END:
|
2025-05-04 13:55:56 +02:00
|
|
|
:LOGBOOK:
|
|
|
|
|
CLOCK: [2025-05-04 dim. 13:45]--[2025-05-04 dim. 13:56] => 0:11
|
|
|
|
|
:END:
|
2025-05-04 12:06:47 +02:00
|
|
|
|
2025-05-04 14:22:19 +02:00
|
|
|
** DONE remove token types which are not recognized at all
|
2025-05-04 12:06:47 +02:00
|
|
|
:PROPERTIES:
|
|
|
|
|
:EFFORT: 10
|
|
|
|
|
:END:
|
|
|
|
|
|
2025-05-04 14:22:19 +02:00
|
|
|
** DONE create a generic parse command that parses string into tokens into Command
|
2025-05-04 14:09:33 +02:00
|
|
|
:PROPERTIES:
|
|
|
|
|
:EFFORT: 10
|
|
|
|
|
:END:
|
|
|
|
|
:LOGBOOK:
|
|
|
|
|
CLOCK: [2025-05-04 dim. 14:01]--[2025-05-04 dim. 14:14] => 0:13
|
|
|
|
|
:END:
|
|
|
|
|
|
2025-05-04 14:22:19 +02:00
|
|
|
** DONE parse tokens into meta-commands
|
2025-05-04 12:06:47 +02:00
|
|
|
:PROPERTIES:
|
|
|
|
|
:EFFORT: 10
|
|
|
|
|
:END:
|
|
|
|
|
|
2025-05-04 18:10:50 +02:00
|
|
|
* DONE error offsets are incorrect
|
2025-05-04 14:22:19 +02:00
|
|
|
|
2025-05-04 18:17:36 +02:00
|
|
|
* DONE remove old FromStr parser implementation
|
2025-05-04 18:10:50 +02:00
|
|
|
|
2025-05-10 10:20:26 +02:00
|
|
|
* DONE use a better readline impl
|
2025-05-04 18:10:50 +02:00
|
|
|
|
2025-05-04 18:36:43 +02:00
|
|
|
** DONE inform myself on the different alternatives and decide on one
|
|
|
|
|
i will use rustyline, since it seems like the most feature-complete
|
|
|
|
|
|
|
|
|
|
** DONE do the impl
|
|
|
|
|
|
2025-05-10 10:20:26 +02:00
|
|
|
** DONE make history work
|
2025-05-09 17:16:05 +02:00
|
|
|
|
|
|
|
|
*** DONE have the rl instance be spawned from main
|
|
|
|
|
|
2025-05-10 10:20:26 +02:00
|
|
|
*** DONE figure out how to locate the app data directory on linux
|
2025-05-09 17:16:05 +02:00
|
|
|
|
2025-05-10 10:20:26 +02:00
|
|
|
*** DONE create our own app data directory
|
2025-05-09 17:16:05 +02:00
|
|
|
|
2025-05-10 10:20:26 +02:00
|
|
|
*** DONE load and save the history from a file in this directory
|
2025-05-04 18:36:43 +02:00
|
|
|
|
2025-05-10 10:20:26 +02:00
|
|
|
* DONE handle non-interactive input better
|
2025-05-04 18:17:36 +02:00
|
|
|
|
2025-05-10 10:33:57 +02:00
|
|
|
* DONE show marking where error occurs
|
|
|
|
|
|
2025-05-10 10:41:30 +02:00
|
|
|
* DONE remove uneeded error variants
|
|
|
|
|
|
2025-05-24 13:28:56 +02:00
|
|
|
* DONE parse integers
|
2025-05-10 10:55:44 +02:00
|
|
|
|
2025-05-24 13:28:56 +02:00
|
|
|
** DONE Function to get a token until condition is false
|
2025-05-10 10:55:44 +02:00
|
|
|
|
2025-05-24 13:28:56 +02:00
|
|
|
** DONE Parse the integer
|
2025-05-10 10:55:44 +02:00
|
|
|
|
2025-05-24 13:28:56 +02:00
|
|
|
* DONE parse strings
|
|
|
|
|
|
2025-05-25 17:20:23 +02:00
|
|
|
* DONE better error message display for unclosed " in string
|
|
|
|
|
|
2025-05-30 13:44:35 +02:00
|
|
|
* DONE print errors to stderr
|
|
|
|
|
|
2025-05-30 13:52:26 +02:00
|
|
|
* DONE write a proper grammar
|
|
|
|
|
|
2025-05-31 15:59:58 +02:00
|
|
|
* DONE .about meta-command
|
|
|
|
|
* DONE .version meta-command
|
2025-05-30 13:52:26 +02:00
|
|
|
* TODO .license meta-command
|
2025-05-30 15:48:02 +02:00
|
|
|
* TODO .help meta-command
|
2025-05-24 13:28:56 +02:00
|
|
|
|
2025-06-03 17:53:22 +02:00
|
|
|
* DONE parse insert statements in the form
|
2025-05-24 13:28:56 +02:00
|
|
|
insert <id:int> <username:string> <email:string>
|
2025-06-03 17:53:22 +02:00
|
|
|
** DONE parse row insert
|
|
|
|
|
* DONE separate statements with semicolons
|
|
|
|
|
* TODO this error message could be better
|
|
|
|
|
#+begin example
|
|
|
|
|
Error: unexpected token
|
|
|
|
|
╭─[ <stdin>:1:24 ]
|
|
|
|
|
│
|
|
|
|
|
1 │ insert 0 "user" "email"
|
|
|
|
|
│ │
|
|
|
|
|
│ ╰─ found end of file ""
|
|
|
|
|
│
|
|
|
|
|
│ Note: expected token type to be one of ["semicolon"]
|
|
|
|
|
───╯
|
|
|
|
|
#+end example
|
|
|
|
|
* TODO correct all instances of <unknown> in locations
|
|
|
|
|
* TODO meta-commands must be followed by end-of-file
|
|
|
|
|
* DONE in case of parse error, skip until next semicolon to better recover
|
|
|
|
|
* TODO serialize/deserialize row to/from raw bytes
|
|
|
|
|
** TODO look for best practices for creating binary formats
|
2025-05-10 10:55:44 +02:00
|
|
|
|
|
|
|
|
* WAIT cli tests using insta-cmd
|
2025-05-04 18:17:36 +02:00
|
|
|
https://insta.rs/docs/cmd/
|
2025-05-04 18:36:43 +02:00
|
|
|
|
|
|
|
|
* WAIT autocompletion
|
|
|
|
|
needs a more complicated parser for that to make sense
|
|
|
|
|
|
|
|
|
|
* WAIT tweak rustyline it to make multiline entry work
|
|
|
|
|
need to terminate commands with semicolons for that to make sense
|