haskell / win32

Haskell support for the Win32 API
http://hackage.haskell.org/package/Win32
Other
98 stars 62 forks source link

`Setup.hs` seems inconsistent with the `build-type` option of the cabal file. #193

Closed ylecornec closed 2 years ago

ylecornec commented 2 years ago

The Setup.hs file seems to assume that a configure file is present in the package. It uses main = defaultMainWithHooks autoconfUserHooks which is not consistent with the build-type: Simple option of the Win32.cabal file (according to cabal's documentation).

Looking at the appveyor.yml file, it seems that this configure file is present in some contexts, but I do not know which ones. And because the cabal build-type is Simple, I wonder if this file may be optional, in which case the Setup.hs file should maybe use main = defaultMain by default.

This would make it possible to run runghc Setup.hs configure (which is what we usually do in the rules_haskell ruleset for Bazel).

Current Behavior

Trying to configure the package with runghc Setup.hs configure fails with the following error.

Setup.hs: configure script not found.

Steps to Reproduce (for bugs)

  1. git clone https://github.com/haskell/win32.git
  2. cd win32
  3. runghc Setup.hs configure

Your Environment

Github action failure

Here is also an example of this failure in a github action with the following environment:

Mistuke commented 2 years ago

Sorry I had somehow missed this bug report. I don't think it needs the Setup.hs at all so removing it with #195