Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/haskell/Cabal. Pull mirroring updated .
  1. Dec 18, 2023
  2. Jul 31, 2023
    • f-a's avatar
      Do not ask overwrite questions for empty dirs (#9155) · 9fe1ac82
      f-a authored
      * Do not ask overwrite questions for empty dirs
      
      See #9150, blank projects need not to ask permission to
      overwrite files.
      
      * Fix tests
      
      "test-dir" [] are the mock calls to `getPackageDir` and `listDirectory`
      9fe1ac82
  3. May 24, 2023
  4. Mar 05, 2023
    • BasLaa's avatar
      Return empty default when git fails · 5073063d
      BasLaa authored
      Add maybe in guess functions
      
      Adjust type in NonInteractive
      
      Change unit tests
      
      Fix whitespace
      
      Abstract guessing and remove comments
      
      Simplify guess functions
      
      Return default for cabal init author and name when git fails
      5073063d
  5. Feb 17, 2023
  6. Jan 29, 2023
  7. Nov 12, 2022
  8. Jul 19, 2022
  9. Jul 12, 2022
  10. Jul 09, 2022
  11. Jul 08, 2022
    • Artem Pelenitsyn's avatar
      cabal init -i should autodetect author name and maintainer email (#8267) · 1b8bf8cc
      Artem Pelenitsyn authored
      * cabal init -i should autodetect author name and maintainer email (fix #8255)
      
      Name and email are fetched from git config in the non-interactive init
      already, and we plug that utility into the interactive one in this commit.
      
      Testing becomes clunkier: the list of inputs have to hold an additional
      string that will be used as the return value of
      `Interactive.readProcessWithExitCode`, and here is why. Recall that this
      method is used to call `git config` to perform autodetection. In the
      real scenario (the `IO` instance of `Interactive`), it actually calls
      out to `git`. In the testing scenario (the `PurePrompt` instance of
      `Interactive`), the method simply returns the next element of the list
      of pre-defined inputs. So, the list of inputs to every relevant test has
      to be adjusted.
      
      * Add test checking that username/email can be autodetected
      1b8bf8cc
  12. Apr 22, 2022
  13. Mar 20, 2022
  14. Mar 10, 2022
  15. Feb 28, 2022
  16. Nov 26, 2021
  17. Aug 16, 2021
  18. Jul 14, 2021
  19. Jul 07, 2021
  20. Jun 23, 2021
  21. May 14, 2021
  22. May 12, 2021
  23. May 07, 2021
  24. May 05, 2021
  25. May 04, 2021
    • Patrick Augusto's avatar
    • Emily Pillmore's avatar
      Rewrite `cabal init` command · 10687555
      Emily Pillmore authored
      * Restructures the `cabal init` command to fix historical
        issues. All flags are preserved.
        * Codebases for interactive and non-interactive flags
          are disentangled.
        * Data structures now exploit relevant stanza structure
          and formatters only care about stanza data
        * Heuristics and prompts have a pure and impure implementation.
      
      * Sets default behavior to be `--interactive` as opposed to
        `--non-interactive`.
      
      * Rewrites tests to achieve 98% coverage
        * Golden files now test every stanza individually
        * Every flag is covered by a unit test
        * Interactive, simple, and non-interactive workflows are
          covered.
      10687555
Loading