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

Argparser and file options #41

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Commits on Dec 31, 2020

  1. chore(packages/spago.dhall): includes optparse

    Updates the package set from 0.13.0 to 0.13.3, which is the closest
    release that contains optparse.
    Profpatsch committed Dec 31, 2020
    Configuration menu
    Copy the full SHA
    eab1728 View commit details
    Browse the repository at this point in the history
  2. chore(Main): move parser to optparse

    Preparing to add flags to generate, so we can pass the spago.dhall
    file and cache directory.
    
    The resulting parser should be more or less the same, apart from a
    slight difference in the usage text. I tried keeping it as similar as
    possible.
    Profpatsch committed Dec 31, 2020
    Configuration menu
    Copy the full SHA
    37888c6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4ac8880 View commit details
    Browse the repository at this point in the history
  4. chore(nix): fix dependencies

    And a bit of shuffling to import the sources in the right way.
    
    default.nix should have the same interface than before, I make sure
    the existing args are still there.
    
    Originally created with niv, but removed all the bs.
    Profpatsch committed Dec 31, 2020
    Configuration menu
    Copy the full SHA
    f33c782 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e00892b View commit details
    Browse the repository at this point in the history
  6. feat(): add --cache-dir option to specify the cache directory

    The default of `./.spago2nix` not super helpful when running spago2nix
    from a script that should run in a temporary directory but still use
    the existing cache directory.
    Profpatsch committed Dec 31, 2020
    Configuration menu
    Copy the full SHA
    6a15dc0 View commit details
    Browse the repository at this point in the history
  7. feat(): add --spago-dhall option to build to give spago.dhall file

    Similarly to the `--cache-dir` option, when running `spago2nix` from a
    script the current working dir is often a tempdir outside of our
    source directory, thus we need a way to pass the path to
    `spago.dhall`.
    
    Since dhall handles relative imports based on file location,
    just passing the “entry point” `spago.dhall` is enough.
    Profpatsch committed Dec 31, 2020
    Configuration menu
    Copy the full SHA
    55189e4 View commit details
    Browse the repository at this point in the history
  8. fix(Main): don’t parse empty strings as file paths

    If somebody passes e.g. `--spago-dhall=`, that would mean they
    reference `.`, which is dumb.
    Profpatsch committed Dec 31, 2020
    Configuration menu
    Copy the full SHA
    4f98499 View commit details
    Browse the repository at this point in the history
  9. fix(tests): Fix the nix command line requirement for --

    Previously we just parsed argv, but the optparse library recognizes
    `-*` as options now, so the rest of the argv needs to be splitt off
    with `--`, as customary.
    
    This is a breaking change.
    Profpatsch committed Dec 31, 2020
    Configuration menu
    Copy the full SHA
    632fceb View commit details
    Browse the repository at this point in the history
  10. doc(): add CHANGELOG

    Add a CHANGELOG file and document the breaking change to the nix argv.
    Profpatsch committed Dec 31, 2020
    Configuration menu
    Copy the full SHA
    d49ee7b View commit details
    Browse the repository at this point in the history