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

base-orphans doesn't build: Saw: Data.Orphans.Prelude' Expected: Prelude' #139

Closed
iphydf opened this issue Feb 14, 2018 · 3 comments · Fixed by #147
Closed

base-orphans doesn't build: Saw: Data.Orphans.Prelude' Expected: Prelude' #139

iphydf opened this issue Feb 14, 2018 · 3 comments · Fixed by #147
Assignees
Labels
P2 major: an upcoming release type: bug

Comments

@iphydf
Copy link

iphydf commented Feb 14, 2018

WORKSPACE:

new_http_archive(
    name = "haskell_base_orphans",
    build_file = "third_party/haskell/BUILD.base-orphans",
    sha256 = "c7282aa7516652e6e4a78ccdfb654a99c9da683875748ad5898a3f200be7ad0e",
    strip_prefix = "base-orphans-0.6",
    urls = ["https://hackage.haskell.org/package/base-orphans-0.6/base-orphans-0.6.tar.gz"],
)

third_party/haskell/BUILD.base-orphans:

load("@io_tweag_rules_haskell//haskell:haskell.bzl", "haskell_library")

haskell_library(
    name = "base-orphans",
    srcs = glob(["src/**/*.hs*"]),
    prebuilt_dependencies = ["base"],
    src_strip_prefix = "src",
    visibility = ["//visibility:public"],
)

Error:

external/haskell_base_orphans/src/Data/Orphans/Prelude.hs:17:8: error:
    File name does not match module name:
    Saw: `Data.Orphans.Prelude'
    Expected: `Prelude'
Target @haskell_base_orphans//:base-orphans failed to build
@iphydf
Copy link
Author

iphydf commented Feb 14, 2018

This affects any package that defines a "Prelude" module anywhere. "github" is another example.

@mrkkrp
Copy link
Member

mrkkrp commented Feb 20, 2018

Similarly here:

https://github.com/mrkkrp/rules_haskell-repro-139

And I get:

[mark@arch repro_139]$ bazel clean
INFO: Starting clean (this may take a while). Consider using --async if the clean takes more than several minutes.
[mark@arch repro_139]$ bazel build @haskell_base_orphans://...
INFO: Analysed 0 targets (4 packages loaded).
INFO: Found 0 targets...
INFO: Elapsed time: 0.286s, Critical Path: 0.00s
INFO: Build completed successfully, 1 total action

Any comment, @iphydf ?

@iphydf
Copy link
Author

iphydf commented Feb 20, 2018

https://travis-ci.org/iphydf/repro139/jobs/343829107#L652 <- reproduced on travis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 major: an upcoming release type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants