Skip to content
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

"keys $local:" crashes Elvish #1343

Closed
xiaq opened this issue Jun 22, 2021 · 6 comments
Closed

"keys $local:" crashes Elvish #1343

xiaq opened this issue Jun 22, 2021 · 6 comments
Labels

Comments

@xiaq
Copy link
Member

xiaq commented Jun 22, 2021

This is supposed to list the names of local variables, but it crashes Elvish instead. Something wrong with variable resolution code.

@xiaq xiaq added the bug label Jun 22, 2021
@krader1961
Copy link
Contributor

This seems like a duplicate of issue #668.

@xiaq
Copy link
Member Author

xiaq commented Jun 26, 2021

This seems like a duplicate of issue #668.

Well, crashing is a more severe issue than not supporting introspection. I went back and forth but decided to keep them separate since fixing the crash is higher priority.

@krader1961
Copy link
Contributor

Yes, crashing is a more severe issue but it seems to me that actually supporting introspection of the local namespace, and documenting same, is likely to fix the crash. It's not clear what it would mean to fix this crash but not support introspection of $local:. 😄

@krader1961
Copy link
Contributor

It's not clear what it would mean to fix this crash but not support introspection of $local:.

Obviously you could explicitly disallow introspection of the local namespace ; making it unique in its behavior when compared to the other namespaces. Perhaps by raising a specific exception when something like keys $local: is executed (or simply outputting no values). That would fix this issue but would seem to be against the spirit of this issue and #668.

@xiaq
Copy link
Member Author

xiaq commented Jun 27, 2021

It's not clear what it would mean to fix this crash but not support introspection of $local:.

Obviously you could explicitly disallow introspection of the local namespace ; making it unique in its behavior when compared to the other namespaces. Perhaps by raising a specific exception when something like keys $local: is executed (or simply outputting no values).

Seems you answered your own question :)

That would fix this issue but would seem to be against the spirit of this issue and #668.

Well, the spirit of this issue is that crashing when using a feature is worse than not supporting a feature.

@krader1961
Copy link
Contributor

@xiaq, Isn't this now a non-issue that should be closed since commit 6822e2c deprecated support for the local namespace?

@xiaq xiaq closed this as completed Feb 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants