Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.

bump rust nightly #1555

Merged
merged 42 commits into from
Jul 15, 2019
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
38b0ee5
bump rust nightly
thedavidmeister Jun 27, 2019
9448383
WIP on new nightly
thedavidmeister Jun 27, 2019
d0b7a01
WIP on deps for nightly bump
thedavidmeister Jun 27, 2019
fda2d9e
WIP on compiling with new rust
thedavidmeister Jun 27, 2019
18312d2
Merge branch 'develop' of github.com:holochain/holochain-rust into 20…
thedavidmeister Jul 10, 2019
1ef2274
bumping versions of holochain dependencies
thedavidmeister Jul 10, 2019
e3c52fe
use hn-rust-fmt-check in ci
thedavidmeister Jul 10, 2019
e4d99ab
pin deps properly
thedavidmeister Jul 10, 2019
5b72bfe
pin deps properly in scaffolding templates
thedavidmeister Jul 10, 2019
5fec7e8
compiler lints for 0.0.5 lib3h
thedavidmeister Jul 11, 2019
1200e20
lint
thedavidmeister Jul 11, 2019
6b32bcc
lint
thedavidmeister Jul 11, 2019
5578041
Merge branch 'develop' into 2019-06-27-rust-bump
thedavidmeister Jul 13, 2019
3e0a666
wip on rust version compatibility for net
thedavidmeister Jul 13, 2019
45f9798
fixing compiler issues in rust bump
thedavidmeister Jul 13, 2019
c19c1aa
WIP on futures
thedavidmeister Jul 13, 2019
cb3e3f3
clear up more compiler things
thedavidmeister Jul 13, 2019
e60e0d3
WIP on nightly compat
thedavidmeister Jul 13, 2019
d453674
remove fmt for debug
thedavidmeister Jul 13, 2019
6b988ca
WIP on rust versioning
thedavidmeister Jul 14, 2019
0885087
fix develop sha for holonix
thedavidmeister Jul 14, 2019
db3fcd5
WIP on rust nightly support
thedavidmeister Jul 14, 2019
d75349b
move wasm conductor nix scripts into core
thedavidmeister Jul 14, 2019
2958170
fix holonix sha
thedavidmeister Jul 14, 2019
f55184c
don't try to fmt core
thedavidmeister Jul 14, 2019
9a6d708
use hc-test-fmt on circle
thedavidmeister Jul 14, 2019
9ed0630
WIP on getting app spec running with new rust
thedavidmeister Jul 14, 2019
45939df
support proc macro in latest nightly
thedavidmeister Jul 14, 2019
b4651b2
bump nightly for do-ci-test.bat
thedavidmeister Jul 14, 2019
f4e65f0
fix bash comment in do-ci-test.bat
thedavidmeister Jul 14, 2019
8a2d01f
try to fix permissions on av
thedavidmeister Jul 14, 2019
aac74bf
test newer rust version on av
thedavidmeister Jul 14, 2019
7f7f5b7
try nightly 2019-07-14
thedavidmeister Jul 14, 2019
4f9b34b
don't run app spec proc tests
thedavidmeister Jul 14, 2019
868bee3
re-add wasm32-unknown-unknown to rustup on windows
thedavidmeister Jul 14, 2019
8be03e4
Rolled back await macro changes
philipbeadle Jul 15, 2019
9b853da
Minor formats
philipbeadle Jul 15, 2019
fa54e61
lint docs
thedavidmeister Jul 15, 2019
3979e72
Merge branch '2019-06-27-rust-bump' of github.com:holochain/holochain…
thedavidmeister Jul 15, 2019
9e72626
latest versions of upstream crates
thedavidmeister Jul 15, 2019
0243c43
fix json crate versions
thedavidmeister Jul 15, 2019
0cdbb6a
attempt to fix changes from upstream in lib3h
thedavidmeister Jul 15, 2019
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
8 changes: 5 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- image: holochain/holochain-rust:latest
steps:
- checkout
- run: nix-shell --run hc-rust-fmt-check
- run: nix-shell --run hc-test-fmt
# don't allow unpinned deps
- run:
name: no unpinnned deps
Expand Down Expand Up @@ -173,7 +173,9 @@ workflows:
- build
- fmt
- app-spec-tests
- app-spec-proc-tests
# @todo reimplement proc tests properly
# i.e. don't copy and paste app spec and expec it to work with stale state
# - app-spec-proc-tests
- cluster-tests
- cli-tests
- wasm-conductor-tests
Expand Down Expand Up @@ -214,4 +216,4 @@ workflows:
filters:
branches:
only:
- develop
- develop
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ members = [
"core_api_c_binding",
"core",
"dna_c_binding",
"hdk-rust",
"dpki",
"hdk-proc-macros",
"hdk-rust",
"net",
"dpki",
"test_bin",
"benchmarks"
]
Expand Down
5 changes: 5 additions & 0 deletions app_spec/build_and_test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
mkdir -p dist

echo "===================================================================================="
echo "RUNNING cargo test for zomes"
echo "Using conductor binary: `which holochain`"
Expand All @@ -9,16 +10,20 @@ echo "--------------------------------------------------------------------------

cargo test --manifest-path zomes/blog/code/Cargo.toml
cargo test --manifest-path zomes/summer/code/Cargo.toml

echo "===================================================================================="
echo "BUILDING genome with 'hc package --output dist/app_spec.dna.json --strip-meta':"
echo "------------------------------------------------------------------------------------"

rm -rf dist
mkdir dist
hc package --output dist/app_spec.dna.json --strip-meta

echo "DONE."
echo "===================================================================================="
echo "Running test.js in node"
echo "------------------------------------------------------------------------------------"

cd test
# --no-bin-links is required for windows vagrant support
# more precisely symlinks are not supported without additional work on the host
Expand Down
6 changes: 6 additions & 0 deletions app_spec/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{ pkgs }:
{
buildInputs = []
++ (pkgs.callPackage ./test { }).buildInputs
;
}
14 changes: 14 additions & 0 deletions app_spec/test/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{ pkgs }:
let
name = "hc-app-spec-test";

script = pkgs.writeShellScriptBin name ''
set -euo pipefail
hc-cli-install
hc-conductor-rust-install
(cd app_spec && ./build_and_test.sh);
'';
in
{
buildInputs = [ script ];
}
2 changes: 1 addition & 1 deletion app_spec/zomes/blog/code/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ authors = ["Holochain Core Dev Team <devcore@holochain.org>"]
serde = "=1.0.89"
serde_json = { version = "=1.0.39", features = ["preserve_order"] }
hdk = { path = "../../../../hdk-rust" }
holochain_json_derive = "=0.0.1-alpha2"
holochain_json_derive = "=0.0.14"
serde_derive = "=1.0.89"
boolinator = "=2.4.0"
[lib]
Expand Down
1 change: 0 additions & 1 deletion app_spec/zomes/blog/code/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(try_from)]
#![warn(unused_extern_crates)]
#[macro_use]
extern crate hdk;
Expand Down
2 changes: 0 additions & 2 deletions app_spec/zomes/converse/code/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(try_from)]

#[macro_use]
extern crate hdk;
#[macro_use]
Expand Down
2 changes: 1 addition & 1 deletion app_spec/zomes/simple/code/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ serde = "=1.0.89"
serde_json = { version = "=1.0.39", features = ["preserve_order"] }
serde_derive = "=1.0.89"
hdk = { path = "../../../../hdk-rust" }
holochain_json_derive = "=0.0.1-alpha2"
holochain_json_derive = "=0.0.14"

[lib]
path = "src/lib.rs"
Expand Down
2 changes: 0 additions & 2 deletions app_spec/zomes/simple/code/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(try_from)]
#![warn(unused_extern_crates)]
#[macro_use]
extern crate hdk;
Expand Down Expand Up @@ -171,4 +170,3 @@ define_zome! {
hc_public [create_link, delete_link, get_my_links, test_emit_signal, encrypt, decrypt]
}
}

1 change: 0 additions & 1 deletion app_spec/zomes/summer/code/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(try_from)]
#[macro_use]
extern crate hdk;
extern crate serde;
Expand Down
15 changes: 12 additions & 3 deletions app_spec_proc_macro/build_and_test.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
#! /bin/bash
#!/usr/bin/env bash
set -euo pipefail
mkdir -p dist

echo "===================================================================================="
echo "RUNNING cargo test for zomes"
echo "Using conductor binary: `which holochain`"
echo "Using cli binary: `which hc`"
echo "------------------------------------------------------------------------------------"

cargo test --manifest-path zomes/blog/code/Cargo.toml
cargo test --manifest-path zomes/summer/code/Cargo.toml

echo "===================================================================================="
echo "BUILDING genome with 'hc package --output dist/app_spec.dna.json --strip-meta':"
echo "------------------------------------------------------------------------------------"
rm -f dist/app_spec.dna.json

rm -rf dist
mkdir dist
hc package --output dist/app_spec.dna.json --strip-meta

echo "DONE."
echo "===================================================================================="
echo "Copying test from app_spec and running test.js in node"
echo "Running test.js in node"
echo "------------------------------------------------------------------------------------"

rm -rf ./test
cp -rf ../app_spec/test ./test
cd test
Expand Down
15 changes: 15 additions & 0 deletions app_spec_proc_macro/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{ pkgs }:
let
name = "hc-app-spec-test-proc";

# the test subdirectory gets blown away every run
# thats why this is here
script = pkgs.writeShellScriptBin name ''
hc-cli-install \
&& hc-conductor-rust-install \
&& (cd app_spec_proc_macro && ./build_and_test.sh);
'';
in
{
buildInputs = [ script ];
}
2 changes: 1 addition & 1 deletion app_spec_proc_macro/zomes/blog/code/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ serde_json = { version = "=1.0.39", features = ["preserve_order"] }
hdk = { path = "../../../../hdk-rust" }
hdk-proc-macros = { path = "../../../../hdk-proc-macros" }

holochain_json_derive = "=0.0.1-alpha2"
holochain_json_derive = "=0.0.14"
serde_derive = "=1.0.89"
boolinator = "=2.4.0"

Expand Down
1 change: 0 additions & 1 deletion app_spec_proc_macro/zomes/blog/code/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(try_from)]
#![warn(unused_extern_crates)]
#![feature(proc_macro_hygiene)]

Expand Down
1 change: 0 additions & 1 deletion app_spec_proc_macro/zomes/converse/code/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(try_from)]
#![feature(proc_macro_hygiene)]

extern crate hdk_proc_macros;
Expand Down
2 changes: 1 addition & 1 deletion app_spec_proc_macro/zomes/simple/code/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ serde_json = { version = "=1.0.39", features = ["preserve_order"] }
serde_derive = "=1.0.89"
hdk = { path = "../../../../hdk-rust" }
hdk-proc-macros = { path = "../../../../hdk-proc-macros" }
holochain_json_derive = "=0.0.1-alpha2"
holochain_json_derive = "=0.0.14"

[lib]
path = "src/lib.rs"
Expand Down
2 changes: 0 additions & 2 deletions app_spec_proc_macro/zomes/simple/code/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(try_from)]
#![warn(unused_extern_crates)]
#![feature(proc_macro_hygiene)]

Expand Down Expand Up @@ -147,4 +146,3 @@ pub mod simple {
}

}

1 change: 0 additions & 1 deletion app_spec_proc_macro/zomes/summer/code/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(try_from)]
#![feature(proc_macro_hygiene)]

extern crate serde;
Expand Down
10 changes: 5 additions & 5 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ holochain_core = { path = "../core" }
holochain_common = { path = "../common" }
holochain_conductor_api = { path = "../conductor_api" }
holochain_dpki = { path = "../dpki" }
holochain_json_api = "=0.0.1-alpha2"
holochain_persistence_api = "=0.0.1-alpha4"
holochain_persistence_file = "=0.0.1-alpha4"
lib3h_sodium = "=0.0.3-alpha1"
holochain_json_api = "=0.0.14"
holochain_persistence_api = "=0.0.5"
holochain_persistence_file = "=0.0.5"
lib3h_sodium = "=0.0.5"
holochain_wasm_utils = { path = "../wasm_utils" }
structopt = "=0.2.15"
failure = "=0.1.5"
Expand All @@ -25,7 +25,7 @@ base64 = "=0.10.1"
colored = "=1.7.0"
ignore = "=0.4.6"
rpassword = "=2.1.0"
rustyline = "=3.0.0"
rustyline = "=5.0.0"

[dev-dependencies]
tempfile = "=3.0.7"
Expand Down
8 changes: 8 additions & 0 deletions cli/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{ pkgs }:
{
buildInputs = []
++ (pkgs.callPackage ./install { }).buildInputs
++ (pkgs.callPackage ./test { }).buildInputs
++ (pkgs.callPackage ./uninstall { }).buildInputs
;
}
12 changes: 12 additions & 0 deletions cli/install/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{ pkgs }:
let
name = "hc-cli-install";

script = pkgs.writeShellScriptBin name
''
cargo build -p hc --release && cargo install -f --path cli
'';
in
{
buildInputs = [ script ];
}
5 changes: 2 additions & 3 deletions cli/src/cli/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,16 +268,15 @@ fn unpack_recurse(mut obj: Object, to: &PathBuf) -> DefaultResult<()> {
let base64_content = entry.as_str().unwrap().to_string();
let content = base64::decode(&base64_content)?;

let mut file_path = to.join(meta_entry);
let file_path = to.join(meta_entry);

File::create(file_path)?.write_all(&content[..])?;
}
META_BIN_ID if entry.is_object() => {
let base64_content = entry[&meta_entry].to_string();
let content = base64::decode(&base64_content)?;

let mut file_path =
to.join(meta_entry).with_extension(WASM_FILE_EXTENSION);
let file_path = to.join(meta_entry).with_extension(WASM_FILE_EXTENSION);

File::create(file_path)?.write_all(&content[..])?;
}
Expand Down
2 changes: 1 addition & 1 deletion cli/src/cli/scaffold/rust-proc-macro/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(try_from, proc_macro_hygiene)]
#![feature(proc_macro_hygiene)]
#[macro_use]
extern crate hdk;
extern crate hdk_proc_macros;
Expand Down
2 changes: 1 addition & 1 deletion cli/src/cli/scaffold/rust/Cargo.template.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ serde_json = { version = "=1.0.39", features = ["preserve_order"] }
serde_derive = "=1.0.89"
hdk = { git = "https://github.com/holochain/holochain-rust", <<VERSION>> }
holochain_wasm_utils = { git = "https://github.com/holochain/holochain-rust", <<VERSION>> }
holochain_json_derive = "=0.0.1-alpha2"
holochain_json_derive = "=0.0.14"

[lib]
path = "src/lib.rs"
Expand Down
1 change: 0 additions & 1 deletion cli/src/cli/scaffold/rust/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(try_from)]
#[macro_use]
extern crate hdk;
extern crate serde;
Expand Down
1 change: 0 additions & 1 deletion cli/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![warn(unused_extern_crates)]
#![feature(try_from)]
extern crate holochain_common;
extern crate holochain_conductor_api;
extern crate holochain_core;
Expand Down
13 changes: 13 additions & 0 deletions cli/test/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{ pkgs }:
let

name = "hc-cli-test";

script = pkgs.writeShellScriptBin name
''
(cd cli && cargo test);
'';
in
{
buildInputs = [ script ];
}
13 changes: 13 additions & 0 deletions cli/uninstall/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{ pkgs }:
let
name = "hc-cli-uninstall";

script = pkgs.writeShellScriptBin name
''
echo "dropping hc binary from cargo home directory"
rm -f $CARGO_HOME/bin/hc
'';
in
{
buildInputs = [ script ];
}
2 changes: 1 addition & 1 deletion conductor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["Holochain Core Dev Team <devcore@holochain.org>"]
[dependencies]
holochain_core_types = { path = "../core_types" }
holochain_conductor_api = { path = "../conductor_api" }
lib3h_sodium = "=0.0.3-alpha1"
lib3h_sodium = "=0.0.5"
holochain_common = { path = "../common" }
structopt = "=0.2.15"
tiny_http = "=0.6.2"
Expand Down
3 changes: 1 addition & 2 deletions conductor/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(try_from)]
#![warn(unused_extern_crates)]
/// Holochain Conductor executable
///
Expand Down Expand Up @@ -49,7 +48,7 @@ fn main() {
Ok(()) => {
{
let mut conductor_guard = CONDUCTOR.lock().unwrap();
let mut conductor = conductor_guard.as_mut().expect("Conductor must be mounted");
let conductor = conductor_guard.as_mut().expect("Conductor must be mounted");
println!(
"Successfully loaded {} instance configurations",
conductor.instances().len()
Expand Down
16 changes: 8 additions & 8 deletions conductor_api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ authors = ["Holochain Core Dev Team <devcore@holochain.org>"]
[dependencies]
holochain_core = { path = "../core" }
holochain_core_types = { path = "../core_types" }
holochain_json_derive = "=0.0.1-alpha2"
holochain_json_api = "=0.0.1-alpha2"
holochain_persistence_api = "=0.0.1-alpha4"
holochain_persistence_mem = "=0.0.1-alpha4"
holochain_persistence_file = "=0.0.1-alpha4"
holochain_persistence_pickle = "=0.0.1-alpha6"
holochain_json_derive = "=0.0.14"
holochain_json_api = "=0.0.14"
holochain_persistence_api = "=0.0.5"
holochain_persistence_mem = "=0.0.5"
holochain_persistence_file = "=0.0.5"
holochain_persistence_pickle = "=0.0.5"
holochain_dpki = { path = "../dpki" }
holochain_net = { path = "../net" }
lib3h ="=0.0.3-alpha1"
lib3h_sodium = "=0.0.3-alpha1"
lib3h ="=0.0.5"
lib3h_sodium = "=0.0.5"
holochain_common = { path = "../common" }
chrono = "=0.4.6"
serde = "=1.0.89"
Expand Down
Loading