Skip to content

v6: TREE VIEW WORKS FOR REGEX SEARCH AND CSV, parser improvements, error form improvement, many bugfixes

Compare
Choose a tag to compare
@molsonkiko molsonkiko released this 13 Dec 22:58
· 63 commits to main since this release

Added

  1. Option to customize which toolbar icons are displayed, and their order.
  2. New regex search form for using treeview to see regex search results in any file.
  3. New document type list box in tree view
  4. For loops in RemesPath
  5. bool, num, s_csv and s_fa RemesPath vectorized arg functions
  6. randint, csv_regex, set, and to_csv RemesPath non-vectorized arg functions
  7. Make second argument of s_split RemesPath function optional; 1-argument variant splits on whitespace.
  8. Right-click dropdown menu in error form, allowing export of errors to JSON or refreshing the form.
  9. The JSON parser is now much better at recovering when an object is missing its closing '}' or an array is missing its closing ']'.
  10. Support for JSON Schema validation of enum keyword where the type is missing or an array.
  11. Ctrl+Up now snaps to parent of currently selected node in tree view. Ctrl+Down now snaps to the last direct child of the currently selected node.

Changed

  1. The internal representation of object keys has changed to allow unescaped strings as keys (THIS DOES NOT AFFECT THE PUBLIC API EXCEPT IN SOME CORNER CASES IN REMESPATH).
    • What I mean by this is that previously the key in the JSON object {"\"": 3} was previously internally represented as "\\\"", with the quote character escaped as shown.
    • This had the advantage of making it slightly faster to display object keys (e.g., when pretty-printing/compressing/dumping), but made it impossible for certain strings to be valid object keys, in a way that could not be detected except when pretty-printing or compressing.
    • Under the new system as of this version, all strings are acceptable as object keys. This has positive implications for RemesPath, as it means that users do not need to remember to escape string JNodes before using them as keys in an object.
  2. When using the JSON-to-CSV form to create CSV files, newline characters will no longer be escaped in strings. This is one of several changes made in order to acheive compliance with RFC 4180.
  3. Made offer_to_show_lint setting (which controls whether a prompt is shown when errors are found) true by default, so that a fresh installation will show the prompt.
  4. Change RemesPath indexers to reduce the number of backslash escapes needed to get keys containing special characters like "a\\b" or "\"foo\"\tbar". For instance, previously @.`\\n\\\\a\"` would be required to match the key "\n\\a\"", whereas now @.`\n\\a"` matches it.
  5. Running a RemesPath query only causes an attempted re-parsing of the document if the treeview's current file is open.
  6. Running a replace query on the find/replace form now causes the tree to display only the values that were mutated.
  7. Changed the tabstop order of some forms, made it so that the find/replace form has complete tabstop coverage, and eliminated some tabstop-related issues associated with combo boxes in some forms.
  8. Benchmarks for compiling RemesPath queries now more accurately represent the effect of caching on performance.

Fixed

  1. Fixed plugin crash when attempting to parse too-large hex numbers like 0x100000000000000000000. Now the parser will fatally fail and add a lint indicating the issue, but the plugin will not actually crash.
  2. Fixed some weird issues where mutating a variable in RemesPath could cause re-executing a query on the same input to return a different value. A minimal example: var x = 1; x = @ + 1; x would return 1 + (the number of times the query was executed) prior to this fix, but now it will always return 2 as expected. This was also true of a bunch of other things in RemesPath, including projections and the map operator.
  3. Fix issues where running a RemesPath query with a projection that referenced a variable indexing on a compile-time constant would cause an error. For example, var x = @; 1->x should return @ (the input to the query), but prior to this fix, it would instead cause an error.
  4. Running tests would previously cause clipboard data to be lost irreversably. Now, if the user's clipboard contained text before running tests, the contents of the clipboard are restored to their pre-test values rather than being hijacked. Non-text data that was copied to the clipboard is still lost when running tests, and I may try to fix that in the future.
  5. dict function in RemesPath previously had a bug that could create invalid JSON if the strings to be turned into keys contained special characters (e.g., literal quote chars, \r, \n).
  6. access violations when loading error form
  7. unnecessary prompt when manually reloading error form
  8. issue with trying to view error form when the error form was already open
  9. RemesPath backtick strings now can have a literal \ character just before the closing backtick. Previously this was impossible because of a regex-writing bug.
  10. Eliminated plugin crash when attempting to validate with an invalid JSON schema. Now a message box will show in that situation.