Skip to content

Commit

Permalink
Update dependencies, fix a few incompatible issues (#166)
Browse files Browse the repository at this point in the history
Tested:
  bazel-0.20.0rc4 test //... --all_incompatible_changes --incompatible_disable_deprecated_attr_params=false --incompatible_depset_is_not_iterable=false --incompatible_depset_union=false --incompatible_new_actions_api=false
  • Loading branch information
laurentlb authored and hlopko committed Nov 29, 2018
1 parent d4e9066 commit db81b42
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
20 changes: 10 additions & 10 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ local_repository(
path = "docs",
)

http_archive(
name = "bazel_skylib",
sha256 = "eb5c57e4c12e68c0c20bc774bfbc60a568e800d025557bc4ea022c6479acc867",
strip_prefix = "bazel-skylib-0.6.0",
url = "https://github.com/bazelbuild/bazel-skylib/archive/0.6.0.tar.gz",
)

# TODO: Move this to examples/WORKSPACE when recursive repositories are enabled.
load("//rust:repositories.bzl", "rust_repositories")

Expand All @@ -36,9 +43,9 @@ rust_proto_repositories()
# Used for documenting Rust rules.
http_archive(
name = "io_bazel_rules_sass",
sha256 = "76ae498b9a96fa029f026f8358ed44b93c934dde4691a798cb3a4137c307b7dc",
strip_prefix = "rules_sass-1.15.1",
url = "https://github.com/bazelbuild/rules_sass/archive/1.15.1.zip",
sha256 = "894d7928df8da85e263d743c8434d4c10ab0a3f0708fed0d53394e688e3faf70",
strip_prefix = "rules_sass-8ccf4f1c351928b55d5dddf3672e3667f6978d60",
url = "https://github.com/bazelbuild/rules_sass/archive/8ccf4f1c351928b55d5dddf3672e3667f6978d60.zip",
)

load("@io_bazel_rules_sass//:package.bzl", "rules_sass_dependencies")
Expand Down Expand Up @@ -69,13 +76,6 @@ http_archive(
],
)

http_archive(
name = "bazel_skylib",
sha256 = "b5f6abe419da897b7901f90cbab08af958b97a8f3575b0d3dd062ac7ce78541f",
strip_prefix = "bazel-skylib-0.5.0",
url = "https://github.com/bazelbuild/bazel-skylib/archive/0.5.0.tar.gz",
)

load(":workspace.bzl", "bazel_version")

bazel_version(name = "bazel_version")
12 changes: 7 additions & 5 deletions rust/private/rustc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def collect_deps(deps, toolchain):
"""

# TODO: Fix depset union (https://docs.bazel.build/versions/master/skylark/depsets.html)
direct_crates = depset()
direct_crates = []
transitive_crates = depset()
transitive_dylibs = depset(order = "topological") # dylib link flag ordering matters.
transitive_staticlibs = depset()
Expand All @@ -116,13 +116,15 @@ def collect_deps(deps, toolchain):
fail("rust targets can only depend on rust_library, rust_*_library or cc_library targets." + str(dep), "deps")

crate_list = transitive_crates.to_list()
transitive_libs = depset([c.output for c in crate_list]) + transitive_staticlibs + transitive_dylibs
transitive_libs = depset(
[c.output for c in crate_list],
transitive = [transitive_staticlibs, transitive_dylibs],
)

# TODO: Avoid depset flattening.
indirect_crates = depset([crate for crate in crate_list if crate not in direct_crates.to_list()])
indirect_crates = depset([crate for crate in crate_list if crate not in direct_crates])

return DepInfo(
direct_crates = direct_crates,
direct_crates = depset(direct_crates),
indirect_crates = indirect_crates,
transitive_crates = transitive_crates,
transitive_dylibs = transitive_dylibs,
Expand Down
2 changes: 1 addition & 1 deletion rust/repositories.bzl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load(":known_shas.bzl", "FILE_KEY_TO_SHA")
load(":platform/triple_mappings.bzl", "system_to_binary_ext", "system_to_dylib_ext", "system_to_staticlib_ext", "triple_to_constraint_set", "triple_to_system")
load("//rust/platform:triple_mappings.bzl", "system_to_binary_ext", "system_to_dylib_ext", "system_to_staticlib_ext", "triple_to_constraint_set", "triple_to_system")

DEFAULT_TOOLCHAIN_NAME_PREFIX = "toolchain_for"

Expand Down

0 comments on commit db81b42

Please sign in to comment.