Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
We do already have a line break there:
CKAN/GUI/Properties/Resources.resx
Lines 272 to 274 in 41a0143
Cause
It seems that
.resx
files are supposed to use CRLF line endings, but we have them as normalized to LF in the repo and OS-specific in the working dir (CRLF when checked out on Windows, LF on Linux and Mac), so it would be LF when we build in an Ubuntu container:CKAN/.gitattributes
Line 31 in 41a0143
Refresher for
.gitattributes
usage:text
means to treat the matching files as text format. LF will be stored to the server, LF will be used on Linux and Mac, CRLF will be used on Windows.text=auto
means to run git's built-in algorithm to check whether each matching file is in text format, then treat it astext
if soeol=lf
means to use LF everywhereeol=crlf
means to use CRLF at checkout on all platforms, and who cares what's on the server because you can't see itSo the resource DLLs are built with LF in them, which Windows sometimes doesn't like when those strings get passed to GUI controls. Especially helpfully, if you check out CKAN on Windows and build it there, git will give you
.resx
files with CRLF and therefore you will get functionally different resource DLLs and possibly not be able to reproduce the problem!Changes
Now our
.gitattributes
file specifieseol=crlf
for.resx
files. This should make git convert these files' line endings to CRLF at checkout on all platforms, so our resource files will contain CRLF as intended in .NET.As far as I can tell this does not break anything on Linux/Mono. I ran this:
... as every tutorial says you should do, and it converted all my local
.resx
files to CRLF. Nothing was staged, however, and I think that's because these files will still have LF on the server, so auto-normalizing the local files from CRLF to LF in the background results in no change to be committed.Fixes #2847.
Fixes #3470.