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

The binding skeleton creation script does not work properly on windows #9813

Closed
Daniel-42 opened this issue Jan 13, 2021 · 5 comments
Closed
Labels
awaiting feedback Awaiting feedback from the pull request author bug An unexpected problem or unintended behavior of an add-on stale As soon as a PR is marked stale, it can be removed 6 months later.

Comments

@Daniel-42
Copy link
Contributor

Daniel-42 commented Jan 13, 2021

Using openHab eclipse installed according to the guide, maven, openJDK11 and fresh forks of the current main openhab-distro and openhab-addons I was not able to properly add a new binding skeleton using the above mentioned script.

The binding files are created, however the new project does not get added to the bundles/pom.xml file nor does the binding get added to the CODEOWNERS file.

When I then run the script again for a 2nd binding it will be added to the aforementioned files.

What seems to happen is:

  • .gitattributes file forces git on windows to convert line endings to CRLF
  • The script that modifies pom.xml does not handle CRLF properly. It does not add a new entry, however it will expand each CRLF into: LF<x times 4 spaces>LF resulting in a file which has a seemingly empty line (that does contain spaces) after every line from the original file
  • The script that modifies CODEOWNERS does not handle CRLF properly. It does not add a new entry, however it will change CRLF into LF
  • When adding the second skeleton the files no longer contain CRLF but just LF and both files will be updated properly.
@Daniel-42 Daniel-42 added the bug An unexpected problem or unintended behavior of an add-on label Jan 13, 2021
@Daniel-42
Copy link
Contributor Author

As a follow up, when I run mvn clean install in the root of the repository the spotless check fails on the \r\n line endings in the pom.xml

If I run apply... a lot of files in ALL add ons will be touch and have the \r\n line endings replaced by \n

@fwolter
Copy link
Member

fwolter commented Jan 23, 2021

I can confirm this. @wborn @J-N-K Could that result from the line ending change, necessary to fix the spotless issue?

@J-N-K
Copy link
Member

J-N-K commented Jan 23, 2021

This a known, yet unresolved issue. Can be fixed by locally adding core.eol=crlf. See #8712

@lsiepel
Copy link
Contributor

lsiepel commented Jan 8, 2023

As the line end related issue has been solved, can I assume the binding skeleton script works as intended and this issue can be closed?

I just did a quick check and I as unable to reproduce the OP issue, but my build system may not be as clean as needed.

@lsiepel lsiepel added the awaiting feedback Awaiting feedback from the pull request author label Jan 8, 2023
@stale
Copy link

stale bot commented Mar 9, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale As soon as a PR is marked stale, it can be removed 6 months later. label Mar 9, 2023
@stale stale bot closed this as completed Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting feedback Awaiting feedback from the pull request author bug An unexpected problem or unintended behavior of an add-on stale As soon as a PR is marked stale, it can be removed 6 months later.
Projects
None yet
Development

No branches or pull requests

4 participants