jola

jola

Hey everyone! It’s my enormous pleasure to present Hex Diff, an official hex.pm service for generating web-based diffs between package versions on Hex. You can find it at https://diff.hex.pm.

Read more about it and why it’s a great tool for the community on the announcement blog post!

Showing Posts 15 to 6

LostKobrakai

LostKobrakai

Github and hex are completely unrelated. Files are directly uploaded from the maintainers computer. They might just have a .gitignore setup for .DS_Store files.

csadewa

csadewa

Just read it today, hex diff seems nice!

however i am confused on .DS_Store. while trying hex diff on Ecto 3.3.1 to 3.3.2 (ecto 3.3.1..3.3.2 | hexdiff), .DS_Store file (mac related?) is included on the change. But when i try to see github repo for 3.3.2 (ecto/lib/mix/tasks at v3.3.2 · elixir-ecto/ecto · GitHub) i could not find .DS_Store file.

hauleth

hauleth

I have spotted that Elixir already provides functionality that I wanted to implement - List.myers_difference/2, however I would need to dig more if there is space for optimisations, I am still learning the Myer’s algorithm.

@jola you can see that one and see how much performance difference is there between calling external Git command vs using above function on in-memory data. If there is noticeable difference that cannot be solved by caching then I can try to implement NIF for Git’s xdiff library.

hauleth

hauleth

Yeah, I have seen that. PR is ready.

jola

jola OP

You can see the exact command run here diff/lib/diff/hex/hex.ex at main · hexpm/diff · GitHub

A solution that doesn’t require shelling out to git is absolutely welcome!

hauleth

hauleth

xdiff is library used by Git, so there should be no difference. By the way, do you use regular algorithm or patience? Patience one should give slightly better results while being slightly more computationally expensive (but caching should made it neglible difference).

I will try to write something like that in some spare time.

wojtekmach

wojtekmach

Hex Core Team

Using git diff was a pragmatic choice with libraries support (we use git_diff | Hex to parse hunks to provide better user experience).

I think a pure Elixir solution would be interesting and in fact that could be a great default for another tool: mix hex.package diff (we couldn’t use a NIF there)

hauleth

hauleth

I have checked it out, and for now one thing brought my attention - why fire git diff to compare two projects? Now I am thinking about writing diff algorithm in Elixir or to bring it via NIF to xdiff.

jola

jola OP

That’s something we can look into, don’t hesitate to make an issue on the diff repo with your ideas and examples of what it would look like!

There are links to the diffs, but they might be a bit tricky to see

If you have ideas for how to improve the UI and make the diffs easier to see, please make an issue on the hexpm repo :slight_smile:

11
Post #8
zimt28

zimt28

Very useful tool, thanks! Would it be possible to add some information like a total X files changed, Y lines added, Z lines removed and then +X lines, -Y lines per file?

And what about a link on hex.pm/package to the latest diff? :slight_smile:

Where Next? Top

Trending in News Top

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews