-
-
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
Revert "Make 'echo' raise IOErrors when appropriate (#16367)" #18460
Conversation
This reverts commit 23d23ec.
This is not a good revert, and merging this PR within 2 hours of opening it leaves very little room for feedback (time zones differ). Also, when you revert a bugfix, please re-open the corresponding bug (#16366); I just did; and also add a notification on the PR that was reverted so this doesn't go un-noticed. We already provided a At the very least, a pushable After the revert, you're silently ignoring bugs again, which affects programs and makes error diagnostic harder. D: raises "Attempting to write to closed File"import std.stdio;
void main(string[]args){
writeln("ok1");
stdout.close();
writeln("ok2");
} python: raises ValueError: I/O operation on closed file.import sys
print("ok1")
sys.stdout.close()
print("ok2") ruby: raises `write': closed stream (IOError)puts "ok1"
STDOUT.close
puts "ok2" |
I agree, I honestly don't see why this was required. Perhaps allow the old behavior under a |
It doesn't matter, it was a breaking change, after more than 10 years. If you need the exception raising use |
Is this going to be backported to 1.6? I get this confusing error that doesn't seem to break compilation:
|
This revert is already part of 1.6.0, there is nothing to backport here. |
Is it, though? I can find the first few lines still there, in "version-1-6", slightly modified: Lines 233 to 235 in 7994556
|
That was not the part of the commit (#16367) this PR reverts. It was introduced in https://github.com/nim-lang/Nim/pull/12385/files, back in 2019. |
I got a full backtrace from the latest "version-1-6":
|
This is a too big breaking change to be part of Nim 1.x