Skip to content
This repository has been archived by the owner on May 9, 2022. It is now read-only.

Commit

Permalink
deps(rtc_tenclave,rtc_data_enclave): use exact specifiers for once_ce…
Browse files Browse the repository at this point in the history
…ll-sgx and serde-json-sgx

Link to the relevant HACKING.md section.
  • Loading branch information
PiDelport committed Jun 21, 2021
1 parent 4a1fcad commit a17e368
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 37 deletions.
4 changes: 2 additions & 2 deletions rtc_auth_enclave/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions rtc_data_enclave/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions rtc_data_enclave/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ rtc_types = { path = "../rtc_types", features = ["teaclave_sgx"] }
rtc_tenclave = { path = "../rtc_tenclave" }

[dependencies]
# XXX: See comment about serde-sgx dependency versioning in rtc_tenclave/Cargo.toml
serde_derive = { git = "https://github.com/mesalock-linux/serde-sgx" }
# See "Cargo patch limitation workaround" in HACKING.md:
serde = { git = "https://github.com/mesalock-linux/serde-sgx", features = ["derive"]}
bincode = { git = "https://github.com/mesalock-linux/bincode-sgx.git" }
serde-big-array = { git = "https://github.com/mesalock-linux/serde-big-array-sgx" }
serde_derive = { git = "https://github.com/mesalock-linux/serde-sgx" }

bincode = { git = "https://github.com/mesalock-linux/bincode-sgx.git" }
simple_asn1 = { git = "https://github.com/mesalock-linux/simple_asn1-sgx.git" }
thiserror = { git = "https://github.com/mesalock-linux/thiserror-sgx.git", tag = "sgx_1.1.3" }
uuid = { git = "https://github.com/mesalock-linux/uuid-sgx", features = ["v4"] }
Expand Down
4 changes: 2 additions & 2 deletions rtc_exec_enclave/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions rtc_tenclave/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 3 additions & 26 deletions rtc_tenclave/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,34 +24,11 @@ rand = { git = "https://github.com/mesalock-linux/rand-sgx", tag = "v0.7.3_sgx1.
thiserror = { git = "https://github.com/mesalock-linux/thiserror-sgx.git", tag = "sgx_1.1.3", optional = true }
sgx_tcrypto = { git = "https://github.com/apache/incubator-teaclave-sgx-sdk.git", rev = "b9d1bda", optional = true }
sgx_tdh = { git = "https://github.com/apache/incubator-teaclave-sgx-sdk.git", rev = "b9d1bda", features = ["use_lav2"], optional = true }
once_cell = { git = "https://github.com/mesalock-linux/once_cell-sgx.git", tag = "sgx_1.1.3", optional = true }

# XXX: Work around serde-json-sgx / Cargo version handling issue
#
# We want to specify tag = "sgx_1.1.3" for the serde dependency here,
# but this makes Cargo resolve the dependency to a different crate
# version identity than what serde-json-sgx's dependency resolves to,
# even though both "master" and "sgx_1.1.3" point to same git revision.
#
# This causes build failures due to serde_json referring to a different
# versions of the Serialize / Deserialize traits than this project's code.
#
# We cannot use [patch] to override serde-json-sgx's dependency to use
# the same tag for serde-sgx as here, because of this Cargo limitation:
#
# * "Cannot patch underspecified git dependency"
# https://github.com/rust-lang/cargo/issues/7670
#
# Comment: https://github.com/rust-lang/cargo/issues/7670#issuecomment-841722488
#
# To work around this problem, the git reference here must match
# the upstream dependency line exactly:
#
# * https://github.com/mesalock-linux/serde-json-sgx/blob/sgx_1.1.3/Cargo.toml#L17
#
# See "Cargo patch limitation workaround" in HACKING.md:
once_cell = { git = "https://github.com/mesalock-linux/once_cell-sgx.git", optional = true }
serde = { git = "https://github.com/mesalock-linux/serde-sgx", optional = true }

serde_json = { git = "https://github.com/mesalock-linux/serde-json-sgx", tag = "sgx_1.1.3", optional = true }
serde_json = { git = "https://github.com/mesalock-linux/serde-json-sgx", optional = true }

rtc_types = { path = "../rtc_types" }
sgx_types = { git = "https://github.com/apache/incubator-teaclave-sgx-sdk.git", rev = "b9d1bda", features = ["extra_traits"] }
Expand Down

0 comments on commit a17e368

Please sign in to comment.