Coder Social home page Coder Social logo

provide proto diff about buf HOT 7 CLOSED

bufbuild avatar bufbuild commented on September 18, 2024
provide proto diff

from buf.

Comments (7)

bufdev avatar bufdev commented on September 18, 2024

#26

It's an interesting feature request, there's a lot of problems in the details, however. What would you propose as to the format of the output diff?

from buf.

yangzh avatar yangzh commented on September 18, 2024

thanks for getting back to me!

At first thought, can we simply use unified diff format (https://www.gnu.org/software/diffutils/manual/html_node/Unified-Format.html), on top of that, color-syntax and other tools can be built as well.

from buf.

bufdev avatar bufdev commented on September 18, 2024

Can you provide an example?

from buf.

yangzh avatar yangzh commented on September 18, 2024

How about this

You can also pass in arguments from man diff.

from buf.

bufdev avatar bufdev commented on September 18, 2024

Question: why do you need buf to have a separate command to do this? Ie what do you think buf check diff will do differently than, for example, git diff?

from buf.

yangzh avatar yangzh commented on September 18, 2024

good question, I guess I haven't thought this through.

Yes, I think git diff will do (at least majority) of the work.

but diff can potentially group and compare fields (of the same tag) together, even if someone has moved the field elsewhere, as it parses the protobuf schema.

However, I think that's a bit too far and uses cases not well-defined: we can always enforce good practice to prevent that.

In that case, I would say don't bother with buf. Thanks and sorry for the trouble.

from buf.

bufdev avatar bufdev commented on September 18, 2024

Sounds good! Let us know if you need anything else here.

from buf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.