-
-
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 #1994 gorge, staticExec now error at CT on exitCode !=0 #10360
Conversation
Using |
i know, my 1st draft had:
|
Why not simply deprecate |
i'd love that, but thought i'd face pushback from some ppl; @Araq is there any loss of usability wrt using it inside a pragma ? (ie a user defined proc
if gorgeEx(or user defined variant) works inside a pragma and there's no loss of functionality, i'll go ahead and update PR to just mark gorge,staticExec as deprecated (w no change of behavior in them) |
This is a big problem, I should be able to catch this error and set my
I vote for removing these aliases. They just don't serve much of a purpose and many often wonder why they're there. Just deprecate them and break |
Ok, fine with me, so we deprecate all 4 of them. And then, tada (!) we can introduce variants that work that are not in system.nim. |
That's going too far, I'm happy with |
well I am voting for Araq solution here. I think we should introduce a proper deprecation path for changes like these. The current deprecation mechanism is great when the name of a function changes. Old code works as it was without breakage and error messages point out what to use to update the code. But moving procs into different modules is not that simple. If the same deprecation mechanism is applied here, the new name will very likely collide with the deprecate procedure. Something that says: |
--experimental:gorgeIgnoreExitCodeDeprecated
to get old behavior, or usegorgeEx
to gettuple[output: string, exitCode: int]
an altenative would be:
--experimental:gorgeHonorsExitCode
and if this flag isn't passed, show a deprecation notice whengorge
is usednote
unlike in previous PR which allowed that: https://github.com/nim-lang/Nim/pull/10345/files#diff-353c91db729fe1f641027ea2a4e781b2
if someone has an idea (that they tested to work) for allowing that (or even allowing raising
OSError
), please let me know; otherwise the workaround mentioned above should cover all usability cases