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

Always use lib.name for Wasm output file name #277

Merged
merged 4 commits into from
May 25, 2021

Conversation

cmichi
Copy link
Collaborator

@cmichi cmichi commented May 21, 2021

Closes #221.

@cmichi cmichi requested a review from ascjones May 21, 2021 20:04
original_wasm.set_extension("wasm");

// {target_dir}/{package_name}.wasm
let mut dest_wasm = target_directory.clone();
dest_wasm.push(package_name.clone());
dest_wasm.push(lib_name.clone());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that package_name will still be used for the contract bundle, which could be confusing when viewing the target dir if they are different.

We could just replace the package_name field CrateMetadata with something like contract_artifact_name, and populate with the lib name.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I updated the PR.

Copy link
Collaborator

@ascjones ascjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cmichi cmichi merged commit 89ce67c into master May 25, 2021
@cmichi cmichi deleted the cmichi-fix-build-error-on-lib-package-name-mismatch branch May 25, 2021 08:49
@cmichi cmichi mentioned this pull request May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compilation fails when lib.name and package.name are different
2 participants