Coder Social home page Coder Social logo

Comments (9)

noel-yap avatar noel-yap commented on May 30, 2024 1

#29

from protolock.

noel-yap avatar noel-yap commented on May 30, 2024

This is especially important if the proto files import third-party proto files since those proto files are downloaded to some build, cache, or other ephemeral directory which leads to init and commit generating different proto.lock contents depending on whether or not the proto files have been processed.

from protolock.

nilslice avatar nilslice commented on May 30, 2024

@noel-yap good point. Do you think the example shown in my initial comment covers the case you mentioned?

I also have #20 open which expands on the ignored protos using .gitignore (though would probably also make sense to consider other VCS ignore files as well).

from protolock.

noel-yap avatar noel-yap commented on May 30, 2024

I would say the example is sufficient in that what I had said can be extrapolated from it. A more direct example would have something like --ignore=build (Gradle places build artifacts into a build directory).

I'm personally kinda wary about tying this project to any specific VCS tool. Perhaps specifying the ignore file would be good enough if they abide by similar syntax in those files (eg Ant globs).

Thinking about it a bit more, the code already filters out non-proto files so I'm guessing much of what would be in VCS ignore files would already be filtered out.

Anyway, having said all of the above, I'm working on the --ignore feature and don't see much value add for the VCS ignore file feature so won't be working on that.

from protolock.

nilslice avatar nilslice commented on May 30, 2024

I would say the example is sufficient in that what I had said can be extrapolated from it. A more direct example would have something like --ignore=build (Gradle places build artifacts into a build directory).

Ok, great, thanks. If it's not clear, the example shows a comma-separated list of paths or filenames to ignore. Just wanted to make sure that was pointed out. Especially since you're starting work on this feature (many thanks by the way).

I'm personally kinda wary about tying this project to any specific VCS tool. Perhaps specifying the ignore file would be good enough if they abide by similar syntax in those files (eg Ant globs).

I agree. Although, there would really only be reason to support Git, Mercurial, and SVN in my opinion, and that doesn't seem too bad. The reason to auto-ignore paths in the ignorefiles is so that invoking protolock with a long string of paths in the --ignore option could get messy.

Thinking about it a bit more, the code already filters out non-proto files so I'm guessing much of what would be in VCS ignore files would already be filtered out.

I have a project where the make install step will install protoc into the repo's tree (but protoc-3 the directory where the binary lives in the repo tree is included in the .gitignore), and I don't want to lock the .protos that exist in that directory. I'm sure there are many other cases where a similar problem is encountered. I'll do some testing and try to get more feedback.

from protolock.

noel-yap avatar noel-yap commented on May 30, 2024

Yeah, understood that --ignore takes in a comma-separated list. I was assuming it involved only directories. Glad you mentioned specific files can be ignored, too.

Yeah, more real-life scenarios would be valuable input. Thanks.

I didn't mean to imply that the VCS ignore file feature wouldn't have value to anyone and everyone -- just not much value for my own needs (BTW, I'm creating a Gradle plugin for protolock) at least for the time being. Far be it from me to try to stop someone else from working on this feature.

from protolock.

nilslice avatar nilslice commented on May 30, 2024

(BTW, I'm creating a Gradle plugin for protolock)

@noel-yap, can't wait to see it -- if you don't mind, we can link it on the README. I think it would be quite helpful to others.

from protolock.

noel-yap avatar noel-yap commented on May 30, 2024

Mind? I'm all for it! We'll likely test it out for a while at work before open-sourcing it.

from protolock.

nilslice avatar nilslice commented on May 30, 2024

@noel-yap awesome! that sounds great.

from protolock.

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.