-
Notifications
You must be signed in to change notification settings - Fork 3k
Realtek: serial - line ending fix #6450
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
One line had a window line ending
To confirm, here is a view at line endings on current master
The line has CR. |
/morph build |
Fixes #6449 |
Build : SUCCESSBuild number : 1567 Triggering tests/morph test |
Test : SUCCESSBuild number : 1358 |
Exporter Build : SUCCESSBuild number : 1206 |
@OPpuolitaival Please review pr-head |
As told earlier.. the whitespace change broke the CI, and therefore CI cannot build even this one. |
Sounds like the CI is too easily broken in that case :( |
What? This is now broken on all our workspaces.. not just CI. If you have cloned mbed-os earlier and checkout master branch and then try to check out some other branch, you will see the same issue. Problem is that if you Git is (properly) configured to convert line endings, then you see this issue. If your Git is NOT configured, then all our files are randomly either Windows or Unix line endings. Depending on who touched that file previously. |
Shouldn't we just get this merged then? |
Based on the impact, I am happy to get this in (one line change, no code change, only line ending). the flow in our CI is correct (git checkout branches, I got now the same problem locally as was switching between branches ), we will need to review gitattributes or other options to stay away from this line endings breakages. |
If someone does manage to bypass/ignore .gitattributes and check in an unnormalised file, Git clients that do obey it get confused when they see the unnormalised file in the repo. Basically they immediately try to normalise it in the work area, which marks the file as locally changed, which blocks some commands. It's unfortunate that the normal CI sequence for the PR that breaks it doesn't see the problem, while the CI for subsequent PRs does. You could use astyle to do a line-ending check, but I think the CI should (also?) programmatically use Git to check for this specific normalisation problem. The return code of |
Description
One line had a window line ending in Realtek HAL Serial implementation.
To reproduce, do a change in a file, and this line gets shown (line change to unix line endings):
Pull request type
[X] Fix
[ ] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change