-
Notifications
You must be signed in to change notification settings - Fork 23
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
base: master
Are you sure you want to change the base?
Argparser and file options #41
Commits on Dec 31, 2020
-
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.
Configuration menu - View commit details
-
Copy full SHA for eab1728 - Browse repository at this point
Copy the full SHA eab1728View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 37888c6 - Browse repository at this point
Copy the full SHA 37888c6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4ac8880 - Browse repository at this point
Copy the full SHA 4ac8880View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for f33c782 - Browse repository at this point
Copy the full SHA f33c782View commit details -
Configuration menu - View commit details
-
Copy full SHA for e00892b - Browse repository at this point
Copy the full SHA e00892bView commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 6a15dc0 - Browse repository at this point
Copy the full SHA 6a15dc0View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 55189e4 - Browse repository at this point
Copy the full SHA 55189e4View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 4f98499 - Browse repository at this point
Copy the full SHA 4f98499View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 632fceb - Browse repository at this point
Copy the full SHA 632fcebView commit details -
Add a CHANGELOG file and document the breaking change to the nix argv.
Configuration menu - View commit details
-
Copy full SHA for d49ee7b - Browse repository at this point
Copy the full SHA d49ee7bView commit details