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

build failures for posix-api-0.1.0.0 #1

Open
hvr opened this issue Jan 7, 2019 · 5 comments
Open

build failures for posix-api-0.1.0.0 #1

hvr opened this issue Jan 7, 2019 · 5 comments

Comments

@hvr
Copy link

hvr commented Jan 7, 2019

Not sure if you noticed but there's build failures showing up at https://matrix.hackage.haskell.org/#/package/posix-api

(and this affects its reverse dependencies such as
https://matrix.hackage.haskell.org/#/package/ping)

@hvr hvr changed the title build failures for posix-0.1.0.0 build failures for posix-api-0.1.0.0 Jan 7, 2019
@andrewthad
Copy link
Member

Unfortunately, this package relies on a not-yet-released version of hsc2hs. In order to build it (or anything that depends on it), I tell cabal to use a local copy of hsc2hs. I should document this in the readme.

@hvr
Copy link
Author

hvr commented Jan 7, 2019

@andrewthad that means as soon as the respective hsc2hs version is released (or we know the version it'll have), we'll have to declare the lower version bound required in the .cabal file (via build-tools or build-tools-depends) via a metadata revision. Fwiw, in general Hackage is supposed to be self-contained, i.e. buildable with released dependencies (libraries as well as buildtools or toolchains) as otherwise it gets really complicated to ensure accurate metadata (which is esssential to a good user experience; our (simplified) mantra is that it's always preferable to fail during build-plan solving than to fail during compiling/typechecking).

@andrewthad
Copy link
Member

Ah, I was not aware of build-tool-depends. Since this libraries only supports cabal 2.2 and up, I should be able to use build-tool-depends, which is good. I have a PR making this requirement explicit. I would go ahead and merge it, but it unfortunately prevents the library from building even when I use --with-hsc2hs to explicitly feed in a version of hsc2hs that agrees with the lower bound.

@andrewthad
Copy link
Member

Also, with bd647c6, I've made the current shortcoming more clear in a readme.

@hvr
Copy link
Author

hvr commented Jan 8, 2019

Since this libraries only supports cabal 2.2 and up, I should be able to use build-tool-depends, which is good.

For the record, build-tools: hsc2hs >= x && < y is desugared into build-tool-depends: hsc2hs:hsc2hs >= x && < y; And there's been quite a few HAckage metadata revisions filling in missing build-tools: ... declarations for various core tools... as people tend to forget to specify them; we'll probably have to add a warning to cabal check to reduce this common mistake :-)

it unfortunately prevents the library from building even when I use --with-hsc2hs to explicitly feed in a version of hsc2hs that agrees with the lower bound.

yes, this is somewhat of a known issue because in v2-build we currently let cabal take care of procurring and building the required version and so far this hasn't been a problem because of that invariant I mentioned earlier that we generally don't upload things with dependencies on libs/tools that aren't released yet ;-)

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 a pull request may close this issue.

2 participants