-
Notifications
You must be signed in to change notification settings - Fork 841
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
SDist code deling with custom-setup incorrect #4006
Comments
I got this warning too and don't know what to do about it. |
@afcowie @SamRoberts rather than the Lines 328 to 331 in 9900d99
The change was introduced to fix #941. I'll investigate. Edit: The question is, why isn't this branch being taken, instead of the branch which logs that error. stack/src/Stack/Build/Execute.hs Lines 1095 to 1122 in 9900d99
Meanwhile, more detail is generally helpful. Would you please indicate which stack version, paste the |
@afcowie if you remove the explicit |
@dbaynard I'll try it, but I'm pretty sure I put that there because stack told me to (a sdist warning) in the first place. |
Quite — the bundled package will be missing the required build dependencies. But at least we can test the correct code path. |
This is still relevant with 2.5.1, |
@maksbotan could you give me some example package using |
http-streams doesn't appear to use it anymore |
Actually, now I'm only able to reproduce this if I run Setup.hs: import Data.Aeson
import Distribution.Simple
main = defaultMain stack-example.cabal: cabal-version: 2.0
name: stack-example
version: 0.1.0.0
author: Author name here
maintainer: example@example.com
copyright: 2020 Author name here
license: BSD3
build-type: Custom
custom-setup
setup-depends:
Cabal
, aeson
, base
, bytestring
, directory
, filepath
, process
library
exposed-modules: Lib
hs-source-dirs: .
build-depends: base >=4.7 && <5
default-language: Haskell2010 You can use I'm not sure why it didn't work (consistently) in our setup, as I certainly did not switch resolvers, but I workarounded it by using |
Thank you, this helps a lot. I will take a look. As for problems with consistency - probably there's some other unaccounted detail, we'll see |
My guess is that subsequent run is able to get Here's the command that stack builds Setup.hs with:
Note the |
@maksbotan something's quite odd here - changing 15.14 to 15.15 brought me only error of cabal file with no description and only when I switched to 15.16 I see
|
It looks like there's nothing in |
For reference, I'm on macOS Catalina with
However, our CI runs Ubuntu with stack 2.1 and experienced this as well. |
It doesn't look like OS could matter in any way and the code causing this was there at least in Stack-1.9.3.1 already, an implementation detail, so to say... |
When uploading http-streams using
stack upload .
(ie thesdist
step) I get the following warning:which is weird because the .cabal file in question has what I was told to put there previously:
I asked in the Haskell channel at work and the epic @SamRoberts read through the stack code and in short order found the message is emitted from Execute.hs's function
withSingleContext
. Its fourth argument is a Maybe (Map something something).This appears to be called from SDist.hs where the fourth argument is hard coded to
Nothing
. Hence warning.Seems either the
Nothing
is wrong and we need to pass in the custom-setup (?) map or the warning code needs to know that it's not going to actually get a map and not warn.AfC
feel free to change the issue title to something more helpful
The text was updated successfully, but these errors were encountered: