Coder Social home page Coder Social logo

Comments (6)

nilslice avatar nilslice commented on May 30, 2024

That sounds pretty reasonable to me. How do you anticipate the output from running this to look?

Based on the desired output, maybe it should be the default when executing status... especially since the tool can't do it's job if you're not locking the inputs.

from protolock.

 avatar commented on May 30, 2024

Printing a single warning message and exiting abnormally should be enough - showing a diff or reporting on the changes would probably be too noisy.

Having it as the default would be nice, though perhaps a breaking change? It might then also be convenient to set the status code differently if the lockfile is just out-of-date, so build/test system integrations can distinguish between the two.

from protolock.

nilslice avatar nilslice commented on May 30, 2024

Printing a single warning message and exiting abnormally should be enough

100% agree!

Having it as the default would be nice, though perhaps a breaking change? It might then also be convenient to set the status code differently if the lockfile is just out-of-date, so build/test system integrations can distinguish between the two.

I also agree with you here... maybe we can include it as a default, but choose to return a non-zero exit code only if some configuration flag is set? This way, it's not a breaking change, but can be included as a default so it is useful to all users right away. I'm not sold either way yet -- please let me know what you think based on what is optimally useful.

This might also be a good time to re-visit @sidtaduri's #86.

from protolock.

 avatar commented on May 30, 2024

The flag sounds best. It looks like the CLI parsing would need a little refactoring, as currently all flags apply to all subcommands.


If this all sounds good, I have some bandwidth to implement this.

from protolock.

nilslice avatar nilslice commented on May 30, 2024

Ok, great -- yea if you want to go ahead, please do!

I believe the flag parsing can stay more-or-less the same, but the config struct should use a good "zero value" for the new flag, and used in the same way the other configuration flags are:
https://github.com/nilslice/protolock/blob/master/cmd/protolock/main.go#L62

This way it should simplify the eventual use of a config file and how it is parsed and applied.

Let me know if you find otherwise though! Thanks

from protolock.

nilslice avatar nilslice commented on May 30, 2024

added in #109 (from #102)

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.