Newest at the top
2025-05-01 22:28:17 +0200 | <sim590> | I have that though . |
2025-05-01 22:28:01 +0200 | <tomsmeding> | in your case, it's just `packages: .` |
2025-05-01 22:27:56 +0200 | <tomsmeding> | sim590: yes, that's because if you have a cabal.project, then cabal expects you to have a `packages:` clause in that file |
2025-05-01 22:27:36 +0200 | <sim590> | The weird thing is that if I use `cabal.project` instead of `cabal.project.local`, I get this `Warning: There are no packages or optional-packages in the project`. |
2025-05-01 22:27:25 +0200 | tomsmeding | never uses `cabal configure` |
2025-05-01 22:27:19 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds) |
2025-05-01 22:27:10 +0200 | <tomsmeding> | (and more broadly, cabal.project is configuration for building this project from the source repository, whereas users who depend on your package via hackage will only see the .cabal file) |
2025-05-01 22:27:02 +0200 | <int-e> | Unless I'm mixing something up? |
2025-05-01 22:26:20 +0200 | <int-e> | AFAIA `cabal configure` puts paths there |
2025-05-01 22:26:15 +0200 | <tomsmeding> | sim590: cabal.project.local is intended to be the configuration on your local machine that you don't commit to version control; cabal.project is the one that you _do_ commit |
2025-05-01 22:26:06 +0200 | <int-e> | oh and you don't want to commit it to repos because it contains local paths |
2025-05-01 22:25:57 +0200 | <sim590> | When? |
2025-05-01 22:25:43 +0200 | <int-e> | sim590: the main downside I see is that the config will be overwritten all the time |
2025-05-01 22:25:43 +0200 | <tomsmeding> | "enhance diagnostics to clarify type errors ... involving bool" sounds completely unrelated |
2025-05-01 22:25:40 +0200 | <sim590> | It's just something I did for another project and it worked, so I assumed I needed that. |
2025-05-01 22:25:23 +0200 | <sim590> | I'm not too sure about the consequences of using `.local`? |
2025-05-01 22:24:46 +0200 | <tomsmeding> | _what_ |
2025-05-01 22:24:01 +0200 | <int-e> | Well regardless of why, the support in .cabal files is not there. |
2025-05-01 22:23:53 +0200 | <sim590> | So, the exact issue I'm working with is over here: https://github.com/haskell/c2hs/issues/300#issuecomment-2845352330 |
2025-05-01 22:23:09 +0200 | <tomsmeding> | I'm not sure why it can't go in the .cabal file, since it sounds like everyone will need this option. :) |
2025-05-01 22:22:55 +0200 | <tomsmeding> | it was |
2025-05-01 22:22:43 +0200 | <sim590> | OK. I'll remember that! I thought it was sensible to go straight into the .cabal file, but I guess that's not how it's made. |
2025-05-01 22:22:41 +0200 | <tomsmeding> | surely other people will need it too! |
2025-05-01 22:22:36 +0200 | <int-e> | if this works anywhere locally it'll be in cabal.project and/or cabal.project.local (and if it works in the latter but not in the former that becomes messy because the file tends to be regenerated by `cabal configure` and the like) |
2025-05-01 22:22:34 +0200 | <tomsmeding> | so I'm not sure putting it in cabal.project.LOCAL is really the best choice |
2025-05-01 22:22:26 +0200 | <tomsmeding> | sim590: given the nature of the option that you're passing to c2hs, it feels likely to me that this is not just a workaround for a bug, but actually required for setting the C language standard for parsing whatever C code you're working with |
2025-05-01 22:22:23 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-05-01 22:21:08 +0200 | <tomsmeding> | it's often the case that `cabal build` options correspond to keys under a `package` clause in cabal.project |
2025-05-01 22:20:25 +0200 | <sim590> | so, i just tried `program-options` and it doesn't work. But, your other suggestion with a `cabal.project.local` file and the line `packages .` and then `package opendht-hs` with the config under that section did the trick! |
2025-05-01 22:17:45 +0200 | <tomsmeding> | sim590: I see 'program-options' in the cabal documentation, not 'program-default-options'. Have you tried 'program-options' instead? |
2025-05-01 22:17:42 +0200 | sprotte24 | (~sprotte24@p200300d16f04420079bd62a2defad9dd.dip0.t-ipconnect.de) |
2025-05-01 22:16:21 +0200 | <tomsmeding> | (substituting a newline for \n and indentation for \t, naturally) |
2025-05-01 22:16:04 +0200 | <tomsmeding> | sim590: have you tried putting `package opendht-hs\n\tc2hs-options: -C -std=gnu18` in cabal.project? |
2025-05-01 22:15:44 +0200 | tromp | (~textual@2001:1c00:3487:1b00:81f6:6a75:5fad:c9b4) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2025-05-01 22:15:26 +0200 | <sim590> | But this `cabal v2-build --c2hs-options="-C -std=gnu18"` works on the command line. |
2025-05-01 22:13:51 +0200 | <sim590> | tomsmeding: yeah and it doesn't wrk. Let me upload what I tried: https://paste.debian.net/1372745/. |
2025-05-01 22:12:13 +0200 | <tomsmeding> | sim590: have you tried just putting `c2hs-options: ...` in your .cabal file (not cabal.project)? It's not listed in the docs, but maybe they skipped it |
2025-05-01 22:12:04 +0200 | __jmcantrell__ | (~weechat@user/jmcantrell) (Ping timeout: 276 seconds) |
2025-05-01 22:12:00 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds) |
2025-05-01 22:11:26 +0200 | <sim590> | int-e: is there an equivalent t the ~/.cabal/config file per project? I want that config to be effective for my repo. |
2025-05-01 22:11:08 +0200 | <int-e> | Sorry, I searched for "c2hs" and I forgot that hsc2hs is its own thing. |
2025-05-01 22:10:28 +0200 | <int-e> | hmm maybe .cabal files don't have a setting for this then |
2025-05-01 22:10:13 +0200 | <tomsmeding> | because I saw that one and skipped it because the question was about c2hs |
2025-05-01 22:10:05 +0200 | <int-e> | it's not |
2025-05-01 22:10:03 +0200 | <sim590> | tomsmeding: No, they are different I think. |
2025-05-01 22:09:58 +0200 | <int-e> | uh |
2025-05-01 22:09:49 +0200 | <tomsmeding> | int-e: is hsc2hs the same as c2hs? |
2025-05-01 22:09:38 +0200 | <sim590> | I thought it was foor .cabal file. |
2025-05-01 22:09:34 +0200 | <int-e> | https://cabal.readthedocs.io/en/latest/cabal-package-description-file.html#pkg-field-hsc2hs-options |
2025-05-01 22:09:30 +0200 | <sim590> | ahhhh OK |