ferrous-systems / cargo-review-deps

A tool for auditing Cargo dependencies during updates
https://ferrous-systems.com/
Apache License 2.0
54 stars 4 forks source link

Request: Generate an HTML diff report #1

Open jamesmunns opened 5 years ago

jamesmunns commented 5 years ago

In order to review changes more easily, it might be nice to have an "output to html" feature

jamesmunns commented 5 years ago

Additionally, it might be nice to add an --open (similar to cargo doc --open) to automatically open this report in the browser

matklad commented 5 years ago

Yeah. Ideally, we don't depend on the external diff tool at all, and use some Rust library.

However, I don't know of-the-shelf solution here: there are a couple of libraries for diffing strings using edit-distance and whatnot, but nothing I know can generate fancy html.

jamesmunns commented 5 years ago

Maybe difference.rs?

EDIT: That probably only helps with the diff library, not generating HTML. For that, we might want to use some existing static site generator, with maybe zola, and some custom CSS/JS/templating

Xylakant commented 5 years ago

why not something like https://github.com/rtfpessoa/diff2html-cli

matklad commented 5 years ago

Also https://crates.io/crates/diffs

Yep, they fall into category of "diff two strings", but IIRC, don't have a too fancy results presentation. Though, difference.rs can do ANSI-escapes coloring.

There's also an interesting problem here of finding a minimal diff of directories (which accounts for file renames and motions).

Xylakant commented 5 years ago

a node module used in a tool to prevent an npm-like fuckup. full circle, I'd say.

sirgl commented 5 years ago

https://nest.pijul.com/pijul_org/pijul But it is GPL...

enzious commented 5 years ago

I've got something here but it's a bit rough. It comes with a cli command too.

https://crates.io/crates/diff2html