Skip to content

Commit

Permalink
add concrete address to manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
rahxephon89 committed Oct 2, 2024
1 parent 8afe4f9 commit f0c8c7c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion aptos-move/aptos-e2e-comparison-testing/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use aptos_types::{
use rocksdb::{DBWithThreadMode, SingleThreaded, DB};
use serde::{Deserialize, Serialize};
use std::{
collections::{HashMap, HashSet},
collections::{BTreeMap, HashMap, HashSet},
fmt,
fs::{File, OpenOptions},
io::{BufRead, BufReader, BufWriter, Read, Write},
Expand Down Expand Up @@ -504,6 +504,17 @@ fn dump_and_compile_from_package_metadata(
let manifest_str = unzip_metadata_str(&manifest_u8).unwrap();
let mut manifest =
parse_source_manifest(parse_move_manifest_string(manifest_str.clone()).unwrap()).unwrap();
let mut updated_addresses_map = BTreeMap::new();
if manifest.addresses.is_some() {
for x in manifest.addresses.clone().unwrap() {
if x.1.is_some() || x.0 == package_info.package_name.clone().into() {
updated_addresses_map.insert(x.0, x.1);
} else {
updated_addresses_map.insert(x.0, Some(package_info.address));
}
}
manifest.addresses = Some(updated_addresses_map);
}

let fix_manifest_dep = |dep: &mut Dependency, local_str: &str| {
dep.git_info = None;
Expand Down

0 comments on commit f0c8c7c

Please sign in to comment.