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

multiple problems: Remove non-ASCII characters to fix #441 #529

Merged
merged 3 commits into from
Jan 31, 2017

Conversation

robkeim
Copy link
Contributor

@robkeim robkeim commented Jan 30, 2017

#441

Originally tracked as #527

FYI @Insti @petertseng

{
"description": "all non-word characters are separators",
"input": [
"1\u00002\u00133\n4\r5 6\t7"
Copy link
Member

@petertseng petertseng Jan 31, 2017

Choose a reason for hiding this comment

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

I mean, I'm not against removing this case, but if removing it in this commit then the commit message is no longer accurate - every character in this string is ASCII.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch @petertseng, I saw the unicode escape character and didn't double check if these were in the ASCII range.

I see a couple of choices here:

  • Rename the PR/commit message (doesn't align with the original intent of the issue I was trying to fix)
  • Revert this part of the change
  • Revert this part of the change and replace the unicode representation of the characters with their hex equivalent

I'm in favor of option 3, what do you think?

Also I had a look at the description.md and I'll need to update it too:

You should use the following rules for the syntax: a number is a sequence of one or more (unicode) digits

I can update the PR tonight. What's the policy on making updates to commits? Do I keep the existing history and add a "integrating feedback" commit, or do I re-write the history so that the history looks "clean".

Copy link
Member

Choose a reason for hiding this comment

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

replace the unicode representation of the characters with their hex equivalent

Is that possible? I don't think \x is allowed according to http://www.json.org/, though if you have information to the contrary, it would be good to have it. I suggest to take option 3 if possible, else take option 2.

Also I had a look at the description.md and I'll need to update it too:

Ah, true. Amusing that unicode digits is mentioned, since I didn't see any non-ascii digits being used in any language's test suite...

add a "integrating feedback" commit

I highly dislike those since the break the rule of "one logical change per commit" and the commit message tells me nothing about what changed.

Since the changes being made are small, I do not object to history being rewritten.

If there are many changes being made and then a reviewer has requested a small piece of feedback, then it is helpful to address the feedback in a separate commit simply so the reviewer can understand what has changed since the last review. But I would almost always squash those before merging, since it is likely those address-feedback commits do not stand on their own but only make sense in the context of the commit they amend.

These are my preferences; I don't know if the project as a whole has chosen some standards yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @petertseng for the detailed response!

You were right about \x not being valid json so I went with the second option and reverted that change.

@robkeim
Copy link
Contributor Author

robkeim commented Jan 31, 2017

@petertseng the new version is updated and ready for you to take a look at.

Copy link
Member

@petertseng petertseng left a comment

Choose a reason for hiding this comment

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

fantastic.

@robkeim
Copy link
Contributor Author

robkeim commented Jan 31, 2017

Thanks @petertseng! I'm assuming to submit this I should rebase and merge this to keep a linear commit history, is that correct?

Edit: actually looking at the history it seems that creating merge commits are favored.

@petertseng
Copy link
Member

Hmm, from my observations, the Rebase and Merge button has the disadvantage that it's not possible to tell from the commit message what PR the commit is associated with - one has to go to the github web interface to know. For that reason I would prefer the merge commit.

@robkeim
Copy link
Contributor Author

robkeim commented Jan 31, 2017

Ok thanks @petertseng!

@robkeim robkeim merged commit d0cc7fe into exercism:master Jan 31, 2017
@robkeim robkeim deleted the ascii branch January 31, 2017 18:42
petertseng pushed a commit to exercism/rust that referenced this pull request Nov 6, 2019
Version 1.2.0 adds two tests: "decode with too many spaces" and "decode
with no spaces".

The test "test_encode_ignores_non_ascii" was removed in
exercism/problem-specifications#529, but no version change was included.

Relevant PRs:
 - 1.1.0 -> 1.2.0: exercism/problem-specifications#1277
 - no version: exercism/problem-specifications#529
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