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

remove front-end deprecations for 1.0 #28366

Merged
merged 3 commits into from
Aug 4, 2018
Merged

remove front-end deprecations for 1.0 #28366

merged 3 commits into from
Aug 4, 2018

Conversation

JeffBezanson
Copy link
Member

@JeffBezanson JeffBezanson commented Jul 31, 2018

This takes care of most of them.

One real problem I've found so far is that the pattern

for i in itr
    local i

is currently used to opt-in to the new scope behavior. However, with the new behavior turned on this gives a local declared twice error. We have long given this error in similar cases, e.g. let i=0; local i; end. For now I just disabled the error, since it's pretty useless. Declaring a local twice doesn't cause any real problem and is more of a lint thing. But if we want we could be fancier and only give the error when the source code has two declarations, ignoring compiler-inserted declarations.

@JeffBezanson JeffBezanson added parser Language parsing and surface syntax compiler:lowering Syntax lowering (compiler front end, 2nd stage) deprecation This change introduces or involves a deprecation labels Jul 31, 2018
@JeffBezanson JeffBezanson added this to the 1.0 milestone Jul 31, 2018
@StefanKarpinski
Copy link
Member

StefanKarpinski commented Jul 31, 2018

Not warning for that seems fine to me. As you said, it's more of a linting thing than correctness.

@JeffBezanson
Copy link
Member Author

Another issue: after removing .', x.'y' parses as x, dot operator, character literal 'y'. Should this be a parse error?

@StefanKarpinski
Copy link
Member

Should this be a parse error?

Yes, otherwise that seems like a a pretty bad trap. We could even allow it again in the future.

@JeffBezanson JeffBezanson force-pushed the jb/rm_07_fe_deps branch 2 times, most recently from cb39d36 to 15ae641 Compare July 31, 2018 22:01
@JeffBezanson JeffBezanson changed the title WIP: remove front-end deprecations for 1.0 remove front-end deprecations for 1.0 Aug 1, 2018
@JeffBezanson
Copy link
Member Author

Now also includes #9343, underscores as dummy variables. That can be moved to separate PR if necessary though.

also disable "local declared twice" error

This permits declaring a loop variable as local inside the loop,
which was used during 0.7 to get the new scope behavior.
@Keno
Copy link
Member

Keno commented Aug 2, 2018

@JeffBezanson master's now 1.0, so this can go in as soon as you're ready and CI is passing.

@timholy
Copy link
Member

timholy commented Aug 3, 2018

This may be "in the weeds," but if it's not inconvenient, it would be nice if this deprecation-removal is merged before other deprecation-removals. I have a fun developer-oriented package (will be introduced at JuliaCon) that only works reliably if the "local scope" deprecation is removed. Aficionados might want to build at the merge commit so they can make use of the package and still get the benefit of all the other deprecation warnings as they update their code to 0.7/1.0.

But don't sweat over this request.

@JeffBezanson JeffBezanson merged commit 68cc868 into master Aug 4, 2018
@JeffBezanson JeffBezanson deleted the jb/rm_07_fe_deps branch August 4, 2018 00:40
@JeffBezanson
Copy link
Member Author

You got it, Tim :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:lowering Syntax lowering (compiler front end, 2nd stage) deprecation This change introduces or involves a deprecation parser Language parsing and surface syntax
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants