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

Add Stack project-level configuration #17

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

mpilgrem
Copy link
Contributor

@mpilgrem mpilgrem commented Oct 1, 2023

Thank you for your very interesting blog post.

Footnote 4 referred to an interest in a working Stack build. I can build the package with this configuration file (which uses the most recent Stackage LTS Haskell snapshot, for GHC 9.4.7).

I also had success with using the plugin with Stack, with a simple single-package project, with package.yaml:

name:                hlintPluginTest
version:             0.1.0.0

dependencies:
- base >= 4.7 && < 5
- hlint-plugin

ghc-options:
- -fplugin HLint.Plugin

library:
  source-dirs: src

executables:
  hlintPluginTest:
    main:                Main.hs
    source-dirs:         app
    ghc-options:
    - -threaded
    - -rtsopts
    - -with-rtsopts=-N
    dependencies:
    - hlintPluginTest

and stack.yaml:

resolver: lts-21.13

extra-deps:
- hlint-plugin-1.0.2

flags:
  ghc-lib-parser-ex:
    no-ghc-lib: true
  hlint:
    ghc-lib: false

@mpilgrem
Copy link
Contributor Author

mpilgrem commented Oct 1, 2023

However. my example does not work if I bump the snapshot to GHC 9.6.3 (nightly-2023-10-01). That appears to be another manifestation of this: https://discourse.haskell.org/t/ghcs-fplugin-any-changes-between-9-4-7-and-9-6-2/7656. That experience seems to be either a bug in GHC 9.6.2/9.6.3, or a bug in Stack or Cabal (the library) only revealed by GHC 9.6.2/9.6.3. I am planning to raise an issue at GHC's repository. EDIT: https://gitlab.haskell.org/ghc/ghc/-/issues/24043

@Gabriella439 Gabriella439 merged commit d758d9b into MercuryTechnologies:main Oct 4, 2023
13 checks passed
@Gabriella439
Copy link
Contributor

Thank you! This is still great even if the GHC 9.6 build doesn't work

@mpilgrem mpilgrem deleted the stack branch October 5, 2023 08:10
@mpilgrem
Copy link
Contributor Author

mpilgrem commented Dec 2, 2023

The GHC 9.6.3 issue is a bug in Cabal-3.10.1.0: haskell/cabal#9375.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants