-
Notifications
You must be signed in to change notification settings - Fork 81
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
Can not build projects on MacOS Mojave #884
Comments
Looks like the bindists on Darwin are failing. That's the only square in the matrix that we're not currently testing in CI. @Profpatsch could you have a look? |
The
The |
After fighting with our Macbook (which is constantly running out of disk space), I prepared this very simple patch: @alonsodomin can you try it out? You can check out
(the clean might be necessary to not re-use the old bindist) |
@Profpatsch sorry for the delay testing this. The issue persists after checking out the tag and manually adding the additional line. I even commented out the
I may be doing something wrong though, I'm pretty new to Bazel tbh. |
Did you do a Is the error message the same? I’m getting a different error after applying the change:
Which is to be expected, because the |
right, yeah, that looks like a legit error from the build config.
I was getting the same as before, even though I had run the clean cmd you mentioned (tried again today, same again)
Anyway, I may have something wrong in my setup so I’ll try to fix it. From what you showed here, it seems the issue is solved.
On vie, may 24, 2019 a las 18:51, Profpatsch <[email protected]> escribió:
… Did you do a bazel clean --expunge?
Is the error message the same? I’m getting a different error after applying the change:
protocol/src/Herd/Data/Text.hs:11:1: error:
Could not load module _Data.Text_
It is a member of the hidden package _text-1.2.3.1_.
You can run _:set -package text_ to expose it.
(Note: this unloads all the modules in the current scope.)
Use -v to see a list of the files searched for.
|
11 | import Data.Text (Text)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Which is to be expected, because the text package is not imported in the BUILD.bazel file (similar to how you have to specify them in .cabal files usually).
—
You are receiving this because you were mentioned.
Reply to this email directly, [view it on GitHub](#884?email_source=notifications&email_token=AARKCAFGR52T2LDHCPMJDRLPXAMINA5CNFSM4HOTRPZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWF6JUA#issuecomment-495707344), or [mute the thread](https://github.com/notifications/unsubscribe-auth/AARKCAGBYN5HCRMMLB2FDO3PXAMINANCNFSM4HOTRPZA).
|
I’m gonna push a minor bug-fix version. |
Hm, we don’t have any other fixes lined up, so it wouldn’t make sense to push a release for one line of code. Are you okay with using current master in the meantime? |
@Profpatsch yeah, I'm ok with it, thanks for the effort on getting this fixed! |
I pushed a release, because another user ran into the same problem: https://github.com/tweag/rules_haskell/releases/tag/v0.9.1 |
Really appreciate that, I did try using this release and, sorry for being a PITA, but I'm still hitting the same issue, this is even after I cleaned (using This new test I made it in a fresh folder which I initialized using the load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "io_tweag_rules_haskell",
strip_prefix = "rules_haskell-0.9.1",
urls = ["https://github.com/tweag/rules_haskell/archive/v0.9.1.tar.gz"],
)
load(
"@io_tweag_rules_haskell//haskell:repositories.bzl",
"haskell_repositories",
)
# `haskell_repositories()` sets up all bazel dependencies
# required by `rules_haskell`.
haskell_repositories()
load(
"@io_tweag_rules_haskell//haskell:haskell.bzl",
"haskell_register_toolchains",
"haskell_register_ghc_bindists",
)
haskell_register_ghc_bindists(version = "8.6.4")
#haskell_register_toolchains() then run from the root folder using My Bazel version is 0.26, so not sure if this is due to version incompatibility: $ bazel version
Build label: 0.26.0-homebrew
Build target: bazel-out/darwin-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue May 28 14:16:39 2019 (1559052999)
Build timestamp: 1559052999
Build timestamp as int: 1559052999 Maybe the fact of having to use the Thanks anyway for all the effort on getting this sorted. |
We haven’t tested |
Yeah, sorry for not being more exhaustive on my tests. I did test this with Bazel 0.24 and got the same error. Here is the whole output from a single session after a fresh install:
Still saying:
|
I cannot reproduce, I get a different error with bazel 0.24.1:
How did you install bazel? |
I downloaded the 0.24.1 version from GitHub as specified in this link: https://docs.bazel.build/versions/0.26.0/install-os-x.html Basically by downloading an installer package and then run it. |
Ok, using the bazel 0.26 version from homebrew I get the same error. Will try to debug it tomorrow. |
MacOS uses BSD coreutils, which have a different set of options and different semantics (e.g. `sed`’s `-i` option). We cannot assume GNU coreutils anymore, because we want to support bindists on MacOS without dependence on nix. Closes #884
Okay, the problem was that MacOS uses BSD coreutils. Can you try out #937? |
MacOS uses BSD coreutils, which have a different set of options and different semantics (e.g. `sed`’s `-i` option). We cannot assume GNU coreutils anymore, because we want to support bindists on MacOS without dependence on nix. Closes #884
yeah, that worked using the |
Describe the bug
When trying to build a project using these rules, Bazel will attempt to download the necessary archives and packages to end up failing saying that it can't find the
@io_tweag_rules_haskell_ghc_darwin_amd64//
package.Here is the standard out:
To Reproduce
Clone the repo at
https://github.com/alonsodomin/herd
using thebazel
branch and then run the Bazel build from the root folder:git clone https://github.com/alonsodomin/herd cd herd git checkout bazel bazel build --incompatible_bzl_disallow_load_after_statement=false //protocol
Expected behavior
Bazel should finish the build successfully.
Environment
Additional context
You may also notice that with given version of Bazel, I need to use the
--incompatible_bzl_disallow_load_after_statement=false
parameter to accept the current rules as they are defined.The text was updated successfully, but these errors were encountered: