tweag / clodl

Turn dynamically linked ELF binaries and libraries into self-contained closures.
BSD 3-Clause "New" or "Revised" License
170 stars 6 forks source link

bazel 0.22 support #30

Open guibou opened 5 years ago

guibou commented 5 years ago

Fails with bazel 0.22:

root@f19bb6a322bd:/clodl# bazel build //:clotestbin-cc
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
INFO: Invocation ID: 0544d3f9-ac19-42c3-b50f-6c8ef4329a5b
ERROR: error loading package '': Encountered error while reading extension file 'haskell/repositories.bzl': no such package '@io_tweag_rules_haskell//haskell': The native http_archive rule is deprecated. load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") for a drop-in replacement.
Use --incompatible_remove_native_http_archive=false to temporarily continue using the native rule.
ERROR: error loading package '': Encountered error while reading extension file 'haskell/repositories.bzl': no such package '@io_tweag_rules_haskell//haskell': The native http_archive rule is deprecated. load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") for a drop-in replacement.
Use --incompatible_remove_native_http_archive=false to temporarily continue using the native rule.

Using the proposed workaround still fail:

root@f19bb6a322bd:/clodl# bazel build //:clotestbin-cc --incompatible_remove_native_http_archive=false
INFO: Invocation ID: 82f0e5ec-5ee5-40c7-8a41-59ca8fd03759
INFO: SHA256 (https://github.com/tweag/rules_haskell/archive/5c94b23107809026d7e6de25a891bd3874dbc522.tar.gz) = 89e312cc854251a988743f9c77c2a8a6a97a00ab73edb794bbe1f9d9217e5e50
INFO: SHA256 (https://github.com/tweag/rules_nixpkgs/archive/v0.2.1.tar.gz) = 96454359a456239f8829b8a7c71ffcb6bd27f28dd7d0c206b08f98c1281a2f0d
INFO: SHA256 (https://github.com/bazelbuild/rules_sass/archive/0.0.3.tar.gz) = 14536292b14b5d36d1d72ae68ee7384a51e304fa35a3c4e4db0f4590394f36ad
INFO: SHA256 (https://github.com/bazelbuild/skydoc/archive/f531844d137c7accc44d841c08a2a2a366688571.tar.gz) = a6f91d35beeff4b3d082349952b62a598ace855c268970a580244513bf4635ee
INFO: SHA256 (https://github.com/bazelbuild/bazel-skylib/archive/0.2.0.tar.gz) = 981624731d7371061ca56d532fa00d33bdda3e9d62e085698880346a01d0a6ef
ERROR: /clodl/BUILD:16:1: no such target '@io_tweag_rules_haskell//haskell:toolchain': target 'toolchain' not declared in package 'haskell' (did you mean 'toolchain.bzl'?) defined by /root/.cache/bazel/_bazel_root/28e33e437e789c23dd810e321f1fc417/external/io_tweag_rules_haskell/haskell/BUILD and referenced by '//:ghc'
ERROR: While resolving toolchains for target //:clotestbin-cc-closure_wrapper: invalid registered toolchain '//:ghc': Analysis failed
ERROR: Analysis of target '//:clotestbin-cc' failed; build aborted: Analysis failed
INFO: Elapsed time: 10.939s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (12 packages loaded, 47 targets configured)
facundominguez commented 5 years ago

This is probably fixed by updating the rules_haskell version to use.

guibou commented 5 years ago

Ok. What is the recommended version of bazel to use with clodl?

facundominguez commented 5 years ago

The one that ci uses I'm afraid. 0.13 or something like that.