-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add the stdlib_diff tool to compare gno and go standard libraries #2869
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2869 +/- ##
==========================================
- Coverage 63.33% 63.06% -0.27%
==========================================
Files 548 548
Lines 78601 81110 +2509
==========================================
+ Hits 49780 51155 +1375
- Misses 25466 26529 +1063
- Partials 3355 3426 +71
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@thehowl I took a look of this, the current status: 4 and 5 are fixed on eaf6a87
|
|
Removed the "review team" label because this is already reviewed by thehowl. |
…tion is the standard gno library
eaf6a87
to
777a759
Compare
Hey thanks a lot again for the review 👍 @thehowl . For 1 I added the line numbers and they are not selectable 2- Thanks a lot for this library tip, I was actually taking a lot of time trying to figure this line diff algorithm but It was pretty straightforward with the one you recommended. The only downside is that the library just return the part of the file that have some changes, so to print the entire file I needed to add some specific code to accomplish it. 3- subdirectories are listed on the index, if a library have subdirectories it will appear like a toggle list. I think there is still some improvements to do to the overall code, Just wanted to make sure this is the behaviour we'll like before doing some cleaning . Thanks |
I suggest you not to rebase your PRs, but instead to merge in master; it makes my work when reviewing easier. And possibly yours as well, in managing conflicts. (There are none here I think, but this is good general guidance) |
How are you running the thing? I'm running with |
Sorry about that I'll keep it on mind
I run it like this and for me it's working fine: go run . -src /opt/homebrew/Cellar/go/1.23.0/libexec/src -dst ../../gnovm/stdlibs -out ~/gnoreport/
2024/10/05 23:55:08 Building report...
2024/10/05 23:55:09 Report generation done! |
@thehowl |
Okay, figured it out. My The performance is satisfactory now. Thank you. I have a bunch of comments to make on some of the looks. Mostly things about UX / confusing more than design wise, just to make sure this thing is decently usable. Tell me if you want 'em your way, or I can wait if you already have ideas.
|
@thehowl Thanks again for this new round of review :)
Yep I'm using unified diff but seems like it only keeps the lines that have some differences, so entire parts of the file could be omited edits := myers.ComputeEdits(span.URIFromPath(f.Src), f.srcContent, f.dstContent)
unified := gotextdiff.ToUnified(f.Src, f.Dst, f.srcContent, edits) Some sort of what github does(you can only see from line 8-12: |
continuing the work started on #1425
thanks FloRichardAloeCorp for the great job on this issue 👍
closes #1310
Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the description