Difftastic is an experimental structured diff tool that compares files based on their syntax.

Related tags

Text processing diff
Overview

It's Difftastic!

Difftastic is an experimental structured diff tool that compares files based on their syntax.

screenshot

It is very much unfinished. It works reasonably on very parenthesised data (lisps, JSON), it works sometimes on other languages with sufficient parentheses (Rust, JS), and falls back to a line-oriented diff otherwise.

How It Works

(1) Parsing.

Difftastic treats source code as a sequence of atoms or (possibly nested) lists.

Language syntax is defined in config/syntax.toml: you provide regular expressions for atoms (including comments), open delimiters, and close delimiters.

This is heavily inspired by Comby, which handles a large number of languages by using a similar approach.

(2) Diffing.

Difftastic treats diff calculations as a graph search problem. It finds the minimal diff using Dijkstra's algorithm.

This is based on the excellent Autochrome project.

(3) Printing.

Difftastic prints a side-by-side diff that fits the current terminal. It will try to align unchanged nodes (see screenshot above).

Known Problems

Crashes. The code is underdocumented, undertested, and unfinished.

Performance. Difftastic scales poorly on files with a large number of changes. This might be solved by A* search.

Sliders.

Replacing top-level expressions. If you delete a function and write a completely different new one, difftastic will show the small number of common tokens between them.

Comments. Small changes can show big diffs.

Non-goals

Patch files. If you want to create a patch that you can later apply, use diff. Difftastic ignores whitespace, so it is output is lossy. (AST patching is also a hard problem.)

Testing with Git

[diff]
        tool = difftastic

[difftool "difftastic"]
        cmd = ~/projects/difftastic/target/debug/difftastic "$LOCAL" "$REMOTE"

You can then run git difftool -y to see the current repo changes in difftastic.

Further Reading

The wiki includes a thorough overview of alternative diffing techniques and tools.

Comments
  • Error while installing:

    Error while installing: "c++" did not execute successfully (status code exit status: 1)

    Hello @Wilfred,

    while installing using cargo install difftastic I get this error:

    error occurred: Command "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "vendor/tree-sitter-haskell-src" "-Wall" "-Wextra" "--std=c++14" "-Wno-implicit-fallthrough" "-Wno-unused-parameter" "-Wno-ignored-qualifiers" "-o" "/tmp/cargo-installJaPRlT/release/build/difftastic-18c9fb06f0b5e91b/out/vendor/tree-sitter-haskell-src/scanner.o" "-c" "vendor/tree-sitter-haskell-src/scanner.cc" with args "c++" did not execute successfully (status code exit status: 1).

    Versions:

    14:20 $ rustc --version rustc 1.57.0

    14:20 $ cargo --version cargo 1.57.0

    difftastic version (from the failing install command): v0.24.0

    LLVM version: 13.0.0

    System: Linux 4.15.0-173-generic x86_64 GNU/Linux

    I'm new to the rust environment. Any suggest on how to resolve this?

    Cheers, Peter

    opened by spekulatius 12
  • perf: optimization by introducing bfs and topological sort

    perf: optimization by introducing bfs and topological sort

    For a DAG, we can find its shortest path by using bfs in $O(V+E)$, while dijkstra takes $O(V+E\log V)$ time. BTW, I guess maybe we can introduce heuristic search algorithms like A* to further optimize it.

    I also use the arena to allocate nodes to avoid the overhead of refcount.

    As for the performance issue discussed in #236, it took ~25s on my machine, and currently, it only takes ~15s.

    A unit test is failing and some cleaning work is needed. I'm still working on this. Feel free to give comments!

    opened by Enter-tainer 11
  • undefined reference to `tree_sitter_sql_external_scanner_deserialize'           collect2: error: ld returned 1 exit status

    undefined reference to `tree_sitter_sql_external_scanner_deserialize' collect2: error: ld returned 1 exit status

    → cargo install-update -a
        Updating registry 'https://github.com/rust-lang/crates.io-index'
    
    Package         Installed  Latest                             Needs update
    difftastic      v0.32.0    v0.33.0                            Yes
    
    Updating difftastic
        Updating crates.io index
      Installing difftastic v0.33.0
       Compiling autocfg v1.1.0
       Compiling libc v0.2.132
       Compiling crossbeam-utils v0.8.11
       Compiling rayon-core v1.9.3
       Compiling memchr v2.5.0
       Compiling cc v1.0.73
       Compiling cfg-if v1.0.0
       Compiling once_cell v1.13.1
       Compiling scopeguard v1.1.0
       Compiling proc-macro2 v1.0.43
       Compiling quote v1.0.21
       Compiling log v0.4.17
       Compiling hashbrown v0.12.3
       Compiling regex-syntax v0.6.27
       Compiling unicode-ident v1.0.3
       Compiling quick-error v1.2.3
       Compiling termcolor v1.1.3
       Compiling either v1.8.0
       Compiling minimal-lexical v0.2.1
       Compiling fixedbitset v0.4.2
       Compiling os_str_bytes v6.3.0
       Compiling static_assertions v1.1.0
       Compiling unicode-xid v0.2.3
       Compiling bytecount v0.6.3
       Compiling strsim v0.10.0
       Compiling lazy_static v1.4.0
       Compiling same-file v1.0.6
       Compiling bitflags v1.3.2
       Compiling fnv v1.0.7
       Compiling rustc-hash v1.1.0
       Compiling owo-colors v3.4.0
       Compiling bumpalo v3.11.0
       Compiling unicode-width v0.1.9
       Compiling wu-diff v0.1.2
       Compiling typed-arena v2.0.1
       Compiling radix-heap v0.4.2
       Compiling humantime v1.3.0
       Compiling archery v0.4.0
       Compiling memoffset v0.6.5
       Compiling crossbeam-epoch v0.9.10
       Compiling rayon v1.5.3
       Compiling indexmap v1.9.1
       Compiling itertools v0.10.3
       Compiling clap_lex v0.2.4
       Compiling walkdir v2.3.2
       Compiling rpds v0.10.0
       Compiling crossbeam-channel v0.5.6
       Compiling aho-corasick v0.7.18
       Compiling nom v7.1.1
       Compiling libmimalloc-sys v0.1.24
       Compiling tree-sitter v0.20.8
       Compiling atty v0.2.14
       Compiling num_cpus v1.13.1
       Compiling terminal_size v0.1.17
       Compiling term_size v0.3.2
       Compiling textwrap v0.15.0
       Compiling const_format_proc_macros v0.2.22
       Compiling petgraph v0.6.2
       Compiling clap v3.2.17
       Compiling regex v1.6.0
       Compiling crossbeam-deque v0.8.2
       Compiling env_logger v0.7.1
       Compiling const_format v0.2.26
       Compiling pretty_env_logger v0.4.0
       Compiling tree_magic_mini v3.0.3
       Compiling mimalloc v0.1.28
       Compiling difftastic v0.33.0
    error: linking with `cc` failed: exit status: 1
      |
      = note: "cc" "-m64" "/tmp/rustc3aoBuH/symbols.o" "/tmp/cargo-installYbERH3/release/deps/difft-9510b4e567fe67f4.difft.ff95ef7b-cgu.0.rcgu.o" "/tmp/cargo-installYbERH3/release/deps/difft-9510b4e567fe67f4.difft.ff95ef7b-cgu.1.rcgu.o" "/tmp/cargo-installYbERH3/release/deps/difft-9510b4e567fe67f4.difft.ff95ef7b-cgu.10.rcgu.o" "/tmp/cargo-installYbERH3/release/deps/difft-9510b4e567fe67f4.difft.ff95ef7b-cgu.11.rcgu.o" "/tmp/cargo-installYbERH3/release/deps/difft-9510b4e567fe67f4.difft.ff95ef7b-cgu.12.rcgu.o" "/tmp/cargo-installYbERH3/release/deps/difft-9510b4e567fe67f4.difft.ff95ef7b-cgu.13.rcgu.o" "/tmp/cargo-installYbERH3/release/deps/difft-9510b4e567fe67f4.difft.ff95ef7b-cgu.14.rcgu.o" "/tmp/cargo-installYbERH3/release/deps/difft-9510b4e567fe67f4.difft.ff95ef7b-cgu.15.rcgu.o" "/tmp/cargo-installYbERH3/release/deps/difft-9510b4e567fe67f4.difft.ff95ef7b-cgu.2.rcgu.o" "/tmp/cargo-installYbERH3/release/deps/difft-9510b4e567fe67f4.difft.ff95ef7b-cgu.3.rcgu.o" "/tmp/cargo-installYbERH3/release/deps/difft-9510b4e567fe67f4.difft.ff95ef7b-cgu.4.rcgu.o" "/tmp/cargo-installYbERH3/release/deps/difft-9510b4e567fe67f4.difft.ff95ef7b-cgu.5.rcgu.o" "/tmp/cargo-installYbERH3/release/deps/difft-9510b4e567fe67f4.difft.ff95ef7b-cgu.6.rcgu.o" "/tmp/cargo-installYbERH3/release/deps/difft-9510b4e567fe67f4.difft.ff95ef7b-cgu.7.rcgu.o" "/tmp/cargo-installYbERH3/release/deps/difft-9510b4e567fe67f4.difft.ff95ef7b-cgu.8.rcgu.o" "/tmp/cargo-installYbERH3/release/deps/difft-9510b4e567fe67f4.difft.ff95ef7b-cgu.9.rcgu.o" "/tmp/cargo-installYbERH3/release/deps/difft-9510b4e567fe67f4.21t3lqdvn7z42r4m.rcgu.o" "-Wl,--as-needed" "-L" "/tmp/cargo-installYbERH3/release/deps" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out" "-L" "/tmp/cargo-installYbERH3/release/build/libmimalloc-sys-0911b4a0b2e4bb4a/out" "-L" "/tmp/cargo-installYbERH3/release/build/tree-sitter-41735a665b81106f/out" "-L" "/home/ybochkarev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "-ltree-sitter-elisp" "-ltree-sitter-gleam" "-ltree-sitter-nix" "-ltree-sitter-cmake-cpp" "-ltree-sitter-css" "-ltree-sitter-javascript" "-ltree-sitter-elixir-cpp" "-ltree-sitter-hack-cpp" "-ltree-sitter-bash-cpp" "-ltree-sitter-python-cpp" "-ltree-sitter-cpp-cpp" "-ltree-sitter-json" "-ltree-sitter-cmake" "-ltree-sitter-commonlisp" "-ltree-sitter-elm-cpp" "-ltree-sitter-clojure" "-ltree-sitter-dart" "-ltree-sitter-ocaml-cpp" "-ltree-sitter-go" "-ltree-sitter-bash" "-ltree-sitter-c" "-ltree-sitter-python" "-ltree-sitter-ocaml-interface-cpp" "-ltree-sitter-perl-cpp" "-ltree-sitter-cpp" "-ltree-sitter-elvish" "-ltree-sitter-php-cpp" "-ltree-sitter-hack" "-ltree-sitter-html-cpp" "-ltree-sitter-html" "-ltree-sitter-lua-cpp" "-ltree-sitter-elm" "-ltree-sitter-typescript" "-ltree-sitter-ruby-cpp" "-ltree-sitter-elixir" "-ltree-sitter-janet-simple" "-ltree-sitter-php" "-ltree-sitter-lua" "-ltree-sitter-toml" "-ltree-sitter-ocaml" "-ltree-sitter-c-sharp" "-ltree-sitter-hcl-cpp" "-ltree-sitter-zig" "-ltree-sitter-ocaml-interface" "-ltree-sitter-java" "-ltree-sitter-yaml-cpp" "-ltree-sitter-sql-cpp" "-Wl,-Bdynamic" "-lstdc++" "-Wl,-Bstatic" "-ltree-sitter-yaml" "-ltree-sitter-tsx" "-ltree-sitter-swift" "-ltree-sitter-rust" "-ltree-sitter-ruby" "-ltree-sitter-kotlin" "-ltree-sitter-haskell" "-ltree-sitter-julia" "-ltree-sitter-scala" "-ltree-sitter-perl" "-ltree-sitter-hcl" "-ltree-sitter-sql" "/tmp/cargo-installYbERH3/release/deps/libterm_size-480884b170c42d75.rlib" "/tmp/cargo-installYbERH3/release/deps/libtree_magic_mini-86ac945ad28ddd52.rlib" "/tmp/cargo-installYbERH3/release/deps/libbytecount-9e6b1da98ee6e0e5.rlib" "/tmp/cargo-installYbERH3/release/deps/libnom-8e6704d14dbeed95.rlib" "/tmp/cargo-installYbERH3/release/deps/libpetgraph-45d8c38e28a64c16.rlib" "/tmp/cargo-installYbERH3/release/deps/libfixedbitset-41f8b04137f33d80.rlib" "/tmp/cargo-installYbERH3/release/deps/libfnv-f82a83085bd40832.rlib" "/tmp/cargo-installYbERH3/release/deps/libwu_diff-0467373c5a74c604.rlib" "/tmp/cargo-installYbERH3/release/deps/librayon-fb759dfe755e6cba.rlib" "/tmp/cargo-installYbERH3/release/deps/librayon_core-b92fc58f77504357.rlib" "/tmp/cargo-installYbERH3/release/deps/libnum_cpus-f95db6be8a9bf1e2.rlib" "/tmp/cargo-installYbERH3/release/deps/libcrossbeam_deque-0676d1411379a2d7.rlib" "/tmp/cargo-installYbERH3/release/deps/libcrossbeam_epoch-f3f276a8d515bdfd.rlib" "/tmp/cargo-installYbERH3/release/deps/libmemoffset-58b16ee0b56a86ba.rlib" "/tmp/cargo-installYbERH3/release/deps/libscopeguard-54da7f00e87b1382.rlib" "/tmp/cargo-installYbERH3/release/deps/libcrossbeam_channel-3df05652d0579776.rlib" "/tmp/cargo-installYbERH3/release/deps/libcrossbeam_utils-6d083f95e521e684.rlib" "/tmp/cargo-installYbERH3/release/deps/libmimalloc-79c9b459f8cdde67.rlib" "/tmp/cargo-installYbERH3/release/deps/liblibmimalloc_sys-562aadc006bb91cf.rlib" "/tmp/cargo-installYbERH3/release/deps/libtree_sitter-3fdbe677daa9e431.rlib" "/tmp/cargo-installYbERH3/release/deps/libtyped_arena-7b6af6427a7ee600.rlib" "/tmp/cargo-installYbERH3/release/deps/libconst_format-bb1a05a0dda38bc8.rlib" "/tmp/cargo-installYbERH3/release/deps/libclap-2f1c66ff5ec09f58.rlib" "/tmp/cargo-installYbERH3/release/deps/libtextwrap-d7d1a12bdcf007ee.rlib" "/tmp/cargo-installYbERH3/release/deps/libterminal_size-9d33dc57e7e8d9fb.rlib" "/tmp/cargo-installYbERH3/release/deps/libclap_lex-a4ce1b1a6e35bc4b.rlib" "/tmp/cargo-installYbERH3/release/deps/libos_str_bytes-6a966a7cefd1bd96.rlib" "/tmp/cargo-installYbERH3/release/deps/libindexmap-fda5714c8964dd7d.rlib" "/tmp/cargo-installYbERH3/release/deps/libhashbrown-2b46635f640bab6e.rlib" "/tmp/cargo-installYbERH3/release/deps/libbitflags-f1e49c8e2ac9c356.rlib" "/tmp/cargo-installYbERH3/release/deps/libonce_cell-751b76cd656bb959.rlib" "/tmp/cargo-installYbERH3/release/deps/liblazy_static-eaefde9ae7ab1f68.rlib" "/tmp/cargo-installYbERH3/release/deps/libwalkdir-c408f13aaf3009f5.rlib" "/tmp/cargo-installYbERH3/release/deps/libsame_file-3eb33558d36e2199.rlib" "/tmp/cargo-installYbERH3/release/deps/libunicode_width-fe4c3022b95c2144.rlib" "/tmp/cargo-installYbERH3/release/deps/libowo_colors-982d4ebae8632bb0.rlib" "/tmp/cargo-installYbERH3/release/deps/libstrsim-f9f5bd2a5f5bd0b1.rlib" "/tmp/cargo-installYbERH3/release/deps/librpds-fcebc3512c36396a.rlib" "/tmp/cargo-installYbERH3/release/deps/libarchery-6d6494f1f1b7f911.rlib" "/tmp/cargo-installYbERH3/release/deps/libradix_heap-45a9d6fc15147296.rlib" "/tmp/cargo-installYbERH3/release/deps/libitertools-a01274c9fd3019ba.rlib" "/tmp/cargo-installYbERH3/release/deps/libeither-141a23962289d44d.rlib" "/tmp/cargo-installYbERH3/release/deps/libbumpalo-63740dd662f77743.rlib" "/tmp/cargo-installYbERH3/release/deps/librustc_hash-a4e449b22e04c284.rlib" "/tmp/cargo-installYbERH3/release/deps/libpretty_env_logger-2aaafb412fae349e.rlib" "/tmp/cargo-installYbERH3/release/deps/libenv_logger-7cb78f8a5b0789ee.rlib" "/tmp/cargo-installYbERH3/release/deps/libtermcolor-0881b2875b5a528e.rlib" "/tmp/cargo-installYbERH3/release/deps/libatty-6713cbb22a24cbc6.rlib" "/tmp/cargo-installYbERH3/release/deps/liblibc-bb2c35681574861a.rlib" "/tmp/cargo-installYbERH3/release/deps/libhumantime-29d65ea9fee653f3.rlib" "/tmp/cargo-installYbERH3/release/deps/libquick_error-5c90209f208dc593.rlib" "/tmp/cargo-installYbERH3/release/deps/libregex-430ae4b570d49808.rlib" "/tmp/cargo-installYbERH3/release/deps/libaho_corasick-f986da0fae8dd55f.rlib" "/tmp/cargo-installYbERH3/release/deps/libmemchr-70a07f5a838ce354.rlib" "/tmp/cargo-installYbERH3/release/deps/libregex_syntax-2d4c5e9b2bbd3eb4.rlib" "/tmp/cargo-installYbERH3/release/deps/liblog-d88ff5c2a3b9f514.rlib" "/tmp/cargo-installYbERH3/release/deps/libcfg_if-51be48777fc04e40.rlib" "-Wl,--start-group" "/home/ybochkarev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-8f1929c73c3f8167.rlib" "/home/ybochkarev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-e359d865975ccf21.rlib" "/home/ybochkarev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-b886fd10c5a7c7c0.rlib" "/home/ybochkarev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-9d7c322d48daa475.rlib" "/home/ybochkarev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-08ae1606a951cabe.rlib" "/home/ybochkarev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-682a81c4b2133b72.rlib" "/home/ybochkarev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-a73b3512c88de071.rlib" "/home/ybochkarev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-7b5ec4c918d9f957.rlib" "/home/ybochkarev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-65c63cf3af0af657.rlib" "/home/ybochkarev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-4a53f0a2785abc6a.rlib" "/home/ybochkarev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-868e2d515c28d027.rlib" "/home/ybochkarev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-394ad2d73aede76a.rlib" "/home/ybochkarev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-19c77e4dc3dcb87e.rlib" "/home/ybochkarev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-fb44a42088c9369a.rlib" "/home/ybochkarev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-61a7402e61a5b0e0.rlib" "/home/ybochkarev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-63f8356c87a0d0e8.rlib" "/home/ybochkarev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-a506e577d917828c.rlib" "/home/ybochkarev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-fc1fb63210fdafad.rlib" "-Wl,--end-group" "/home/ybochkarev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-c21be34a5cae8449.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/home/ybochkarev/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/tmp/cargo-installYbERH3/release/deps/difft-9510b4e567fe67f4" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro,-znow" "-Wl,-O1" "-nodefaultlibs"
      = note: /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-cmake.a(parser.o):(.data.rel.ro.language.0+0xb8): undefined reference to `tree_sitter_cmake_external_scanner_create'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-cmake.a(parser.o):(.data.rel.ro.language.0+0xc0): undefined reference to `tree_sitter_cmake_external_scanner_destroy'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-cmake.a(parser.o):(.data.rel.ro.language.0+0xc8): undefined reference to `tree_sitter_cmake_external_scanner_scan'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-cmake.a(parser.o):(.data.rel.ro.language.0+0xd0): undefined reference to `tree_sitter_cmake_external_scanner_serialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-cmake.a(parser.o):(.data.rel.ro.language.0+0xd8): undefined reference to `tree_sitter_cmake_external_scanner_deserialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-python.a(parser.o):(.data.rel.ro.language.0+0xb8): undefined reference to `tree_sitter_python_external_scanner_create'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-python.a(parser.o):(.data.rel.ro.language.0+0xc0): undefined reference to `tree_sitter_python_external_scanner_destroy'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-python.a(parser.o):(.data.rel.ro.language.0+0xc8): undefined reference to `tree_sitter_python_external_scanner_scan'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-python.a(parser.o):(.data.rel.ro.language.0+0xd0): undefined reference to `tree_sitter_python_external_scanner_serialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-python.a(parser.o):(.data.rel.ro.language.0+0xd8): undefined reference to `tree_sitter_python_external_scanner_deserialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-hack.a(parser.o):(.data.rel.ro.language.0+0xb8): undefined reference to `tree_sitter_hack_external_scanner_create'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-hack.a(parser.o):(.data.rel.ro.language.0+0xc0): undefined reference to `tree_sitter_hack_external_scanner_destroy'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-hack.a(parser.o):(.data.rel.ro.language.0+0xc8): undefined reference to `tree_sitter_hack_external_scanner_scan'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-hack.a(parser.o):(.data.rel.ro.language.0+0xd0): undefined reference to `tree_sitter_hack_external_scanner_serialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-hack.a(parser.o):(.data.rel.ro.language.0+0xd8): undefined reference to `tree_sitter_hack_external_scanner_deserialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-html.a(parser.o):(.data.rel.ro.language.0+0xb8): undefined reference to `tree_sitter_html_external_scanner_create'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-html.a(parser.o):(.data.rel.ro.language.0+0xc0): undefined reference to `tree_sitter_html_external_scanner_destroy'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-html.a(parser.o):(.data.rel.ro.language.0+0xc8): undefined reference to `tree_sitter_html_external_scanner_scan'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-html.a(parser.o):(.data.rel.ro.language.0+0xd0): undefined reference to `tree_sitter_html_external_scanner_serialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-html.a(parser.o):(.data.rel.ro.language.0+0xd8): undefined reference to `tree_sitter_html_external_scanner_deserialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-elm.a(parser.o):(.data.rel.ro.language.0+0xb8): undefined reference to `tree_sitter_elm_external_scanner_create'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-elm.a(parser.o):(.data.rel.ro.language.0+0xc0): undefined reference to `tree_sitter_elm_external_scanner_destroy'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-elm.a(parser.o):(.data.rel.ro.language.0+0xc8): undefined reference to `tree_sitter_elm_external_scanner_scan'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-elm.a(parser.o):(.data.rel.ro.language.0+0xd0): undefined reference to `tree_sitter_elm_external_scanner_serialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-elm.a(parser.o):(.data.rel.ro.language.0+0xd8): undefined reference to `tree_sitter_elm_external_scanner_deserialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-lua.a(parser.o):(.data.rel.ro.language.0+0xb8): undefined reference to `tree_sitter_lua_external_scanner_create'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-lua.a(parser.o):(.data.rel.ro.language.0+0xc0): undefined reference to `tree_sitter_lua_external_scanner_destroy'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-lua.a(parser.o):(.data.rel.ro.language.0+0xc8): undefined reference to `tree_sitter_lua_external_scanner_scan'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-lua.a(parser.o):(.data.rel.ro.language.0+0xd0): undefined reference to `tree_sitter_lua_external_scanner_serialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-lua.a(parser.o):(.data.rel.ro.language.0+0xd8): undefined reference to `tree_sitter_lua_external_scanner_deserialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-hcl.a(parser.o):(.data.rel.ro.language.0+0xb8): undefined reference to `tree_sitter_hcl_external_scanner_create'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-hcl.a(parser.o):(.data.rel.ro.language.0+0xc0): undefined reference to `tree_sitter_hcl_external_scanner_destroy'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-hcl.a(parser.o):(.data.rel.ro.language.0+0xc8): undefined reference to `tree_sitter_hcl_external_scanner_scan'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-hcl.a(parser.o):(.data.rel.ro.language.0+0xd0): undefined reference to `tree_sitter_hcl_external_scanner_serialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-hcl.a(parser.o):(.data.rel.ro.language.0+0xd8): undefined reference to `tree_sitter_hcl_external_scanner_deserialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-bash.a(parser.o):(.data.rel.ro.language.0+0xb8): undefined reference to `tree_sitter_bash_external_scanner_create'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-bash.a(parser.o):(.data.rel.ro.language.0+0xc0): undefined reference to `tree_sitter_bash_external_scanner_destroy'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-bash.a(parser.o):(.data.rel.ro.language.0+0xc8): undefined reference to `tree_sitter_bash_external_scanner_scan'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-bash.a(parser.o):(.data.rel.ro.language.0+0xd0): undefined reference to `tree_sitter_bash_external_scanner_serialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-bash.a(parser.o):(.data.rel.ro.language.0+0xd8): undefined reference to `tree_sitter_bash_external_scanner_deserialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-cpp.a(parser.o):(.data.rel.ro.language.0+0xb8): undefined reference to `tree_sitter_cpp_external_scanner_create'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-cpp.a(parser.o):(.data.rel.ro.language.0+0xc0): undefined reference to `tree_sitter_cpp_external_scanner_destroy'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-cpp.a(parser.o):(.data.rel.ro.language.0+0xc8): undefined reference to `tree_sitter_cpp_external_scanner_scan'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-cpp.a(parser.o):(.data.rel.ro.language.0+0xd0): undefined reference to `tree_sitter_cpp_external_scanner_serialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-cpp.a(parser.o):(.data.rel.ro.language.0+0xd8): undefined reference to `tree_sitter_cpp_external_scanner_deserialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-elixir.a(parser.o):(.data.rel.ro.language.0+0xb8): undefined reference to `tree_sitter_elixir_external_scanner_create'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-elixir.a(parser.o):(.data.rel.ro.language.0+0xc0): undefined reference to `tree_sitter_elixir_external_scanner_destroy'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-elixir.a(parser.o):(.data.rel.ro.language.0+0xc8): undefined reference to `tree_sitter_elixir_external_scanner_scan'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-elixir.a(parser.o):(.data.rel.ro.language.0+0xd0): undefined reference to `tree_sitter_elixir_external_scanner_serialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-elixir.a(parser.o):(.data.rel.ro.language.0+0xd8): undefined reference to `tree_sitter_elixir_external_scanner_deserialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-php.a(parser.o):(.data.rel.ro.language.0+0xb8): undefined reference to `tree_sitter_php_external_scanner_create'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-php.a(parser.o):(.data.rel.ro.language.0+0xc0): undefined reference to `tree_sitter_php_external_scanner_destroy'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-php.a(parser.o):(.data.rel.ro.language.0+0xc8): undefined reference to `tree_sitter_php_external_scanner_scan'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-php.a(parser.o):(.data.rel.ro.language.0+0xd0): undefined reference to `tree_sitter_php_external_scanner_serialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-php.a(parser.o):(.data.rel.ro.language.0+0xd8): undefined reference to `tree_sitter_php_external_scanner_deserialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-ocaml.a(parser.o):(.data.rel.ro.language.0+0xb8): undefined reference to `tree_sitter_ocaml_external_scanner_create'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-ocaml.a(parser.o):(.data.rel.ro.language.0+0xc0): undefined reference to `tree_sitter_ocaml_external_scanner_destroy'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-ocaml.a(parser.o):(.data.rel.ro.language.0+0xc8): undefined reference to `tree_sitter_ocaml_external_scanner_scan'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-ocaml.a(parser.o):(.data.rel.ro.language.0+0xd0): undefined reference to `tree_sitter_ocaml_external_scanner_serialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-ocaml.a(parser.o):(.data.rel.ro.language.0+0xd8): undefined reference to `tree_sitter_ocaml_external_scanner_deserialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-ocaml-interface.a(parser.o):(.data.rel.ro.language.0+0xb8): undefined reference to `tree_sitter_ocaml_interface_external_scanner_create'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-ocaml-interface.a(parser.o):(.data.rel.ro.language.0+0xc0): undefined reference to `tree_sitter_ocaml_interface_external_scanner_destroy'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-ocaml-interface.a(parser.o):(.data.rel.ro.language.0+0xc8): undefined reference to `tree_sitter_ocaml_interface_external_scanner_scan'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-ocaml-interface.a(parser.o):(.data.rel.ro.language.0+0xd0): undefined reference to `tree_sitter_ocaml_interface_external_scanner_serialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-ocaml-interface.a(parser.o):(.data.rel.ro.language.0+0xd8): undefined reference to `tree_sitter_ocaml_interface_external_scanner_deserialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-yaml.a(parser.o):(.data.rel.language.0+0xb8): undefined reference to `tree_sitter_yaml_external_scanner_create'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-yaml.a(parser.o):(.data.rel.language.0+0xc0): undefined reference to `tree_sitter_yaml_external_scanner_destroy'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-yaml.a(parser.o):(.data.rel.language.0+0xc8): undefined reference to `tree_sitter_yaml_external_scanner_scan'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-yaml.a(parser.o):(.data.rel.language.0+0xd0): undefined reference to `tree_sitter_yaml_external_scanner_serialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-yaml.a(parser.o):(.data.rel.language.0+0xd8): undefined reference to `tree_sitter_yaml_external_scanner_deserialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-ruby.a(parser.o):(.data.rel.ro.language.0+0xb8): undefined reference to `tree_sitter_ruby_external_scanner_create'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-ruby.a(parser.o):(.data.rel.ro.language.0+0xc0): undefined reference to `tree_sitter_ruby_external_scanner_destroy'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-ruby.a(parser.o):(.data.rel.ro.language.0+0xc8): undefined reference to `tree_sitter_ruby_external_scanner_scan'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-ruby.a(parser.o):(.data.rel.ro.language.0+0xd0): undefined reference to `tree_sitter_ruby_external_scanner_serialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-ruby.a(parser.o):(.data.rel.ro.language.0+0xd8): undefined reference to `tree_sitter_ruby_external_scanner_deserialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-perl.a(parser.o):(.data.rel.language.0+0xb8): undefined reference to `tree_sitter_perl_external_scanner_create'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-perl.a(parser.o):(.data.rel.language.0+0xc0): undefined reference to `tree_sitter_perl_external_scanner_destroy'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-perl.a(parser.o):(.data.rel.language.0+0xc8): undefined reference to `tree_sitter_perl_external_scanner_scan'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-perl.a(parser.o):(.data.rel.language.0+0xd0): undefined reference to `tree_sitter_perl_external_scanner_serialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-perl.a(parser.o):(.data.rel.language.0+0xd8): undefined reference to `tree_sitter_perl_external_scanner_deserialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-sql.a(parser.o):(.data.rel.ro.language.0+0xb8): undefined reference to `tree_sitter_sql_external_scanner_create'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-sql.a(parser.o):(.data.rel.ro.language.0+0xc0): undefined reference to `tree_sitter_sql_external_scanner_destroy'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-sql.a(parser.o):(.data.rel.ro.language.0+0xc8): undefined reference to `tree_sitter_sql_external_scanner_scan'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-sql.a(parser.o):(.data.rel.ro.language.0+0xd0): undefined reference to `tree_sitter_sql_external_scanner_serialize'
              /usr/bin/ld: /tmp/cargo-installYbERH3/release/build/difftastic-c2f2d0cbdcb7610d/out/libtree-sitter-sql.a(parser.o):(.data.rel.ro.language.0+0xd8): undefined reference to `tree_sitter_sql_external_scanner_deserialize'
              collect2: error: ld returned 1 exit status
    
      = help: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
      = note: use the `-l` flag to specify native libraries to link
      = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)
    
    error: could not compile `difftastic` due to previous error
    error: failed to compile `difftastic v0.33.0`, intermediate artifacts can be found at `/tmp/cargo-installYbERH3`
    
    
    Updated 0 packages.
    Failed to update difftastic.
    

    versions

    rustc 1.63.0 (4b91a6ea7 2022-08-08)
    Ubuntu 22.04.1 LTS
    cc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
    GNU ld (GNU Binutils for Ubuntu) 2.38
    

    I tried installing these tree-sitter packages but it didn't help:

    sudo apt-get install librust-tree-sitter-dev librust-tree-sitter-highlight-dev librust-tree-sitter-tags-dev libtree-sitter-dev
    
    opened by balta2ar 9
  • terminal size is not correctly determined when using git on windows

    terminal size is not correctly determined when using git on windows

    The terminal size is not correctly determined when using git on windows with difft. It uses the default of 80 from here because term_size doesn't get a valid io stream.

    opened by jessesna 9
  • Some optimizations

    Some optimizations

    First, enable thin-LTO. This brings ~5% speedup.

    Before:

     Performance counter stats for 'cargo run --release -- sample_files/slow_before.rs sample_files/slow_after.rs':
    
              1,033.66 msec task-clock:u              #    0.999 CPUs utilized          
                     0      context-switches:u        #    0.000 /sec                   
                     0      cpu-migrations:u          #    0.000 /sec                   
                 6,127      page-faults:u             #    5.927 K/sec                  
         3,992,966,896      cycles:u                  #    3.863 GHz                    
           295,590,268      stalled-cycles-frontend:u #    7.40% frontend cycles idle   
         1,229,153,356      stalled-cycles-backend:u  #   30.78% backend cycles idle    
         4,948,279,348      instructions:u            #    1.24  insn per cycle         
                                                      #    0.25  stalled cycles per insn
           975,024,920      branches:u                #  943.275 M/sec                  
            20,612,498      branch-misses:u           #    2.11% of all branches        
    
           1.034353300 seconds time elapsed
    
           0.973504000 seconds user
           0.059968000 seconds sys
    

    After:

     Performance counter stats for 'cargo run --release -- sample_files/slow_before.rs sample_files/slow_after.rs':
    
                996.05 msec task-clock:u              #    0.998 CPUs utilized          
                     0      context-switches:u        #    0.000 /sec                   
                     0      cpu-migrations:u          #    0.000 /sec                   
                 6,116      page-faults:u             #    6.140 K/sec                  
         3,926,308,401      cycles:u                  #    3.942 GHz                    
           263,648,312      stalled-cycles-frontend:u #    6.71% frontend cycles idle   
         1,349,401,185      stalled-cycles-backend:u  #   34.37% backend cycles idle    
         4,859,980,027      instructions:u            #    1.24  insn per cycle         
                                                      #    0.28  stalled cycles per insn
           920,523,681      branches:u                #  924.177 M/sec                  
            19,978,054      branch-misses:u           #    2.17% of all branches        
    
           0.998478582 seconds time elapsed
    
           0.932282000 seconds user
           0.063171000 seconds sys
    

    The numbers of instructions are relatively stable.

    I also measured them using hyperfine.

    Before:

    $ hyperfine --warmup=3 'cargo run --release -- sample_files/slow_before.rs sample_files/slow_after.rs'
    Benchmark 1: cargo run --release -- sample_files/slow_before.rs sample_files/slow_after.rs
      Time (mean ± σ):      1.046 s ±  0.051 s    [User: 0.993 s, System: 0.052 s]
      Range (min … max):    1.001 s …  1.141 s    10 runs
    

    After:

    $ hyperfine --warmup=3 'cargo run --release -- sample_files/slow_before.rs sample_files/slow_after.rs'
    Benchmark 1: cargo run --release -- sample_files/slow_before.rs sample_files/slow_after.rs
      Time (mean ± σ):     986.4 ms ±  15.3 ms    [User: 930.6 ms, System: 54.3 ms]
      Range (min … max):   971.3 ms … 1024.4 ms    10 runs
    
    opened by QuarticCat 8
  • Died of signal 9 after loading big JSON

    Died of signal 9 after loading big JSON

    When using DFT_BYTE_LIMIT=4000000 git diff I get part of the diff and then:

    error: difft died of signal 9
    fatal: external diff died, stopping at xxxxxx.json
    

    I actually have a big JSON file (1.1MB / 40k lines) in LFS there. Usually git diff ignores LFS files (it just shows the checksum difference).

    Strangely enough, I have a bigger Rust file (3.7MB / 51k lines) and it didn't have any issue.

    Difftastic 0.31.0
    
    opened by cecton 8
  • Can't compile on Windows

    Can't compile on Windows

    Thanks for reporting a bug! Please include all of the following:

    error: linking with `link.exe` failed: exit code: 1120
      |
      = note: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.31.31103\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "C:\\CarTar\\release\\deps\\difft-c8ab8d3c92a269de.difft.2229026d-cgu.0.rcgu.o" "C:\\CarTar\\release\\deps\\difft-c8ab8d3c92a269de.difft.2229026d-cgu.1.rcgu.o" "C:\\CarTar\\release\\deps\\difft-c8ab8d3c92a269de.difft.2229026d-cgu.10.rcgu.o" "C:\\CarTar\\release\\deps\\difft-c8ab8d3c92a269de.difft.2229026d-cgu.11.rcgu.o" "C:\\CarTar\\release\\deps\\difft-c8ab8d3c92a269de.difft.2229026d-cgu.12.rcgu.o" "C:\\CarTar\\release\\deps\\difft-c8ab8d3c92a269de.difft.2229026d-cgu.13.rcgu.o" "C:\\CarTar\\release\\deps\\difft-c8ab8d3c92a269de.difft.2229026d-cgu.14.rcgu.o" "C:\\CarTar\\release\\deps\\difft-c8ab8d3c92a269de.difft.2229026d-cgu.15.rcgu.o" "C:\\CarTar\\release\\deps\\difft-c8ab8d3c92a269de.difft.2229026d-cgu.2.rcgu.o" "C:\\CarTar\\release\\deps\\difft-c8ab8d3c92a269de.difft.2229026d-cgu.3.rcgu.o" "C:\\CarTar\\release\\deps\\difft-c8ab8d3c92a269de.difft.2229026d-cgu.4.rcgu.o" "C:\\CarTar\\release\\deps\\difft-c8ab8d3c92a269de.difft.2229026d-cgu.5.rcgu.o" "C:\\CarTar\\release\\deps\\difft-c8ab8d3c92a269de.difft.2229026d-cgu.6.rcgu.o" "C:\\CarTar\\release\\deps\\difft-c8ab8d3c92a269de.difft.2229026d-cgu.7.rcgu.o" "C:\\CarTar\\release\\deps\\difft-c8ab8d3c92a269de.difft.2229026d-cgu.8.rcgu.o" "C:\\CarTar\\release\\deps\\difft-c8ab8d3c92a269de.difft.2229026d-cgu.9.rcgu.o" "C:\\CarTar\\release\\deps\\difft-c8ab8d3c92a269de.4ucpje1yqf4wo9eh.rcgu.o" "/LIBPATH:C:\\CarTar\\release\\deps" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\difftastic-d0bc0fc173dc38be\\out" "/LIBPATH:C:\\CarTar\\release\\build\\libmimalloc-sys-20c3a23102c37094\\out" "/LIBPATH:C:\\CarTar\\release\\build\\tree-sitter-54819667e45c4a8b\\out" "/LIBPATH:C:\\Users\\dschroeder\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "/WHOLEARCHIVE:tree-sitter-elisp.lib" "/WHOLEARCHIVE:tree-sitter-yaml.lib" "/WHOLEARCHIVE:tree-sitter-gleam.lib" "/WHOLEARCHIVE:tree-sitter-nix.lib" "/WHOLEARCHIVE:tree-sitter-json.lib" "/WHOLEARCHIVE:tree-sitter-java.lib" "/WHOLEARCHIVE:tree-sitter-bash.lib" "/WHOLEARCHIVE:tree-sitter-dart.lib" "/WHOLEARCHIVE:tree-sitter-commonlisp.lib" "/WHOLEARCHIVE:tree-sitter-python.lib" "/WHOLEARCHIVE:tree-sitter-c.lib" "/WHOLEARCHIVE:tree-sitter-elm.lib" "/WHOLEARCHIVE:tree-sitter-tsx.lib" "/WHOLEARCHIVE:tree-sitter-javascript.lib" "/WHOLEARCHIVE:tree-sitter-lua.lib" "/WHOLEARCHIVE:tree-sitter-yaml-cpp.lib" "/WHOLEARCHIVE:tree-sitter-python-cpp.lib" "/WHOLEARCHIVE:tree-sitter-bash-cpp.lib" "/WHOLEARCHIVE:tree-sitter-ocaml-interface.lib" "/WHOLEARCHIVE:tree-sitter-elixir.lib" "/WHOLEARCHIVE:tree-sitter-go.lib" "/WHOLEARCHIVE:tree-sitter-lua-cpp.lib" "/WHOLEARCHIVE:tree-sitter-ocaml.lib" "/WHOLEARCHIVE:tree-sitter-clojure.lib" "/WHOLEARCHIVE:tree-sitter-css.lib" "/WHOLEARCHIVE:tree-sitter-elixir-cpp.lib" "/WHOLEARCHIVE:tree-sitter-cpp.lib" "/WHOLEARCHIVE:tree-sitter-ocaml-interface-cpp.lib" "/WHOLEARCHIVE:tree-sitter-janet-simple.lib" "/WHOLEARCHIVE:tree-sitter-haskell.lib" "/WHOLEARCHIVE:tree-sitter-ocaml-cpp.lib" "/WHOLEARCHIVE:tree-sitter-zig.lib" "/WHOLEARCHIVE:tree-sitter-typescript.lib" "/WHOLEARCHIVE:tree-sitter-cpp-cpp.lib" "/WHOLEARCHIVE:tree-sitter-scala.lib" "/WHOLEARCHIVE:tree-sitter-ruby.lib" "/WHOLEARCHIVE:tree-sitter-rust.lib" "/WHOLEARCHIVE:tree-sitter-c-sharp.lib" "/WHOLEARCHIVE:tree-sitter-php.lib" "/WHOLEARCHIVE:tree-sitter-ruby-cpp.lib" "/WHOLEARCHIVE:tree-sitter-php-cpp.lib" "/WHOLEARCHIVE:tree-sitter-haskell-cpp.lib" "C:\\CarTar\\release\\deps\\libterm_size-a606155b2cf59322.rlib" "C:\\CarTar\\release\\deps\\libwu_diff-25706f2c56b595d3.rlib" "C:\\CarTar\\release\\deps\\libwalkdir-f1e1ee70fbc01ed1.rlib" "C:\\CarTar\\release\\deps\\libsame_file-bc9e1fcdb3a9ce29.rlib" "C:\\CarTar\\release\\deps\\libmimalloc-a34e6c4878df8f00.rlib" "C:\\CarTar\\release\\deps\\liblibmimalloc_sys-5637947aacd9e5d7.rlib" "C:\\CarTar\\release\\deps\\libtree_sitter-218357aeaae69ec2.rlib" "C:\\CarTar\\release\\deps\\libtyped_arena-7014457b2934d18d.rlib" "C:\\CarTar\\release\\deps\\libconst_format-02c2a773f3a8982f.rlib" "C:\\CarTar\\release\\deps\\libclap-181dce83c392cf05.rlib" "C:\\CarTar\\release\\deps\\libtextwrap-15592219c0da512c.rlib" "C:\\CarTar\\release\\deps\\libindexmap-9ba0747720636ee8.rlib" "C:\\CarTar\\release\\deps\\libhashbrown-da79696167b25bce.rlib" "C:\\CarTar\\release\\deps\\libos_str_bytes-866c1ce66d33c507.rlib" "C:\\CarTar\\release\\deps\\libbitflags-fc1965db0469ec95.rlib" "C:\\CarTar\\release\\deps\\libowo_colors-98e60874a82ac78b.rlib" "C:\\CarTar\\release\\deps\\liblazy_static-1ef46232122641ee.rlib" "C:\\CarTar\\release\\deps\\libstrsim-6bb7f88b582d93fe.rlib" "C:\\CarTar\\release\\deps\\librpds-46b113ddf608761e.rlib" "C:\\CarTar\\release\\deps\\libarchery-99a38dcda4cc1b30.rlib" "C:\\CarTar\\release\\deps\\libradix_heap-aeee00374f9c6ec6.rlib" "C:\\CarTar\\release\\deps\\libitertools-f88c3d6a944d7f69.rlib" "C:\\CarTar\\release\\deps\\libeither-e5de8338724a2e66.rlib" "C:\\CarTar\\release\\deps\\librustc_hash-8313ee8ab007b3cf.rlib" "C:\\CarTar\\release\\deps\\libpretty_env_logger-0d1df7f7af835f66.rlib" "C:\\CarTar\\release\\deps\\libenv_logger-0350867492d53208.rlib" "C:\\CarTar\\release\\deps\\libtermcolor-34d3957e6613ab0f.rlib" "C:\\CarTar\\release\\deps\\libwinapi_util-a475941558562532.rlib" "C:\\CarTar\\release\\deps\\libatty-77062c7dfe6818ec.rlib" "C:\\CarTar\\release\\deps\\libwinapi-d5424493765e0873.rlib" "C:\\CarTar\\release\\deps\\libhumantime-ebe0a80c385dc9b7.rlib" "C:\\CarTar\\release\\deps\\libquick_error-6eb9b497be5ca6be.rlib" "C:\\CarTar\\release\\deps\\libregex-c8a7feb7cd5e3697.rlib" "C:\\CarTar\\release\\deps\\libaho_corasick-79387342b0d73800.rlib" "C:\\CarTar\\release\\deps\\libmemchr-76dbfe21baa53138.rlib" "C:\\CarTar\\release\\deps\\libregex_syntax-b2ea96671453d68b.rlib" "C:\\CarTar\\release\\deps\\liblog-533992625f374413.rlib" "C:\\CarTar\\release\\deps\\libcfg_if-d092cf17aa22092c.rlib" "C:\\Users\\dschroeder\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd-9505d954cc550ca4.rlib" "C:\\Users\\dschroeder\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libpanic_unwind-4368ec34df66b968.rlib" "C:\\Users\\dschroeder\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_demangle-c4e960482b87deda.rlib" "C:\\Users\\dschroeder\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd_detect-3e30157661c6e929.rlib" "C:\\Users\\dschroeder\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libhashbrown-441bbf33311d8f21.rlib" "C:\\Users\\dschroeder\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_alloc-a65adc14aa7ec78a.rlib" "C:\\Users\\dschroeder\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libunwind-754bada3b2f76f43.rlib" "C:\\Users\\dschroeder\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcfg_if-bbc7454d63bcee48.rlib" "C:\\Users\\dschroeder\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liblibc-083a8721e26e7568.rlib" "C:\\Users\\dschroeder\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liballoc-fc82f5be4815a343.rlib" "C:\\Users\\dschroeder\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_core-14f675cf009ff7ec.rlib" "C:\\Users\\dschroeder\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcore-39142ba17f25ae37.rlib" "C:\\Users\\dschroeder\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcompiler_builtins-1a5802a39db22341.rlib" "advapi32.lib" "cfgmgr32.lib" "gdi32.lib" "kernel32.lib" "msimg32.lib" "opengl32.lib" "user32.lib" "winspool.lib" "kernel32.lib" "ws2_32.lib" "bcrypt.lib" "advapi32.lib" "userenv.lib" "kernel32.lib" "msvcrt.lib" "/NXCOMPAT" "/LIBPATH:C:\\Users\\dschroeder\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "/OUT:C:\\CarTar\\release\\deps\\difft-c8ab8d3c92a269de.exe" "/OPT:REF,ICF" "/DEBUG" "/NATVIS:C:\\Users\\dschroeder\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\intrinsic.natvis" "/NATVIS:C:\\Users\\dschroeder\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\liballoc.natvis" "/NATVIS:C:\\Users\\dschroeder\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libcore.natvis" "/NATVIS:C:\\Users\\dschroeder\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libstd.natvis"
      = note:    Creating library C:\CarTar\release\deps\difft-c8ab8d3c92a269de.lib and object C:\CarTar\release\deps\difft-c8ab8d3c92a269de.exp
              tree-sitter-elm.lib(parser.o) : error LNK2001: unresolved external symbol tree_sitter_elm_external_scanner_create
              tree-sitter-elm.lib(parser.o) : error LNK2001: unresolved external symbol tree_sitter_elm_external_scanner_destroy
              tree-sitter-elm.lib(parser.o) : error LNK2001: unresolved external symbol tree_sitter_elm_external_scanner_scan
              tree-sitter-elm.lib(parser.o) : error LNK2001: unresolved external symbol tree_sitter_elm_external_scanner_serialize
              tree-sitter-elm.lib(parser.o) : error LNK2001: unresolved external symbol tree_sitter_elm_external_scanner_deserialize
              C:\CarTar\release\deps\difft-c8ab8d3c92a269de.exe : fatal error LNK1120: 5 unresolved externals
    
    
    error: failed to compile `difftastic v0.26.3`, intermediate artifacts can be found at `C:\CarTar`
    
    Caused by:
      could not compile `difftastic` due to previous error
    
    opened by fdncred 8
  • Add Swift support

    Add Swift support

    opened by cherryblossom000 8
  • Cargo install fails with 'unresolved external symbol'

    Cargo install fails with 'unresolved external symbol'

    > cargo install difftastic
    error: linking with `link.exe` failed: exit code: 1120
    (Long linker call)
    tree-sitter-php.lib(parser.o) : error LNK2001: unresolved external symbol tree_sitter_php_external_scanner_createtree-sitter-php.lib(parser.o) : error LNK2001: unresolved external symbol tree_sitter_php_external_scanner_destroy
    tree-sitter-php.lib(parser.o) : error LNK2001: unresolved external symbol tree_sitter_php_external_scanner_scan
    tree-sitter-php.lib(parser.o) : error LNK2001: unresolved external symbol tree_sitter_php_external_scanner_serialize
    tree-sitter-php.lib(parser.o) : error LNK2001: unresolved external symbol tree_sitter_php_external_scanner_deserialize
    error: failed to compile `difftastic v0.24.0`
    

    OS: Windows 10

    opened by zacps 8
  • Generating diff between two large C files takes a long time & uses a lot of memory

    Generating diff between two large C files takes a long time & uses a lot of memory

    Generating a diff between two big C files takes a long time and uses a lot of memory.

    $ difftastic p1.c p2.c
    

    In fact I aborted this after ~30min at then 12GB of RAM usage.

    diff tells me that roughly 8,800 out of 23,000 lines changed here. These are parser.c files generated by tree-sitter.

    While I wouldn't expect an instantaneous response from difftastic, not being able to complete in a couple minutes within reasonable RAM consumption feels off to me.

    Files:

    performance 
    opened by bbannier 8
  • Show function context for diff hunks.

    Show function context for diff hunks.

    This fixes a difftastic shortcoming relative to “git diff” (or GNU diff's -p, --show-c-function); it shows the context for a given hunk (which function it is in, assuming it actually starts in one). Based on practical testing, it seems to work well with at least Rust, C, C++, Kotlin, Python and Swift, but probably also for more languages.

    Unlike git diff and GNU diff, it does not get confused by the function definition being split over multiple lines, since it uses the tree-sitter grammar to find out what is a function definition, which should be much more robust than the textual heuristics diff uses.

    There are a number of shortcomings:

    • Context is currently only available in side-by-side mode, not inline.
    • The source code is re-parsed using tree-sitter at display time; we could probably reuse the tree from before it was converted into Difftastic's syntax tree, at the expense of holding onto more RAM during the diffing.
    • If the context is not the same on both sides, difftastic won't try to show both, but instead show the language name as before. The typical failure case for this is if the function changed name or function arguments between the two versions.
    • Certain language grammars, such as Julia and elisp, don't have a clear node that delineates the function body from the name and arguments, which will cause the entire function definition to be treated as the context (which thus usually means it won't be shown at all; see the previous point).
    • The joining of tokens across newlines can cause somewhat unidiomatic whitespace to be added, such as fn foo( arg) instead of fn foo(arg) if “arg” is on a separate line.

    Despite all of this, it seems to work very well in practice, from practical experience during real development over a couple of days.

    Fixes #304.

    opened by sesse 7
  • Upcoming change to tree-sitter-clojure

    Upcoming change to tree-sitter-clojure

    I'm opening this issue to let the maintainers know that we're planning to merge a change to the tree-sitter-clojure master branch that might be of interest to this repository.

    The change is here: sogaiu/tree-sitter-clojure#31

    A brief overview of the changes follows.

    kwd_lit and sym_lit will now contain up to 3 new nodes:

    (kwd_lit
      ns: (kwd_ns)
      delimiter: "/"
      name: (kwd_name))
    
    (sym_lit
      ns: (sym_ns)
      delimiter: "/"
      name: (sym_name))
    

    Only the (kwd_name) and (sym_name) are required.

    sym_lit nodes can still contain metadata nodes (this is unchanged).


    IIUC, difftastic currently uses a commit on the issue-21 branch of tree-sitter-clojure -- at least it seems so according to:

    • https://github.com/Wilfred/difftastic/commit/bc4e22eee2f9606d2aeff940b2285eb9ba9d762a
    • https://github.com/sogaiu/tree-sitter-clojure/commits/issue-21

    So if that assessment is correct and the dependency doesn't change it seems our intended upcoming change shouldn't have any effect.

    However, the change should also address https://github.com/sogaiu/tree-sitter-clojure/issues/21 which Wilfred reported to us earlier, so may be there would be some interest in using the updated code?

    Please let us know if you decide to try the new code as well as if you encounter any issues.

    Thanks!

    P.S. Our current plan is to merge around 2023-01-05 which is in about 2 weeks time.


    On a more general note...

    Though at this time we don't anticipate many changes going forward, we're planning to post certain change-related announcements to a pinned issue ahead of merging such changes.

    Please have a look at the issue and consider subscribing :)

    opened by sogaiu 0
  • ignore informative changes

    ignore informative changes

    Difftastic 0.24.0 Language: Scala

    % git diff
    src/main/scala/ru/tcsbank/api/RbacModule.scala --- Scala No syntactic changes.

    % (unset GIT_EXTERNAL_DIFF; git diff ) diff --git a/....Module.scala b/....Module.scala index 157244fdc83..007b1f9367d 100644 --- a/....Module.scala +++ b/....Module.scala @@ -169,7 +169,7 @@

    • def appCfg(config: Config)(app: String) = config.getString
    • def appCfg(config: Config)(app: String) = config.getString
    opened by potan 1
  • Allowing for user to choose default text parsing

    Allowing for user to choose default text parsing

    Sometimes difftastic will parse a file incorrectly either due to an error in the parser, an error in the file itself or a complicated situation not yet handled by the parsers (e.g. helm templates, which are kind-of yaml files with embedded go-template, see #267 and #377). In those cases it would be helpful if the user could force difftastic to use the default text parsing instead of showing "No syntatic changes."

    I envision something like: difft --language default or difft --default-parser

    I'm willing to make a PR but I don't know rust and don't know where should I start 🙈

    (1) One idea would be to treat the default text parser the same as the other parsers. I would add a default language in the languages enum and then instead of matching to None we would match to this default. For example here:

    • https://github.com/Wilfred/difftastic/blob/master/src/options.rs#L277
    • https://github.com/Wilfred/difftastic/blob/master/src/main.rs#L385

    But that would change the design choice of using None to fallback to text parsing. Another alternative to this idea would be to re-design the whole line_parser to fit the vendor parsers format. I have absolutely no idea how I would do that 😅

    (2) Another idea would be adding a --default-parser flag and then ignore language_override. For example here:

    let language = language_override.or_else(|| guess(guess_path, guess_src));
    

    would become something like:

    let language = if default_parser {
      None;
    } else {
      language_override.or_else(|| guess(path, &src));
    }
    

    The important point here is side-stepping the guess function.

    I tend to prefer Option (2) because it seems less intrusive to me, but it still adds another top level flag which could maybe be covered by an already existing flag. I'll try to implement that one but am very welcome to feedback, specially if I'm tackling this issue completely wrong!

    opened by mparada 1
  • Add plugin support

    Add plugin support

    I am currently writing a tree-sitter grammar for a DSL (domain specific language), and would like to add Difftastic support to it as well. This DSL won't be super useful to the general Difftastic user, though, from what I can tell, the only way to add a new parser is to merge the code in here, or fork it and add it to the fork.

    I propose that we allow for a "plugin" system of sorts: Basically, you create a .so file which contains:

    • The TreeSitterConfig data (which calls tree_sitter_xyz())
    • A guess function which returns true/false if the passed file should use this new plugin

    And then you run difft like so:

    $ difft --load plugin.so old.dsl new.dsl
    

    At least, that's how I would go about it (from what I can see from briefly looking at the code). Would this be something you would be interested in? If we decide it is worthwhile I would totally be willing to implement it, though I will say I am somewhat new to Rust.

    opened by dosisod 2
Releases(0.40.0)
Owner
Wilfred Hughes
PL enthusiast, Emacs addict, and hacklang contributor.
Wilfred Hughes
A sweet n' simple pastebin with syntax highlighting and no client-side code!

sweetpaste sweetpaste is a sweet n' simple pastebin server. It's completely server-side, with zero client-side code. Configuration The configuration w

Lucy 0 Sep 4, 2022
Neural syntax annotator, supporting sequence labeling, lemmatization, and dependency parsing.

SyntaxDot Introduction SyntaxDot is a sequence labeler and dependency parser using Transformer networks. SyntaxDot models can be trained from scratch

TensorDot 46 Dec 27, 2022
A Markdown to HTML compiler and Syntax Highlighter, built using Rust's pulldown-cmark and tree-sitter-highlight crates.

A blazingly fast( possibly the fastest) markdown to html parser and syntax highlighter built using Rust's pulldown-cmark and tree-sitter-highlight crate natively for Node's Foreign Function Interface.

Ben Wishovich 48 Nov 11, 2022
A command line tool for renaming your ipa files quickly and easily.

ipa_renamer A command line tool for renaming your ipa files quickly and easily. Usage ipa_renamer 0.0.1 A command line tool for renaming your ipa file

Noah Hsu 31 Dec 31, 2022
Find and replace text in source files

Ruplacer Find and replace text in source files: $ ruplacer old new src/ Patching src/a_dir/sub/foo.txt -- old is everywhere, old is old ++ new is ever

Tanker 331 Dec 28, 2022
Find files (ff) by name, fast!

Find Files (ff) Find Files (ff) utility recursively searches the files whose names match the specified RegExp pattern in the provided directory (defau

Vishal Telangre 310 Dec 29, 2022
⏮ ⏯ ⏭ A Rust library to easily read forwards, backwards or randomly through the lines of huge files.

EasyReader The main goal of this library is to allow long navigations through the lines of large files, freely moving forwards and backwards or gettin

Michele Federici 81 Dec 6, 2022
Splits test files into multiple groups to run tests in parallel nodes

split-test split-test splits tests into multiple groups based on timing data to run tests in parallel. Installation Download binary from GitHub releas

Fumiaki MATSUSHIMA 28 Dec 12, 2022
Subtitles-rs - Use SRT subtitle files to study foreign languages

Rust subtitle utilities Are you looking for substudy? Try here. (substudy has been merged into the subtitles-rs project.) This repository contains a n

Eric Kidd 268 Dec 29, 2022
Rust native ready-to-use NLP pipelines and transformer-based models (BERT, DistilBERT, GPT2,...)

rust-bert Rust native Transformer-based models implementation. Port of Hugging Face's Transformers library, using the tch-rs crate and pre-processing

null 1.3k Jan 8, 2023
Neural network transition-based dependency parser (in Rust)

dpar Introduction dpar is a neural network transition-based dependency parser. The original Go version can be found in the oldgo branch. Dependencies

Daniël de Kok 41 Jan 25, 2022
Simple STM32F103 based glitcher FW

Airtag glitcher (Bluepill firmware) Simple glitcher firmware running on an STM32F103 on a bluepill board. See https://github.com/pd0wm/airtag-dump for

Willem Melching 27 Dec 22, 2022
Probabilistically split concatenated words using NLP based on English Wikipedia unigram frequencies.

Untanglr Untanglr takes in a some mangled words and makes sense out of them so you dont have to. It goes through the input and splits it probabilistic

Andrei Butnaru 15 Nov 23, 2022
Vaporetto: a fast and lightweight pointwise prediction based tokenizer

?? VAporetto: POintwise pREdicTion based TOkenizer Vaporetto is a fast and lightweight pointwise prediction based tokenizer. Overview This repository

null 184 Dec 22, 2022
Checks all your documentation for spelling and grammar mistakes with hunspell and a nlprule based checker for grammar

cargo-spellcheck Check your spelling with hunspell and/or nlprule. Use Cases Run cargo spellcheck --fix or cargo spellcheck fix to fix all your docume

Bernhard Schuster 274 Nov 5, 2022
A backend for mdBook written in Rust for generating PDF based on headless chrome and Chrome DevTools Protocol.

A backend for mdBook written in Rust for generating PDF based on headless chrome and Chrome DevTools Protocol.

Hollow Man 52 Jan 7, 2023
A small rust library for creating regex-based lexers

A small rust library for creating regex-based lexers

nph 1 Feb 5, 2022
A rule based sentence segmentation library.

cutters A rule based sentence segmentation library. ?? This library is experimental. ?? Features Full UTF-8 support. Robust parsing. Language specific

null 11 Jul 29, 2022