Skip to content

Stack fails to build without Setup.hs #4517

@eborden

Description

@eborden

General summary/comments

cabal is able to build without a Setup.hs by defaulting to the most basic Setup.hs. stack should have feature parity in this respect.

Steps to reproduce

  1. git clone git@github.com:haskell/network.git
  2. cd network
  3. stack init
  4. stack build

Expected

stack should build with a default Setup.hs when no Setup.hs is present.

Actual

stack cannot build without a Setup.hs.

$ stack init
Looking for .cabal or package.yaml files to use to init the project.
Using cabal packages:
- ./

Selecting the best among 15 snapshots...

Downloaded lts-13.3 build plan.    
Didn't see cheapskate-0.1.1.1@sha256:f03d9784fd13cc970ecf5be8792f6c592e3127dce208efad07d614f86ec3c655,3114 in your package indices.
Updating and trying again.
Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/                                 
Downloading timestamp                                                                            
Downloading snapshot                                                                             
Updating index                                                                                   
Updated package index downloaded                                                                 
Update complete                                                                                  
Populated index cache.    
* Matches lts-13.3

Selected resolver: lts-13.3
Initialising configuration using resolver: lts-13.3
Total number of user packages considered: 1
Writing configuration to file: stack.yaml
All done.

$ stack build
No Setup.hs or Setup.lhs file found in /home/eborden/code/network/

Stack version

$ stack --version
Version 1.9.3, Git revision 40cf7b37526b86d1676da82167ea8758a854953b (6211 commits) x86_64 hpack-0.31.1

Method of installation

  • Official binary, downloaded from stackage.org or fpcomplete's package repository

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions