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

Improve handling of deleted implicit inputs. #171

Merged
merged 2 commits into from
Sep 2, 2024
Merged

Conversation

plietar
Copy link
Member

@plietar plietar commented Sep 2, 2024

In implicit mode, orderly prints a message if some of the implicit inputs have been modified by the report. However the code to enumerate modified files did not properly handle files that have been deleted. When that happens, fs::file_info return NA in all the metadata columns.

We now detect these files and display a slightly different warning for it.

Cleaned up a bit of adjacent code: switch from handcrafted bullet points to using cli::cli_ul, fixed some tests which had used suppressMessages when they could have used orderly_run_quietly.

@plietar plietar force-pushed the mrc-5735-delete-implicit branch 2 times, most recently from 3e5ffc2 to f03a909 Compare September 2, 2024 16:02
@plietar plietar requested a review from richfitz September 2, 2024 16:05
@plietar
Copy link
Member Author

plietar commented Sep 2, 2024

I'm kind of on the fence about whether this even deserves a warning at all. There's nothing really actionable the user can do other than not writing weird reports.

Copy link
Member

@richfitz richfitz left a comment

Choose a reason for hiding this comment

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

Thanks, and for getting this found and fixed so quickly.

I'm kind of on the fence about whether this even deserves a warning at all. There's nothing really actionable the user can do other than not writing weird reports.

The intention had been to expose something like outpack_packet_file_mark to mark files as ignored; we should expose some mechanism for doing this and hint at it in the warning. But I think do that in a subsequent PR

In implicit mode, orderly prints a message if some of the implicit
inputs have been modified by the report. However the code to enumerate
modified files did not properly handle files that have been deleted.
When that happens, `fs::file_info` return NA in all the metadata
columns.

We now detect these files and display a slightly different warning for
it.

Cleaned up a bit of adjacent code: switch from handcrafted bullet points
to using `cli::cli_ul`, fixed some tests which had used
`suppressMessages` when they could have used `orderly_run_quietly`.
@plietar plietar force-pushed the mrc-5735-delete-implicit branch from f03a909 to 1e1f24e Compare September 2, 2024 22:11
@plietar plietar merged commit 929df0a into main Sep 2, 2024
10 checks passed
@plietar plietar deleted the mrc-5735-delete-implicit branch September 2, 2024 22:26
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.

2 participants