-
Notifications
You must be signed in to change notification settings - Fork 2
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
[Spec] Specify a preferred line ending #43
Comments
id love to unify this. But it will be hard to match this up for everything |
I might be wrong, but I think all except usdb can handle both types of line endings. So ideally usdb would be changed to accept both as well, so users can have their native OS line endings and everything works fine and nobody has to worry about line endings. But of course it doesn’t hurt to specify a standard. If LF works for recent windows, then I guess that would be the candidate for the standard, but then all users would have to manually convert to CRLF before adding new songs to usdb. |
my 2 cents:
|
I think in terms of compatibility and convenience it would make sense to allow both line endings and maybe for the sake of robustness also a single Requiring a certain line separator (as in songs that use a different one would not be loaded into a game) would probably lead to a lot of confusion for less technical players. |
Hmm from a users perspective i get it that you'd want to have both line-endings. Most users though do download their files from a server (eg: usdb) and then it should just work out of the box. txt-hosters should do a conversion to the unified format upon upload so they spread it correctly and that's a pretty minor task As for line-seperators we do have the |
To me this is kind of a fundamental decision: If we intend for files to be edited by humans, in particular non-technical users, a specific requirement on the line ending would be very detrimental to the experience. Relying on txt-hosters to do a conversion feels like an invitation to disregard the spec and just do a conversion. I'd much prefer if txt-hosters could in good conscience reject non-compliant txt files. |
In some aspect the files can be edited by humans, however this is probably a niche audience. Users who go digging into the txt-file itself usually do that through tools like Yass, Creator and other applications. Not by opening notepad and do the changes there, as there's no feedback in if the change worked or not which the other tools do give I agree with the hosters part, but we don't want to bore creators with details to fix it themselves. They've got better things to do: creating songs ;) As a txt-hosting party it's a fairly easy task to do the conversion if necessairy if all is well it shouldn't have to convert, but if something is off he can rectify it. |
I don't think it's that rare for users to open a song txt with some editor, and be it just out of curiosity. Let's not speak about the things those programs can then do to an innocent txt! Even Git for Windows has a It's such an easy thing to parse all kinds of line endings without ambiguity. On the other hand, having to deal with line endings manually can be very frustrating. So I strongly vote for recommending LF, but not requiring it exclusively. |
To me it seems the options seem to be clear so far:
Are we ready to vote on this? |
SUMMARY / VOTE NOW 📈 ✋Thanks for the discussion and thanks for the summary @codello. We are close to a final result. Please vote for this issue till 29th feb 2024 with emoticon 🎉 / 🚀 / ❤️ . Options 🚀 A) |
Just wanted to point out that the last time |
Yeah that's true. I don't expect it to make any real difference in practice. The only reason I prefer C over B is that many programming languages recognize all three patterns by default (e.g. Java's There are of course also examples on the opposite side, e.g. Go's |
It seems to me there is a majority for option C. I have created a PR (#51) to add this result to the spec. |
Yes, Result is option C:
Thanks to everyone for contribution. I merged the Pull Request. ✅ |
Suggestion
Specify in the Ultrastar format specification whether files should use Unix (LF, \n) or Windows (CRLF, \r\n) line endings.
Use case
The Ultrastar format specification does not specify which line endings a file should use. There are currently tools in the Ultrastar ecosystem that accept or produce only one type of line endings, making them incompatible.
Examples:
Therefore songs created with Ultrastar Play song editor (at least on Linux) cannot be uploaded to USDB because of this.
Extra info/examples/attachments
No response
The text was updated successfully, but these errors were encountered: