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

Fixed the absolute reference issue in bazel build #394

Merged
merged 2 commits into from
Sep 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ jobs:
run: |
@("C:\Program Files\Git\usr\bin") + (Get-Content $env:GITHUB_PATH) | Set-Content $env:GITHUB_PATH -Encoding utf8

# Temporarily Fix
- name: BUILD file configuration
run: |
sed -i -e 's/@com_google_cc_differential_privacy//g' ./third_party/differential-privacy/cc/algorithms/BUILD

- name: Cache Bazel Unix
# Not working on Windows: https://github.com/actions/cache/issues/576
if: runner.os != 'Windows'
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,6 @@ jobs:
run: |
@("C:\Program Files\Git\usr\bin") + (Get-Content $env:GITHUB_PATH) | Set-Content $env:GITHUB_PATH -Encoding utf8

# Temporarily Fix
- name: BUILD file configuration
run: |
sed -i -e 's/@com_google_cc_differential_privacy//g' ./third_party/differential-privacy/cc/algorithms/BUILD

- name: Cache Bazel Unix
# Not working on Windows: https://github.com/actions/cache/issues/576
if: runner.os != 'Windows'
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,6 @@ jobs:
run: |
@("C:\Program Files\Git\usr\bin") + (Get-Content $env:GITHUB_PATH) | Set-Content $env:GITHUB_PATH -Encoding utf8

# Temporarily Fix
- name: BUILD file configuration
run: |
sed -i -e 's/@com_google_cc_differential_privacy//g' ./third_party/differential-privacy/cc/algorithms/BUILD

- name: Cache Bazel Unix
# Not working on Windows: https://github.com/actions/cache/issues/576
if: runner.os != 'Windows'
Expand Down
18 changes: 10 additions & 8 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,22 @@ http_archive(

# Google DP library and it's dependencies
local_repository(
name = "google_dp",
path = "third_party/differential-privacy/cc",
name = "com_google_differential_privacy",
path = "third_party/differential-privacy",
)

load("@google_dp//:cc_differential_privacy_deps.bzl", "cc_differential_privacy_deps")
load("@com_google_differential_privacy//:differential_privacy_deps.bzl", "differential_privacy_deps")

differential_privacy_deps()

cc_differential_privacy_deps()

# Google DP library and it's dependencies
local_repository(
name = "com_google_differential_privacy",
path = "third_party/differential-privacy",
name = "com_google_cc_differential_privacy",
path = "third_party/differential-privacy/cc",
)

load("@com_google_differential_privacy//:differential_privacy_deps.bzl", "differential_privacy_deps")
load("@com_google_cc_differential_privacy//:cc_differential_privacy_deps.bzl", "cc_differential_privacy_deps")

cc_differential_privacy_deps()

differential_privacy_deps()
4 changes: 0 additions & 4 deletions prereqs_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ cd -
# renaming workspace.bazel to workspace
mv third_party/differential-privacy/cc/WORKSPACE.bazel third_party/differential-privacy/cc/WORKSPACE

# replacing `@com_google_cc_differential_privacy` in cc/alorithms BUILD file with empty string
# Note: this is a temporary fix
perl -pi -e 's/@com_google_cc_differential_privacy//g' third_party/differential-privacy/cc/algorithms/BUILD

# Removing the java part
rm -rf third_party/differential-privacy/java third_party/differential-privacy/examples/java

Expand Down
4 changes: 0 additions & 4 deletions prereqs_mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ cd -
# renaming workspace.bazel to workspace
mv third_party/differential-privacy/cc/WORKSPACE.bazel third_party/differential-privacy/cc/WORKSPACE

# replacing `@com_google_cc_differential_privacy` in cc/alorithms BUILD file with empty string
# Note: this is a temporary fix
perl -pi -e 's/@com_google_cc_differential_privacy//g' third_party/differential-privacy/cc/algorithms/BUILD

# Removing the java part
rm -rf third_party/differential-privacy/java third_party/differential-privacy/examples/java

Expand Down
30 changes: 15 additions & 15 deletions src/bindings/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ pybind_extension(

visibility = ["//src/python:__pkg__"],
deps = [
"@google_dp//base:percentile",
"@google_dp//base:logging",
"@google_dp//base:statusor_internals",
"@google_dp//base:status",
# "@google_dp//base:canonical_errors",
"@google_dp//base:statusor",
"@google_dp//algorithms:algorithm",
"@google_dp//algorithms:bounded-mean",
"@google_dp//algorithms:bounded-sum",
"@google_dp//algorithms:bounded-standard-deviation",
"@google_dp//algorithms:partition-selection",
"@google_dp//algorithms:numerical-mechanisms",
"@google_dp//algorithms:count",
"@google_dp//algorithms:order-statistics",
"@google_dp//proto:util-lib"
"@com_google_cc_differential_privacy//base:percentile",
"@com_google_cc_differential_privacy//base:logging",
"@com_google_cc_differential_privacy//base:statusor_internals",
"@com_google_cc_differential_privacy//base:status",
# "@com_google_cc_differential_privacy//base:canonical_errors",
"@com_google_cc_differential_privacy//base:statusor",
"@com_google_cc_differential_privacy//algorithms:algorithm",
"@com_google_cc_differential_privacy//algorithms:bounded-mean",
"@com_google_cc_differential_privacy//algorithms:bounded-sum",
"@com_google_cc_differential_privacy//algorithms:bounded-standard-deviation",
"@com_google_cc_differential_privacy//algorithms:partition-selection",
"@com_google_cc_differential_privacy//algorithms:numerical-mechanisms",
"@com_google_cc_differential_privacy//algorithms:count",
"@com_google_cc_differential_privacy//algorithms:order-statistics",
"@com_google_cc_differential_privacy//proto:util-lib"
],
)