Skip to content
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

Fix/improve output on errors #482

Commits on Oct 22, 2023

  1. Remove return/exit distinctions where not used

    We don't document exit code
    We sometimes don't care for the return of a function
    (e.g. 0 is the same as 1, though 1 indicates to the
    developer that something should potentially be handled)
    
    As for the change to list_add I don't actually see
    how it could fail (attaching to a file, or creating one?)
    and if it does is _very_ unexpected situations we
    want it to fail louder
    paulo-ferraz-oliveira committed Oct 22, 2023
    Configuration menu
    Copy the full SHA
    0cabd97 View commit details
    Browse the repository at this point in the history
  2. Update .kerl/otp_releases inplace

    This allow us to, at the same time:
    
    * create the file
    * return from inner functions, for exiting purposes
    * writing to stderr
      * without the output being consumed by sub-shells
    paulo-ferraz-oliveira committed Oct 22, 2023
    Configuration menu
    Copy the full SHA
    31f1bcf View commit details
    Browse the repository at this point in the history
  3. Fail louder

    In certain situations, I was getting execution stopping
    silently (e.g. 404 on curl calls) because we're using
    shortcuts such as || true, and || return, or even || exit
    without prior error messages, which this commit attempts
    to fix
    paulo-ferraz-oliveira committed Oct 22, 2023
    Configuration menu
    Copy the full SHA
    0f23603 View commit details
    Browse the repository at this point in the history
  4. Error out on assertion site, not call site

    When it's clear to do so, instead of bubbling up
    return values until we're ready to exit
    paulo-ferraz-oliveira committed Oct 22, 2023
    Configuration menu
    Copy the full SHA
    403eca4 View commit details
    Browse the repository at this point in the history
  5. Use less return/exit indirections

    Reduces the number of functions
    
    assert_ is ok to use, but then we have scattered exit
    vs. return which makes it harder to reason on
    
    Also, we move `assert_build_name_unused` to
    `is_build_name_used` to avoid double negation
    paulo-ferraz-oliveira committed Oct 22, 2023
    Configuration menu
    Copy the full SHA
    06c149a View commit details
    Browse the repository at this point in the history
  6. Prevent return+exit in same function/scope

    If the function is exiting we call exit
    If it's returning we prefer return (and exiting higher up)
    paulo-ferraz-oliveira committed Oct 22, 2023
    Configuration menu
    Copy the full SHA
    f385275 View commit details
    Browse the repository at this point in the history
  7. Simplify kerl active

    Previous changes allow us to prevent two calls to
    `get_active_path` while making sure:
    
    * we exit on error
    * always continue to function calls otherwise
      (we reduce a nesting level with this change)
    paulo-ferraz-oliveira committed Oct 22, 2023
    Configuration menu
    Copy the full SHA
    df81849 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    6079a69 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    e139d49 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    04cc564 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    479e5d3 View commit details
    Browse the repository at this point in the history
  12. Act on self-review: don't assume files aren't somehow protected

    Prefer failure with controlled messages
    paulo-ferraz-oliveira committed Oct 22, 2023
    Configuration menu
    Copy the full SHA
    70a37c8 View commit details
    Browse the repository at this point in the history
  13. Act on self-review: ease maintenance of do_build function return

    We always show_build_logfile with a message
      then autoclean with a file "pointer"
    
    With a function it'll be easier to not forget how to
    do cleanup, if the function changes in the future
    paulo-ferraz-oliveira committed Oct 22, 2023
    Configuration menu
    Copy the full SHA
    fde8ee5 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    b2a56c3 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    cf21ba3 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    785f984 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    ff6bd1b View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    a256167 View commit details
    Browse the repository at this point in the history
  19. Act on CI results: don't have CI fail with a new exit code

    Due to the recent changes we started exiting with 1 on
    _kerl status_ when no installation is active
    paulo-ferraz-oliveira committed Oct 22, 2023
    Configuration menu
    Copy the full SHA
    e71bef8 View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2023

  1. Configuration menu
    Copy the full SHA
    f09a628 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f5150bc View commit details
    Browse the repository at this point in the history
  3. Act on CI results: choose warn instead error, sometimes

    I think errors should always exit with a non-0 status
    
    ... but you might not always show an error when you exit
    with a non-0 status (this is context dependent)
    paulo-ferraz-oliveira committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    841284c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f7fcb26 View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2023

  1. Configuration menu
    Copy the full SHA
    8b1c6ab View commit details
    Browse the repository at this point in the history