-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 gdb scripts #13658
Fix gdb scripts #13658
Conversation
bin/nim-gdb.bash
Outdated
(echo "readlink not in PATH. Please install coreutils from homebrew."; exit 1)) || \ | ||
(echo "readlink not in PATH."; exit 1) | ||
|
||
nreadlink () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is needed because a variable can't be called in the below:
NIM_SYSROOT=$(dirname $(dirname $(nreadlink -e $(which nim))))
If nreadlink
is instead a variable, the command will fail to run.
I am not much a fan of the file name change. The file is in my path and therefore the name truly matters. And the only reason the change happend was because of a bug in VSCode, am I right? Can't you do it the other way around, keep the original name without ending, but you put an additional symbolic link with the name |
@krux02 Sure, that works too. Done. |
Once again the shell scripts are turned into edit wars. Lesson learned, no shell script will ever be accepted again. |
@Araq As a short recap. You merge a PR for a file where you know very well that I am responsible for without any review process and without giving me time or opportunity to comment on it. Then when problems bubble up you use the so called "edit wars" as pretext to ban shell scripts all together. Ok then, go for it. |
Without my merge the facts remain identical: Shell scripts never suit everybody and cause lots of maintainance overhead. |
Well then, the same can be said about nim source code. Do you want to ban nim code as well? |
The same cannot be said about Nim code as Nim code is much more portable than Shell code. But yeah, we also actually we try to have fewer lines of code written in Nim, see how @timotheecour and others must fight to get something into the stdlib or the compiler. |
@krux02 Am I missing something or everything in bin/nim-gdb and bin/nim-gdb.bat could be turned into
shell scripts are bad at code reuse, portability, etc |
First of all, it should be said, I am not a fan of
Yes you are missing something. |
@krux02 I think I've addressed your issues, except for the function call. Let me know if it works for you and if there are any other changes you want.