1
1
mirror of https://github.com/sol/hpack.git synced 2024-10-04 03:38:00 +03:00
Commit Graph

430 Commits

Author SHA1 Message Date
Mike Pilgrem
92742be221
Fix #573 Add support for asm-options and asm-sources (#588)
Follows the pattern of existing `cc-options` and `c-sources`, except for
tests (follows `cxx-options` and `cxx-sources`). Fixes:
* #573
2024-06-23 18:01:57 +01:00
Hécate Moonlight
d4635054ec Hide Data.List.List import 2023-11-25 00:17:10 +07:00
Simon Hengel
9a1b938c51 Don't infer Paths_-module with spec-version: 0.36.0 or later 2023-09-21 14:30:52 +07:00
Simon Hengel
56cdf88e52 Refactoring 2023-09-21 10:57:22 +07:00
Simon Hengel
4afeca67b6 Avoid unnecessary writes on --force (see #555) 2023-08-06 07:41:09 +07:00
Simon Hengel
a906d354d0 Fixup for 7601200dba 2023-08-04 19:18:51 +07:00
Simon Hengel
0ceda74a07 Add --canonical 2023-08-04 19:05:01 +07:00
Simon Hengel
7601200dba Fix a bug related to git conflict markers in existing .cabal files
When a `.cabal` file was essentially unchanged, but contained git
 conflict markers then `hpack` did not write a new `.cabal` file at
 all.  To address this `hpack` now unconditionally writes a new `.cabal`
 file when the existing `.cabal` file contains any git conflict markers.
2023-08-04 14:30:34 +07:00
Simon Hengel
a21fa6b79d Forward compat with aeson 2023-02-25 11:03:30 +07:00
Simon Hengel
cee15a6473 Add support for ghc-shared-options (close #542) 2023-01-26 08:08:48 +07:00
Simon Hengel
be9b7fa561 Add HpackError type 2022-12-12 05:55:16 +07:00
Simon Hengel
26eb44c9c7 Refactoring: Do not pass ProgramName around explicitly 2022-12-05 20:12:03 +07:00
Simon Hengel
da1635adee Minor refactoring 2022-12-05 19:52:35 +07:00
Simon Hengel
1d40fc4f6c Omit language if it is null 2022-04-22 19:41:27 +07:00
Simon Hengel
d8ab4b55d7 Warn on deprecated aliases field
Don't warn on `pkgconfig-depends` for now, as `pkg-config-dependencies`
isn't that nice neither.
2022-04-22 19:07:11 +07:00
Simon Hengel
9810f3bd0e Allow to set language from defaults 2022-04-22 15:13:05 +07:00
Simon Hengel
f3a4c9b38e Rename default-language to language
(accept `default-language` as an alias)
2022-04-22 14:46:13 +07:00
Simon Hengel
92c6c94115 Accept .cabal aliases for fields where hpack and .cabal differ
- `main-is` as an alias for `main`
- `hs-source-dirs` as an alias for `source-dirs`
- `build-depends` as an alias for `dependencies`
- `pkgconfig-depends` as an alias for `pkg-config-dependencies`
- `build-tool-depends` as an alias for `build-tools`
2022-04-22 13:57:04 +07:00
Simon Hengel
e8ae383bc9 Minor refactorig 2022-04-22 13:20:35 +07:00
Simon Hengel
98b3236733 Refactoring 2022-04-22 10:39:10 +07:00
Mike Pilgrem
bd454581e1 Fix #481 Allow default-language in package.yaml
Updates existing tests to specify the section default language as `Haskell2010`.

Adds tests in module `EndToEndSpec` for default-language.

Adds tests in module `Data.Aeson.Config.FromValueSpec` for when parsing a field of type `Last a`.

Also updates documentation.
2022-04-22 10:18:35 +07:00
Simon Hengel
e64442e7d5 Always render imports as the first field of a section (fixes #486) 2022-03-28 21:29:10 +07:00
Mike Pilgrem
05a8c0dbc6 Fix typo in name of type synonym 2022-03-28 17:50:33 +07:00
Simon Hengel
f9df468bec Add Paths_ module to autogen-modules when cabal-version >= 2 2021-11-27 02:36:58 +07:00
Simon Hengel
34fc7b4d34 aeson-2.* compat 2021-10-14 13:02:34 +07:00
Simon Hengel
d2fa993fde Use -Werror on CI 2021-02-18 21:32:56 +07:00
Simon Hengel
2b7f375fb0 Cabal 3.4 compat 2021-02-08 19:08:31 +07:00
Simon Hengel
30e56f5c5f Render default-extensions / other-extensions line-separated 2021-02-03 16:24:55 +07:00
Oleg Grenrus
6f5663f311 Use ./ for current directory. Upcoming cabal-install will warn about denormalized filepaths 2020-12-08 04:54:30 +07:00
Simon Hengel
aba1e2954a Minor refactoring 2020-11-13 01:55:33 +07:00
Simon Hengel
89736238f0 Accept lists for tested-with (close #407) 2020-11-11 14:36:23 +07:00
Simon Hengel
2bed823e98 Use Ord-based nub 2020-11-10 21:04:20 +07:00
Simon Hengel
ffb55c46c1 Do not use invalid indentation from existing .cabal file (fixes #252) 2020-11-10 20:46:48 +07:00
Andreas Abel
604b364d0e Fix #406 by nubbing module list generated from source files
Inserting a `nub` here is strictly improving the state of affairs,
since cabal chokes on a module list with duplicates.

This patch might also fix #353.
2020-11-10 15:43:16 +07:00
Simon Hengel
bd27333d7a Infer correct cabal-version when Path_ is used with RebindableSyntax
(and OverloadedStrings or OverloadedLists)
2020-11-10 02:09:49 +07:00
Simon Hengel
a679e76af3 Omit conditionals that are always false from generated .cabal file 2020-11-04 19:58:18 +07:00
Simon Hengel
12895cafd4 Refactor getModuleFilesRecursive 2020-11-04 01:00:39 +07:00
Simon Hengel
2bc3563561 Move modules related code into a separate module 2020-11-03 17:57:30 +07:00
Simon Hengel
5ad2123b0e Minor refactoring 2020-11-03 17:52:20 +07:00
Simon Hengel
dec9c82836 Add newtype Module 2020-06-05 22:49:39 +07:00
Simon Hengel
fe9f61b9b2 Ignore duplicate source directories (close #356) 2020-06-05 20:00:37 +07:00
Simon Hengel
ce6456d273 Fail with a descriptive error message on empty then/else (close #362) 2020-06-03 06:46:46 +07:00
Simon Hengel
0b1ac76a84 Infer "cabal-version: 3.0" when subcomponents are used in "dependencies" 2020-06-02 17:21:22 +07:00
Simon Hengel
7727fe2e83 Remove obsolete Cabal backwards compat code 2020-06-02 17:00:39 +07:00
Simon Hengel
1dc82f836d Accept subcomponents as dependencies (close #382) 2020-06-02 13:39:14 +07:00
Simon Hengel
fed5c7f195 Fix a bug in github: ...
(introduced with `0.34.0` / f63eb19b95)
2020-05-15 00:27:51 +07:00
Simon Hengel
d34aa83a9d Add command-line options --hash and --no-hash 2020-05-14 20:59:36 +07:00
Simon Hengel
ac77057f70 Do not hard code version 2020-05-14 20:34:40 +07:00
Simon Hengel
561b4e3e32 Do not complain on missing hash when cabal file doesn't change 2020-05-14 20:31:55 +07:00
Simon Hengel
f63eb19b95 Reject URLs for github 2020-05-03 18:23:37 +07:00