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

range(start, stop) without kwargs accidentally allowed #640

Closed
martinholters opened this issue Jan 12, 2019 · 1 comment
Closed

range(start, stop) without kwargs accidentally allowed #640

martinholters opened this issue Jan 12, 2019 · 1 comment

Comments

@martinholters
Copy link
Member

Compat.jl/src/Compat.jl

Lines 1853 to 1855 in ce5d74b

if VERSION < v"1.1.0-DEV.506"
range(start, stop; kwargs...) = range(start; stop=stop, kwargs...)
end

So before 1.1.0-DEV.506, range(start, stop) will become range(start, stop=stop), which works, using a default step of 1. On 1.1.0-DEV.506 or later, the Base definition of range(start, stop) errors, requiring step or length to be specified. Unfortunately, ONNX.jl already makes use of the range(start, stop) form, making it at preset incompatible with the upcoming julia-1.1.0 (ref. JuliaLang/julia#30374 (comment)).

Not sure what to do here. In the long run, we should make range(start, stop) error on 1.0, too, but that would be a breaking change. (Altough, we nowhere claim it to work, so one might argue it's really a bugfix). In the short term... Should we override the Base method to allow range(start, stop)? That feels so ... wrong.

@martinholters
Copy link
Member Author

martinholters commented Jan 22, 2019

So the plan is to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant