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

Fix CI issue caused by new cli and outpack versions. #121

Merged
merged 2 commits into from
Jan 22, 2024

Conversation

plietar
Copy link
Member

@plietar plietar commented Jan 19, 2024

Recent versions of the cli package have added a new vec-sep2 style option for cli_vec, in an effort to improve their handling of Oxford commas. This means vec-last is now ignored for any list of length two, and the value of vec-sep2 is used instead.

We only used that feature in one place, with "or" as the value for vec-last. The new cli package broke a test by making that code print the default vec-sep2 value, i.e. "and", when there are only two elements.

After looking at the context of that message however, I think "and" actually makes more sense than "or". It is printing a list of paths that haven't been found. We would want all of the paths in the list to be present, not just one of them. The simplest fix is therefore to remove the call to cli_vec and let cli use the default settings.

Finally, remove a call to squote on the missing paths and use a .path tag in the message. The end result is the same.

Recent versions of the cli package have added a new `vec-sep2` style
option for `cli_vec`, in an effort to improve their handling of Oxford
commas. This means `vec-last` is now ignored for any list of length two,
and the value of `vec-sep2` is used instead.

We only used that feature in one place, with "or" as the value for
`vec-last`. The new cli package broke a test by making that code print
the default `vec-sep2` value, i.e. "and", when there are only two
elements.

After looking at the context of that message however, I think "and"
actually makes more sense than "or". It is printing a list of paths that
haven't been found. We would want all of the paths in the list to be
present, not just one of them. The simplest fix is therefore to remove
the call to `cli_vec` and let cli use the default settings.

Finally, remove a call to `squote` on the missing paths and use a
`.path` tag in the message. The end result is the same.
@plietar plietar requested a review from richfitz January 19, 2024 12:55
Copy link

codecov bot commented Jan 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1f1adc4) 100.00% compared to head (d70a1dc) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #121   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           40        40           
  Lines         3565      3564    -1     
=========================================
- Hits          3565      3564    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@plietar
Copy link
Member Author

plietar commented Jan 19, 2024

Ah so now the coverage has changed and fails my CI because outpack_server can't be found because I renamed the command when I did the CLI change. I don't know if we really want to be pulling outpack_server from the latest commit tbh, sounds a bit brittle.

@plietar plietar changed the title Fix CI issue caused by new cli package. Fix CI issue caused by new cli and outpack versions. Jan 19, 2024
@richfitz richfitz merged commit 6376b79 into mrc-ide:main Jan 22, 2024
10 checks passed
@plietar plietar deleted the who-gives-a-fuck-about-an-oxford-comma branch January 22, 2024 11:16
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