Description
Describe the bug
Tabs are not supported in the indentation stripping parser. This is the right behavior in principle, but when a user does insert a tab, the behavior does not match their indentation. The right solution is to warn and let the user fix the problem. Supporting tabs is wrong, because tab width is undefined and will never be defined consistently.
Adding a warning may make '' ''
strings annoying for users who have to write strings with tabs at the start of lines, but their solution is already fragile, so they should move to explicit tabs ("\t"
) or put the string in a separate file.
Steps To Reproduce
- Write a file with a
''
string indented with tabs or a mix of spaces and tabs. - Parsed string contains tab characters.
Expected behavior
Warn when the first tab is encountered in the indentation stripping logic. Suggest alternatives, for both cases: user wants tabs stripped, or (less likely, current behavior) user wants to keep tabs in their string.
nix-env --version
output
Additional context
Removing tabs from indented strings is a hash-changing breaking change. (edit: 2024-10)
Priorities
Add 👍 to issues you find important.