Skip to content

SYNG Release Notes

2.3.1

  • VSCode: allow explicit opt-in to telemetry even in open-source VS Code via the environment variable SYNG_TELEMETRY_OVERRIDE="1"
  • Fixed a bug causing (:into) to sometimes select a child instead of a parent. This was only manifesting in the case of JavaScript JSX expressions, like 1 being selected in {1} instead of the expression itself.
  • Added a new operator, (:replace-in), that replaces matching text region instead of an entire node.
  • Added a new operator, (:has), that selects a value containing another value.
  • Added a new operator, (:nearest), that selects the nearest enclosing value of another.

2.3.0

  • Added reference documentation for all selectors. This is available on the web under https://syng.dev/doc/ref and in VSCode via the "Go To Definition" LSP feature -- press F12 with your cursor on any selector and it will take you to the definition file.
    • Every selector now has at least one concrete, real-world example.
    • Selector behavior and semantics that may not be immediately clear are now enumerated in their refdocs.
  • Documentation is now hosted at https://syng.dev/doc. The previous links to https://syng.dev/docs/manual will continue to work but result in a permanent redirect (HTTP 302.)
  • (:into) and (:replace) have improved support for lists and elements in a list:
    • (:into) may now select an entire list when it has no operand and is used at a list position
    • (:replace) may now drop matching list elements
  • (:replace) now supports a third argument, reconcile, that eats syntactic tokens adjacent to the target to avoid syntactic errors when target is at the edge of a list
  • JavaScript: (import) in bounded mode once again correctly resolves member access of a default specifier. For example, (call (import jquery ajax)) selects $.ajax() in import $ from "jquery"; $.ajax().
  • LSP: all queries in the document are now type-checked.
  • Introduced a new pragma to avoid type-checking a query. Use ; ignore right before the SEXP to bypass the type-checker for that expression. This is used by default in all LSP reference documents (Go To Definition) for the signature expressions, since they show arity and are rarely well-formed.

More on (:into) and (:replace) list semantics:

(:into) can now appear at list positions, e.g.:

(call _ (:into))
// over ({ a: 1, b: 2 })
// { a: 1, b: 2 }

and it would produce the entire list. But, when it has an operand, it can grab the individual elements too:

(call _ (:into (prop)))
// over ({ a: 1, b: 2 })
// a: 1
// b: 2

Previously, all you could do is (:into) a facet of a child:

(call _ (prop (:into))) ; the keys
(call _ (prop _ (:into))) ; the values

Especially when applied to (:replace), this has tremendous value:

(call x (:replace (arg -1))) ; drop the last argument

2.2.0

  • JavaScript: (obj) and (prop) can now select object literal type declarations, e.g. export type Foo = { ... }
  • JavaScript: (prop) no longer incorrectly selects any object literal that has a spread or rest element
  • Locations where it's legal to use the following selectors are now consistent: (:into), (:text), (:kind), (:replace) and (:capture)
  • VSCode: Scan Options button now correctly renders its icon

2.1.0

  • All 37 errors generated by SYNG now have proper codes, from SYNG1001 through SYNG6003. Every error code has an entry in the website that explains it, its cause, and how to address it, similar in concept to rustc diagnostics.
  • JavaScript: (:export) selects export statements. Unlike (import), only the source is supported for now.
  • Rust: (call) now accepts (mem) for a receiver. This can be composited to find calls to nested receivers, like a.b.c().
  • Fixed a bug in replacement related to overlap detection.

VSCode extension changes:

  • Invoking the Search command without the query document being visible will now look for the closest open query tab and use it to search. This allows you to continue to press Search via the results panel while viewing other files.
  • Language is automatically detected in workspaces where there is a dominant supported language. The heuristic is the same as the CLI applies, and is only regarded in the absence of a pragma directive.
  • Telemetry is captured and submitted once again. Opt-out rules have not changed, although the messaging should be less obtrusive. Data is once again available at https://syng.dev/data.
  • Controls form behaves more like a proper form now by submitting - performing a search - on pressing RETURN while focus is in any of its fields.
  • Exclusion filters, when omitted in the workspace, now use SYNG's default set of exclusions that the CLI also defaults to. This should have no noticeable difference to users that do not opt-out of using VSCode's global exclusion filters (the extension's default mode.)
  • Fixed a few memory leaks where vscode.Disposable entities were not being tracked correctly.
  • Fixed a few bugs and made the extension more resilient overall.

2.0.0

  • (num) no longer accepts an upper bound, instead use the literal range notation (lb..ub)
  • (import) specifier no longer implicitly selects string specifiers. Now, it accepts (:or) at that position allowing you to opt-in to the previous behavior. For example, (import "jquery" (:or ajax "ajax")).

1.1.0

Query parsing received an overhaul:

  • Moved away from the [sexp] crate to a custom implementation based on [s-expr]
  • QL now supports 5 primitives: identifiers, strings, numbers, patterns and backrefs
  • Selector names have been normalized:
    1. Selector::Lit(*) are now flattened:
    2. S::Lit(Lit::Bool) -> S::Bool(BoolSelector)
    3. S::Lit(Lit::Computed) -> S::Computed(ComputedPropNameSelector)
    4. S::Lit(Lit::Null) -> S::Null(NullSelector)
    5. S::Lit(Lit::Num) -> S::Num(NumSelector)
    6. S::Lit(Lit::Str) -> S::Str(StrSelector)
  • Selector::In has been dropped and re-implemented as a macro
  • Selector::IdPlus has been dropped and re-implemented as a macro
  • Selector::StrPlus has been dropped and re-implemented as a macro
  • Signature of every Selector that contained a terminal field has changed:
    • Terminals are now proper selectors:
      • S::STRING for matching exact string fragments
      • S::NUMBER for matching exact numeric values
      • S::PATTERN for scanning a string for a pattern
      • S::RANGE for matching numeric ranges
  • Negative (signed) numbers are now supported, the primary use case is -1 in (arg) et al

1.0.1

  • Disabled VSCode's default telemetry properties, which included a unique machine-id that we don't want to track

1.0.0

The very first SYNG release! We're excited to launch this version with you. Please visit the extension manual page for a reference of the features available today.

We'd love to hear your feedback. Connect with us on Discord or on GitHub. Thank you for using SYNG.

Copyright © 2022-present Semantic Works, Inc.