Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-mysten committed Dec 13, 2024
1 parent 3fb9a89 commit 883ed0a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
5 changes: 0 additions & 5 deletions crates/sui-move-build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ pub fn build_from_resolution_graph(
published_at: Result<ObjectID, PublishedAtError>,
mut dependency_ids: PackageDependencies,
) -> SuiResult<CompiledPackage> {
println!("Orig deps: {:?}", dependency_ids);
// collect bytecode dependencies as these are not returned as part of core
// `CompiledPackage`
let mut bytecode_deps = vec![];
Expand Down Expand Up @@ -305,10 +304,6 @@ pub fn build_from_resolution_graph(
// TODO(https://github.com/MystenLabs/sui/issues/69): Run Move linker
}

package
.all_modules()
.for_each(|x| println!("{:?} {:?}", x.unit.name, x.unit.address));

// Filter out packages that are in the manifest but not referenced in the source code.
let deps: BTreeSet<_> = package
.all_compiled_units()
Expand Down
2 changes: 1 addition & 1 deletion crates/sui/tests/cli_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1650,7 +1650,7 @@ async fn test_package_publish_nonexistent_dependency() -> Result<(), anyhow::Err

let err = result.unwrap_err().to_string();
assert!(
err.contains("On-chain version of dependency Nonexistent::nonexistent was not found"),
err.contains("Dependency object does not exist or was deleted")
"{}",
err
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "Nonexistent"
version = "0.0.1"
published-at = "0xa74adee43809be6a74adee43809be675425e638a79067e575425e638a79067e5"
published-at = "0xabc123"
edition = "2024.beta"

[addresses]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,5 @@
// SPDX-License-Identifier: Apache-2.0

module examples::main {
use nonexistent::nonexistent;

public entry fun main() {
nonexistent::test();
}
public entry fun main() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,17 @@ impl Package {
resolving_table.define((pkg_id, *name), Some(addr))?;
continue;
}
// There is no lock file, but perhaps there is a `published-at` in the manifest.
else if let Some(published_at) = self
.source_package
.package
.custom_properties
.get(&Symbol::from("published-at"))
{
let addr = AccountAddress::from_str(published_at)?;
resolving_table.define((pkg_id, *name), Some(addr))?;
continue;
}
}
resolving_table.define((pkg_id, *name), *addr)?;
}
Expand Down

0 comments on commit 883ed0a

Please sign in to comment.