-
Notifications
You must be signed in to change notification settings - Fork 2
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
V5 (LTS): package whole project source code #52
Conversation
…w of secondary importance, exotic, less promoted.
@@ -1,7 +1,7 @@ | |||
FROM ubuntu:22.04 | |||
|
|||
# Constants | |||
ARG BUILDER_NAME="multiversx/sdk-rust-contract-builder:v5.4.1" | |||
ARG BUILDER_NAME="multiversx/sdk-rust-contract-builder:v5.5.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New minor version. No impact on WASM codehashes.
@@ -20,7 +20,7 @@ def main(cli_args: List[str]): | |||
parser.add_argument("--packaged-src", type=str, help="source code packaged in a JSON file") | |||
parser.add_argument("--contract", type=str) | |||
parser.add_argument("--output", type=str, default=Path(os.getcwd()) / "output") | |||
parser.add_argument("--package-whole-project-src", action="store_true", default=False, help="include all project files in *.source.json (default: %(default)s)") | |||
parser.add_argument("--package-whole-project-src", action="store_true", default=False, help="deprecated parameter, not used anymore") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's implicit. Will be removed at a later time.
) | ||
|
||
create_packaged_source_code( | ||
parent_project_folder=project_within_build_folder, | ||
package_whole_project_src=False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kept for exotic purposes. Won't be advertised in docs etc.
@@ -24,7 +24,7 @@ def main(cli_args: List[str]): | |||
|
|||
parser = ArgumentParser() | |||
parser.add_argument("--project", type=str, required=False, help="source code folder (project)") | |||
parser.add_argument("--package-whole-project-src", action="store_true", default=False, help="include all project files in *.source.json (default: %(default)s)") | |||
parser.add_argument("--package-whole-project-src", action="store_true", default=False, help="deprecated parameter, not used anymore") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's implicit (always true). Will be removed at a later time.
@@ -61,8 +61,6 @@ def get_source_code_files( | |||
def _is_source_code_file(path: Path) -> bool: | |||
if path.suffix == ".rs": | |||
return True | |||
if path.parent.name == "meta" and path.name == "Cargo.lock": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very important change. Some projects aren't Cargo workspaces, and this Cargo lock file should be included in the packaged source code.
meta/Cargo.lock
anymore - they are extremely important if the project is not a Cargo workspace.*.source.json
now contains the whole packaged source code.*.partial.source.json
contains only the source code of the contract to be built and the source code of its local dependencies - it should never be used (suffers from incompleteness) . Exists for exotic use-cases, if any.This will be promoted to v6, as well.
Also see: https://discord.com/channels/1045353153073258557/1194657415690473482