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

Add missing spaces to pull explanation #4361

Merged

Conversation

JohanWinther
Copy link
Contributor

@JohanWinther JohanWinther commented Oct 28, 2023

Overview

Adds missing spaces to the explanation of all the pull commands.

Before:

@unison/base/main> ? pull

  pull (or pull.silent)
  The`pull`command merges a remote namespace into a local namespacewithout listing the merged entities

After:
image

Test coverage

No changes to tests needed.

@aryairani
Copy link
Contributor

aryairani commented Oct 29, 2023

Hey @JohanWinther, thanks for noticing this and putting together a PR!

Probably no changes to tests needed.

For this sort of thing, a screenshot or paste like what you have in the description is sufficient for testing.

Screenshot is better though — because I think if you doublecheck you will find that this PR doesn't produce exactly the output you have in the "After" section.

The bug you found is pretty subtle:
P.wrap is not supposed to require spaces, so it was odd that you needed them. In fact, it deletes spaces and adds its own, so it was odd that adding spaces would help! What's actually happening is that P.wrap is only being applied to the first argument, "The", and so it does in fact delete the space that you tried to insert there, but fails to set up the spaces through the rest of the message.

The correct fix is change P.wrap to P.wrap $, or else put all of the text in parens. And then remove the extra spaces like it was originally. Do you wanna do this?

@JohanWinther
Copy link
Contributor Author

Hey @JohanWinther, thanks for noticing this and putting together a PR!

Probably no changes to tests needed.

For this sort of thing, a screenshot or paste like what you have in the description is sufficient for testing.

Screenshot is better though — because I think if you doublecheck you will find that this PR doesn't produce exactly the output you have in the "After" section.

Yes, screenshot is better because I didn't actually paste in what the new version would output, I added what should be the result. I was too lazy to actually pull down the repo and figure out how to compile it and test it out, since I thought the change was trivial. Thanks for being diligent :)

The bug you found is pretty subtle: P.wrap is not supposed to require spaces, so it was odd that you needed them. In fact, it deletes spaces and adds its own, so it was odd that adding spaces would help! What's actually happening is that P.wrap is only being applied to the first argument, "The", and so it does in fact delete the space that you tried to insert there, but fails to set up the spaces through the rest of the message.

I sort of understood that P.wrap should do this from the other uses of the function in the file, but couldn't really figure it out so I kind of ignored it.

The correct fix is change P.wrap to P.wrap $, or else put all of the text in parens. And then remove the extra spaces like it was originally. Do you wanna do this?

I will try to do these changes and actually compile and test locally. Thanks for the explanation 👍

@JohanWinther
Copy link
Contributor Author

@aryairani I've pushed the changes and updated the description to include a screenshot

@aryairani
Copy link
Contributor

Awesome!

@aryairani
Copy link
Contributor

aryairani commented Oct 31, 2023

Oh, @JohanWinther would you also add yourself to CONTRIBUTORS.markdown to acknowledge the license.

@JohanWinther
Copy link
Contributor Author

@aryairani Done! Sorry for the long wait, I missed the notification.

@aryairani
Copy link
Contributor

No worries, thanks!

@aryairani aryairani added the ready-to-merge Apply this to a PR and it will get merged automatically once CI passes and 1 reviewer has approved label Nov 7, 2023
@aryairani
Copy link
Contributor

Oh... I thought I had queued it to merge.

@aryairani aryairani merged commit e8314b0 into unisonweb:trunk Nov 8, 2023
@aryairani aryairani removed the ready-to-merge Apply this to a PR and it will get merged automatically once CI passes and 1 reviewer has approved label Nov 8, 2023
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