-
Notifications
You must be signed in to change notification settings - Fork 383
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
Tool for comparing source code of standard libaries between Go and Gno #1310
Comments
Hello, the purpose is to indicate the missing / added files or the differences between source code implementation? |
Yes, I envision it as such: for each standard library, have a statically-generated HTML page showing side-to-side diff comparisons of matching go/gno files in the stdlibs. (ie. strings.go matches the equivalent strings.gno). If they differ by a file (because either of the two misses it entirely), show the entire "missing" source file. Then, in the future, other possible improvements:
|
I understand. Does code comments count as a diff, and do unit test files count as well? |
Yes and yes. Ideally: find a system for Gno source code to specify the reference Go source code; and add a dropdown to switch between Go source code versions.
Totally. I'd think of an executable that can generate this, maybe with a couple of flags or env variables to specify where to find the Go stdlibs and the Gno stdlibs. Then, additionally, we should incorporate in our CI pipeline the upload of the statically-generated HTML files containing the diffs. |
Ok, I will work on it. |
Ping me on Discord on the #gnolang-dev channel if you need any help. (username: morganbaz) |
@FloRichardAloeCorp This works, although for "split view" I was thinking of something closer to what GitHub does (try opening a Pull request's diff, clicking the cog and putting "split view"), so you see the original and deletions on the left, and the changed file with additions on the right. Any diff will pretty much work for a first version, though. If you think that would require too much work to get the alignment right for instance, let's roll with what you made and iterate later :) |
@thehowl Coming back to you again. I've tried the above suggestions that you've made. Here are the results: I need your validation to continue further :) Another question about usage: will you use it on the entire standard library, or do you want the tool to be able to specify a particular package to process? (both usage are also possible) |
@FloRichardAloeCorp love this! I'd like the tool to work on entire standard library source trees. Ie. also, check your discord DM's |
It would be useful to have a tool to do what is described in the title. Right now, when reviewing PRs, I'm comparing the source with Go's using diffchecker. I think we can create a simple tool that compares the directories and source code in GOROOT/src and those in GNOROOT/gnovm/stdlibs.
My idea:
misc/stdlibs_diff
The text was updated successfully, but these errors were encountered: