-
Notifications
You must be signed in to change notification settings - Fork 13
ENT-13116: Implement an option to write file overwrite diffs during a copy build step to a file, and warnings on identical file overwrites #284
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
Conversation
Signed-off-by: jakub-nt <175944085+jakub-nt@users.noreply.github.com>
Signed-off-by: jakub-nt <175944085+jakub-nt@users.noreply.github.com>
This is to free the `_perform_replace_step` name for the `if operation == replace` code.
The `_perform_build_step` mega-function has been getting long and is problematic in cases where individual build steps take unique arguments or return different things.
Only one value for them was valid.
…ld step to a file, and warnings on identical file overwrites Ticket: ENT-13116 Ticket: ENT-13117 Signed-off-by: jakub-nt <175944085+jakub-nt@users.noreply.github.com>
|
Thanks for submitting a pull request! Maybe @craigcomstock can review this? |
…edProcessError` exception in `cp_dry_itemize` not being handled Signed-off-by: jakub-nt <175944085+jakub-nt@users.noreply.github.com>
Signed-off-by: jakub-nt <175944085+jakub-nt@users.noreply.github.com>
|
|
||
| # mini-validation | ||
| for module in config.get("build", []): | ||
| for module in config["build"]: |
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.
So the key "build" is guaranteed to be there? Maybe you can add an assert to test this assumption?
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.
This is already being checked in the code right above this code.
| sh("rsync -r %s/ %s" % (src, dst)) | ||
|
|
||
|
|
||
| def cp_dry_itemize(src: str, dst: str) -> List[Tuple[str, str]]: |
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.
Doc string would be nice here. It's not obvious what it does.
cfbs/build.py
Outdated
| noop_overwrites_relpaths = [] | ||
| actual_overwrites_relpaths = [] | ||
| for item_string, file_relpath in itemization: | ||
| if item_string[1] != "f": |
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.
Would be nice with a comment explaining what is at the different indices
* Documented precisely what the functions do and return in the docstrings * Split out some appropriate code to a separate function * Renamed a variable to a more accurate name Signed-off-by: jakub-nt <175944085+jakub-nt@users.noreply.github.com>
No description provided.