Skip to content

Conversation

nickshulman
Copy link
Contributor

Rename "bin" folder in "pwiz_tools\Skyline\Executables\DevTools\Utf16to8" to "binaries" so that it does not get deleted by clean-apps.bat

I could not find anything in the source tree that might care whether that folder was named "binaries" or "bin", but I might have missed something.

…to8" to "binaries" so that it does not get deleted by clean-apps.bat
@chambm
Copy link
Member

chambm commented Nov 19, 2024

If there's nothing in the source tree that uses these binaries (to avoid needing to build the project), why are they even checked in?

@nickshulman
Copy link
Contributor Author

If there's nothing in the source tree that uses these binaries (to avoid needing to build the project), why are they even checked in?

Good question.
It's probably so that people can run "Utf16to8.bat" on .sky.view files if they ever want to do so in the future.
.sky.view files used to be saved in UTF-16, but that was fixed a couple of weeks ago so going forward they will all be UTF-8.
Committing UTF-16 files to the project is problematic because they get treated as binary.
This only became a problem when checking in test files to ".data" folders so this tool was written to convert .sky.view files.

@ekoneil
Copy link
Collaborator

ekoneil commented Nov 19, 2024 via email

@chambm
Copy link
Member

chambm commented Nov 19, 2024

Huh I totally missed that issue. I would have thought there was a way to have git treat UTF-16 files as text.

Probably too late to mess with, but what about this in .gitattributes?
*.sky.view text diff working-tree-encoding=UTF-16LE eol=CRLF
From https://stackoverflow.com/a/54683489/638445

@chambm
Copy link
Member

chambm commented Nov 19, 2024

Anyway since it's intended to only be used by devs on demand, this fix looks entirely appropriate. Let's keep bin/obj directories out of the .NET project tree.

@nickshulman
Copy link
Contributor Author

Huh I totally missed that issue. I would have thought there was a way to have git treat UTF-16 files as text.

Probably too late to mess with, but what about this in .gitattributes? *.sky.view text diff working-tree-encoding=UTF-16LE eol=CRLF From https://stackoverflow.com/a/54683489/638445

Git was actually able to handle the UTF-16 files fine, but the diffs on the github website were no good.
I am not sure whether github pays attention to the .gitattributes file.

I had tried adding a line to .gitattributes saying that .sky.view files were text, but that resulted in the completely wrong bytes being in the UTF-16 files when you did a checkout.

We have always wanted .sky.view files to be UTF-8. It was a mistake that they were ever UTF-16 (the files were twice as big), so it is good that we have fixed that going forward.
Now that .sky.view files might be either UTF-8 or UTF-16, I imagine it would be tricky to find something we could put in .gitattributes that would work.

@nickshulman nickshulman merged commit 28a5856 into master Nov 20, 2024
12 checks passed
@nickshulman nickshulman deleted the Skyline/work/20241119_FixCleanAppsBat branch November 20, 2024 19:59
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.

3 participants