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
Fix zcompile error with zsh 5.4 #443
Conversation
Error is: $ zcompile highlighters/main/test-data/function.zsh zsh: defining function based on alias `ls' zsh: parse error near `()' zcompile: can't read file: highlighters/main/test-data/function.zsh View `Incompatibilities since 5.3.1` in https://github.com/zsh-users/zsh/blob/bb218704d27bcca9aa4426296dcd5c13d58b330a/README
I'm aware of the upstream change, thanks, see 9523d6d. What I don't understand is why this is needed in the first place. z-sy-h does not alias zsh-syntax-highlighting/zsh-syntax-highlighting.zsh Lines 30 to 36 in 4cde79e
And separately, what's the use-case for zcompiling test-data files (!)? |
@danielshahaf, good points. Should we change the test to do only:
without the functions? There's also a comment at the end of the test I quite don't understand:
And it makes no sense to compile the test-data. I'm just compiling everything under |
The functions can remain defined because, nowadays, the test harness runs each test in a subshell; but that's a well-known property of the test harness so need not be mentioned explicitly. Inspired by discussion on issue #443.
No, we shouldn't. The whole point of the test is to test that a function that shadows a builtin (or a command) is highlighted as a function. I've fixed the comment in 5436d3e, thanks for pointing it out. Does this address everything? |
Isn't |
Aliases typically change the default behaviour (e.g., That's already the case when the test suite is launched by See also #444. |
To be clear here, I refer to scripts that run |
Sounds good. Closing this. Not compiling the files under |
for syntax-highlighting submodule. See discussion on zsh-users/zsh-syntax-highlighting#443 Fixes #205
You're welcome. Thanks for the report! |
The functions can remain defined because, nowadays, the test harness runs each test in a subshell; but that's a well-known property of the test harness so need not be mentioned explicitly. Inspired by discussion on issue zsh-users#443.
for syntax-highlighting submodule. See discussion on zsh-users/zsh-syntax-highlighting#443 Fixes #205
Error is:
View
Incompatibilities since 5.3.1
in https://github.com/zsh-users/zsh/blob/bb218704d27bcca9aa4426296dcd5c13d58b330a/README