Commit Graph

1282 Commits

Author SHA1 Message Date
Tom Alexander 1d329cc310
Apply more suggestions. 2023-10-16 17:28:28 -04:00
Tom Alexander b4f9a3b9b6
Apply more suggestions. 2023-10-16 17:14:44 -04:00
Tom Alexander 2dd5246506
Apply more suggestions. 2023-10-16 17:03:39 -04:00
Tom Alexander 4ba0e3611b
Apply more suggestions. 2023-10-16 17:03:39 -04:00
Tom Alexander 728f79b86c
Apply more suggestions. 2023-10-16 17:03:39 -04:00
Tom Alexander 192a4a2891
Remove unnecessary lifetimes. 2023-10-16 17:03:39 -04:00
Tom Alexander f10efec21d
No performance change switching affiliated_key to using element macro. 2023-10-16 15:57:18 -04:00
Tom Alexander 72b4cf8e71
Add the first use of the rust benchmark tests. 2023-10-16 15:50:08 -04:00
Tom Alexander 547fc40dbe
No measurable performance improvement with native builds over LTO release builds.
rustfmt Build rustfmt has succeeded Details
rust-foreign-document-test Build rust-foreign-document-test has failed Details
rust-build Build rust-build has succeeded Details
rust-test Build rust-test has succeeded Details
Leaving the code for this commented out because it involved an unstable cargo feature without showing any benefit. I would like to revisit this later.
2023-10-16 15:21:36 -04:00
Tom Alexander 18d0676fad
Clean up. 2023-10-16 15:03:23 -04:00
Tom Alexander 7833a58461
Apply a similar optimization to the detect element parser but also unify detection of affiliated keywords. 2023-10-16 14:55:40 -04:00
Tom Alexander 0020d71089
Extend that optimization to more object parsers. 2023-10-16 14:41:12 -04:00
Tom Alexander cfdf39d1fa
Significantly reduce the use of closures in the object parsers. 2023-10-16 14:25:02 -04:00
Tom Alexander 3eff85059a
Add support for planning before property drawer when calculating additional properties for headlines. 2023-10-16 13:35:03 -04:00
Tom Alexander c86d1000c0
Do not clear values in lists of strings.
rust-foreign-document-test Build rust-foreign-document-test has failed Details
rust-build Build rust-build has succeeded Details
rust-test Build rust-test has succeeded Details
This is a hold-over from when I had list of single string which was a misunderstanding of the optional pair type.
2023-10-16 12:58:20 -04:00
Tom Alexander 911634cb42
Attr_ affiliated keywords should be lists of strings. 2023-10-16 12:55:18 -04:00
Tom Alexander 0aa746fb1e
Implement comparison for object tree. 2023-10-16 12:50:53 -04:00
Tom Alexander 33800c4a88
Implement comparison for optional pair. 2023-10-16 12:05:36 -04:00
Tom Alexander 909ccadfa1
Beginning update to compare_affiliated_keywords. 2023-10-16 11:45:54 -04:00
Tom Alexander e352deb989
Update parse_affiliated_keywords for handling optional pairs. 2023-10-16 11:42:20 -04:00
Tom Alexander f5a6a26c43
Disable the existing handling of affiliated keywords. 2023-10-15 20:31:14 -04:00
Tom Alexander f5dcacc79d
Do not match keyword name if a longer keyword name would match. 2023-10-15 15:55:19 -04:00
Tom Alexander e7c3c7aab6
Switch the keyword parsers over to using the settings from GlobalSettings. 2023-10-15 15:17:08 -04:00
Tom Alexander d2d8c1ffcf
Fix build for compare with tracing. 2023-10-14 19:20:49 -04:00
Tom Alexander b9c638c280
Fix tracing.
rustfmt Build rustfmt has succeeded Details
rust-build Build rust-build has failed Details
rust-foreign-document-test Build rust-foreign-document-test has failed Details
rust-test Build rust-test has succeeded Details
2023-10-14 19:02:35 -04:00
Tom Alexander ad5efc4b0f
Only require sync on FileAccessInterface when compiling for compare utilities.
rust-test Build rust-test has failed Details
rust-build Build rust-build has failed Details
rust-foreign-document-test Build rust-foreign-document-test has failed Details
Otherwise async compatibility would impact sync users of the plain library.
2023-10-14 18:09:50 -04:00
Tom Alexander e1fde88a60
Switch to using tokio too invoke emacs async. 2023-10-14 17:58:50 -04:00
Tom Alexander 123da9cca3
Make the compare functions async. 2023-10-14 17:51:12 -04:00
Tom Alexander c20e7b5f2f
Make compare an always-async program.
This program is used as a development tool, so it is more valuable that we make it simple by only supporting one mode of operation (async) than making it widely compatible by supporting both.
2023-10-14 17:50:53 -04:00
Tom Alexander 74a3512038
Report whether all the tests passed. 2023-10-14 17:50:53 -04:00
Tom Alexander ff04c4a131
Sort files in a compare_all_org_document. 2023-10-14 17:50:53 -04:00
Tom Alexander aa35d1dc03
Copy over the rest of the foreign document test config. 2023-10-14 15:18:57 -04:00
Tom Alexander 92afdc0ea6
Strip prefix from file path. 2023-10-14 15:18:57 -04:00
Tom Alexander f43920fc7c
Add a silent mode for running the diff. 2023-10-14 15:18:57 -04:00
Tom Alexander dde4bc7920
Add code for structured printing of test results. 2023-10-14 14:30:24 -04:00
Tom Alexander 8271f6b44a
Start invoking the tests. 2023-10-13 13:20:21 -04:00
Tom Alexander 8a26965e14
Write a function to compare all org-mode files in a directory. 2023-10-13 13:02:17 -04:00
Tom Alexander 3927889e66
Change test status to pass/fail. 2023-10-13 12:14:46 -04:00
Tom Alexander 5ecd7b8bef
Launch tests in parallel. 2023-10-13 12:07:52 -04:00
Tom Alexander b0b795d13b
Limit concurrency of running tests. 2023-10-13 11:41:49 -04:00
Tom Alexander 182c2737cd
Add futures. 2023-10-13 11:27:43 -04:00
Tom Alexander 5f93cabff5
Hit recursive async. 2023-10-13 11:27:42 -04:00
Tom Alexander a1f8cbe079
Working on invoking the tests. 2023-10-13 11:27:42 -04:00
Tom Alexander d7e870cba1
Starting to make result structs. 2023-10-13 11:27:42 -04:00
Tom Alexander 591b5ed382
Starting to define a TestConfig enum. 2023-10-13 11:27:42 -04:00
Tom Alexander fd141762f0
Start a rust-based foreign document test.
Instead of using a simple bash script, this will use async rust to run multiple tests in parallel.
2023-10-13 11:27:42 -04:00
Tom Alexander c039e0d62c
Keywords without affiliated keywords should be lower priority than paragraphs with affiliated keywords. 2023-10-12 17:32:29 -04:00
Tom Alexander e6e3783ec6
Support parsing affiliated keywords as keywords. 2023-10-12 17:23:54 -04:00
Tom Alexander 5ae19e455d
Remove unused imports. 2023-10-12 17:14:18 -04:00
Tom Alexander f475754a71
Port the rest of the element parsers over. 2023-10-12 17:12:55 -04:00
Tom Alexander 767f44f94d
Port comment. 2023-10-12 16:52:49 -04:00
Tom Alexander 1411aca7b5
Port footnote definition. 2023-10-12 16:48:50 -04:00
Tom Alexander 9ccdcaac24
Port dynamic block. 2023-10-12 16:46:15 -04:00
Tom Alexander d1223dcdb7
Port paragraph parser to use ak_element. 2023-10-12 16:37:31 -04:00
Tom Alexander 59448a4f2c
Port greater blocker over to ak_element!(). 2023-10-12 16:27:57 -04:00
Tom Alexander 5136880532
Fix tests. 2023-10-12 16:14:23 -04:00
Tom Alexander 8654cf5507
Fully port over the first parser. 2023-10-12 16:09:35 -04:00
Tom Alexander 6ca4dc8ffc
Add a macro for calling parsers that take in the affiliated keywords. 2023-10-12 16:06:59 -04:00
Tom Alexander a6f36ba679
Create a template for new element functions that will take in the affiliated keywords instead of re-parsing them multiple times. 2023-10-12 15:47:06 -04:00
Tom Alexander 176e37874e
Remove the parser to parse affiliated keywords as regular keywords. 2023-10-12 15:25:26 -04:00
Tom Alexander 0d579263cb
Remove affiliated keyword non-exit for paragraph. 2023-10-12 14:07:57 -04:00
Tom Alexander 8bc942a26f
Create artificial scopes for the optional value and mandatory value. 2023-10-11 19:14:32 -04:00
Tom Alexander dff7550038
Remove prints. 2023-10-11 19:09:51 -04:00
Tom Alexander c4edcb8c24
Fix parsing the optional value. 2023-10-11 19:07:47 -04:00
Tom Alexander 4a44d88461
Better error messages. 2023-10-11 19:05:39 -04:00
Tom Alexander efc6bd11d9
Do not exit on first loop. 2023-10-11 18:59:13 -04:00
Tom Alexander 51429e3155
Handle optval when translating names. 2023-10-11 18:50:22 -04:00
Tom Alexander b1a0fa4acf
Compare optional value. 2023-10-11 18:44:21 -04:00
Tom Alexander aeb2b6fe68
Parse out the optional value objects. 2023-10-11 18:29:07 -04:00
Tom Alexander 6679db98a8
Add comments. 2023-10-11 17:53:32 -04:00
Tom Alexander dc9188dffc
Better error logging when emacs errors out.
rustfmt Build rustfmt has succeeded Details
rust-build Build rust-build has succeeded Details
rust-test Build rust-test has failed Details
rust-foreign-document-test Build rust-foreign-document-test has failed Details
2023-10-11 17:22:01 -04:00
Tom Alexander bd620ccd0d
Format. 2023-10-11 16:32:08 -04:00
Tom Alexander 3fcf1b3864
Compare Document additional properties. 2023-10-11 16:27:25 -04:00
Tom Alexander d965dd6fd1
Implement get_additional_properties for Document. 2023-10-11 16:14:03 -04:00
Tom Alexander a9f067e25a
Update name tests to use all the affiliated keywords. 2023-10-11 15:25:09 -04:00
Tom Alexander 41b4b1015e
Update all comparisons to handle affiliated keywords. 2023-10-11 14:57:32 -04:00
Tom Alexander 9523365090
Update all elements to the new AffiliatedKeywords. 2023-10-11 14:44:25 -04:00
Tom Alexander aa33fe42a8
Update compare_properties to handle affiliated keywords. 2023-10-11 14:14:33 -04:00
Tom Alexander 78a9b93f22
Nevermind, it did work. 2023-10-11 14:03:42 -04:00
Tom Alexander a89339e472
Using owned string did not solve it. 2023-10-11 14:00:18 -04:00
Tom Alexander f3307a8159
Lifetime issue. 2023-10-11 13:55:43 -04:00
Tom Alexander 4bfa25dcb3
Comparing lists of quoted strings. 2023-10-11 13:04:33 -04:00
Tom Alexander 441a240c33
Comparing single string values. 2023-10-11 13:00:21 -04:00
Tom Alexander e767892dd5
Add capitalization. 2023-10-11 12:42:42 -04:00
Tom Alexander 8e0a7dea0f
A very simple GetAffiliatedKeywords trait. 2023-10-11 12:19:27 -04:00
Tom Alexander c4cc40f5e1
Parsing the affiliated keywords. 2023-10-11 12:16:35 -04:00
Tom Alexander a5129199c7
I need to parse the affiliated keywords during parsing because it relies on the global settings. 2023-10-11 12:16:35 -04:00
Tom Alexander c0e462944d
Comment out the broken stuff. 2023-10-11 12:16:35 -04:00
Tom Alexander 63614841e8
Trait lifetime issues. 2023-10-11 12:16:35 -04:00
Tom Alexander bc4c09c546
Add constants for affiliated keyword settings. 2023-10-11 12:16:35 -04:00
Tom Alexander 0d1ab0e75a
Add a debug assert for org entities being sorted. 2023-10-11 12:16:35 -04:00
Tom Alexander 6e39029f91
Store the affiliated keywords on the plainlist. 2023-10-10 18:10:34 -04:00
Tom Alexander 7cb71a5a0a
Compare the additional properties on headlines. 2023-10-10 17:40:27 -04:00
Tom Alexander 6b90a9bfa8
Add TODO. 2023-10-10 17:15:51 -04:00
Tom Alexander 6d4db60688
Support ("") as being equal to None in compare_property_list_of_ast_nodes. 2023-10-10 16:35:16 -04:00
Tom Alexander 3aca01891d
Remove the old implementation of comparing headlines. 2023-10-10 16:12:29 -04:00
Tom Alexander 275ed87c3f
Add a compare_properties variant with support for additional properties. 2023-10-10 16:10:12 -04:00
Tom Alexander b385270d7b
Implement a function to get the additional properties on a headline. 2023-10-10 15:54:44 -04:00
Tom Alexander 585b1d2b74
compare_properties for document. 2023-10-10 15:30:27 -04:00
Tom Alexander c578bb45af
Implement ExactSizeIterator for the other node types. 2023-10-10 15:27:03 -04:00