# Warning in 1.0 +?

**URL:** <https://discourse.julialang.org/t/warning-in-1-0/35281>\
**Category:** General Usage\
**Created:** [February 28, 2020, 10:00am UTC](https://discourse.julialang.org/t/warning-in-1-0/35281 "2020-02-28T10:00:00Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![programista](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/programista/32/5372_2.png) [@programista](https://discourse.julialang.org/u/programista)\
**Post date:** [February 28, 2020, 10:00am UTC](https://discourse.julialang.org/t/warning-in-1-0/35281/1 "2020-02-28T10:00:00Z")

</div>

Is possible switch ON Warnings: in Julia 1.0 and higher like was in 0.7 ? :

```julia
julia> sum(rand(10,10),1)
┌ Warning: `sum(a::AbstractArray, dims)` is deprecated, use `sum(a, dims=dims)` instead.
│ caller = top-level scope at none:0
└ @ Core none:0

```

Paul

---

<div class="post-metadata">

**Author:** ![laborg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/laborg/32/5474_2.png) [@laborg](https://discourse.julialang.org/u/laborg)\
**Post date:** [February 28, 2020, 10:18am UTC](https://discourse.julialang.org/t/warning-in-1-0/35281/2 "2020-02-28T10:18:08Z")

</div>

The deprecation warnings of 0.7 are only available in 0.7, so no, there is no possibility to achieve this in 1.0. (0.7 is actually 1.0 + deprecation warnings)

---

<div class="post-metadata">

**Author:** ![programista](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/programista/32/5372_2.png) [@programista](https://discourse.julialang.org/u/programista)\
**Post date:** [February 28, 2020, 10:23am UTC](https://discourse.julialang.org/t/warning-in-1-0/35281/3 "2020-02-28T10:23:26Z")

</div>

It’s very bothersome for non heavy heavy users. It’s very bothersome for non heavy heavy users  
I switched from 0.6 to 1.0 and must go back to 0.7. Think about the many many users who work every day. They will go to Python  
Paul

---

<div class="post-metadata">

**Author:** ![anon92994695](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Post date:** [February 28, 2020, 10:28am UTC](https://discourse.julialang.org/t/warning-in-1-0/35281/4 "2020-02-28T10:28:11Z")

</div>

Is there a performance cost to reporting warnings?

---

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [February 28, 2020, 10:28am UTC](https://discourse.julialang.org/t/warning-in-1-0/35281/5 "2020-02-28T10:28:51Z")

</div>

You don’t “have to” go back to 0.7. If anything, you should see Julia 0.7 as a convenience tool for porting your code more easily from 0.6 to 1.0.

---

<div class="post-metadata">

**Author:** ![programista](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/programista/32/5372_2.png) [@programista](https://discourse.julialang.org/u/programista)\
**Post date:** [February 28, 2020, 10:37am UTC](https://discourse.julialang.org/t/warning-in-1-0/35281/6 "2020-02-28T10:37:53Z")

</div>

I don’t know, but it could be an option!  
I work on 0.7 which has a lot of problems and I can’t jump on 1.3 and more because I don’t know what is wrong in the code: /  
How can I know which 0.6 parts of code are bad for 1.3 if not WARNING?  
Paul

---

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [February 28, 2020, 10:50am UTC](https://discourse.julialang.org/t/warning-in-1-0/35281/7 "2020-02-28T10:50:09Z")

</div>

That’s precisely what Julia 0.7 is for. Take your code, run it with 0.7, and fix all the deprecation warnings. If your code works with 1.0 it also works with 1.3.

---

<div class="post-metadata">

**Author:** ![laborg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/laborg/32/5474_2.png) [@laborg](https://discourse.julialang.org/u/laborg)\
**Post date:** [February 28, 2020, 10:54am UTC](https://discourse.julialang.org/t/warning-in-1-0/35281/8 "2020-02-28T10:54:34Z")

</div>

Deprecation warnings can cost performance, but I think the split between 0.7 and 1.0 was done to signal a clean start.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [February 28, 2020, 10:55am UTC](https://discourse.julialang.org/t/warning-in-1-0/35281/9 "2020-02-28T10:55:32Z")

</div>

> [@programista](#):
>
> It’s very bothersome for non heavy heavy users  
> I switched from 0.6 to 1.0 and must go back to 0.7.

I imagine that there is a spectrum of people between “heavy users” and those who switch to Julia 1.0 18 months after it was released, with 1.4 around the corner.

> [@programista](#):
>
> They will go to Python

Good for them! Everyone should just use the language they find the most convenient.

I just wish people stopped using this argument whenever they encounter some minor inconvenience. It is unlikely to get them what they want, but may just lead people to ignore the whole discussion.

---

<div class="post-metadata">

**Author:** ![anon92994695](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Post date:** [February 28, 2020, 11:03am UTC](https://discourse.julialang.org/t/warning-in-1-0/35281/10 "2020-02-28T11:03:05Z")

</div>

Makes sense. The deprecations I have seen are all pretty painless thus far. So its never been a big deal to just fix them. I wouldn’t switch languages over the fact that the language I was using improved, and I didn’t want to improve my code base. If it were that easy to start over in another language, it’d be 100x easier to just fix the warnings?

---

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [February 28, 2020, 11:03am UTC](https://discourse.julialang.org/t/warning-in-1-0/35281/11 "2020-02-28T11:03:58Z")

</div>

> [@laborg](#):
>
> The deprecation warnings of 0.7 are only available in 0.7, so no, there is no possibility to achieve this in 1.0.

When I see “no possibility” regarding Julia, I pause. It seems everything is possible, in theory. Maybe it’s not a good idea to make a package to enable this possibility, but the OP probably could. I’m not even sure it’s too difficult. Another possibility, I brought up in another thread, was make it possible to call old Julia versions (like you call Python, e.g. through Polyglot.jl, I looked a bit into doing this). The downside brought up was old code might never get migrated then.

---

<div class="post-metadata">

**Author:** ![laborg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/laborg/32/5474_2.png) [@laborg](https://discourse.julialang.org/u/laborg)\
**Post date:** [February 28, 2020, 11:14am UTC](https://discourse.julialang.org/t/warning-in-1-0/35281/12 "2020-02-28T11:14:04Z")

</div>

You’re right, “no possibility” should be extended to mean without any simple built in options. The deprecations were deliberately removed in 1.0, because otherwise, people would have written grumpy posts on the day of the 1.0.0 release that Julia can’t be a good language if they have deprecations on day zero.

And I wouldn’t go through the pain of trying to integrate an unsupported version of a pre-release language. Just porting code using 0.7 would be a better way to deal with the legacy work.

---

<div class="post-metadata">

**Author:** ![leethargo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/leethargo/32/6004_2.png) [@leethargo](https://discourse.julialang.org/u/leethargo)\
**Post date:** [February 28, 2020, 12:05pm UTC](https://discourse.julialang.org/t/warning-in-1-0/35281/13 "2020-02-28T12:05:07Z")

</div>

I’m not sure I understand the complaint. If I have some code that works for Julia 0.6, and I run it with Julia 0.7 to produce deprecation warnings, it should actually fail with an error on Julia 1.0, right?

---

<div class="post-metadata">

**Author:** ![programista](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/programista/32/5372_2.png) [@programista](https://discourse.julialang.org/u/programista)\
**Post date:** [February 28, 2020, 1:31pm UTC](https://discourse.julialang.org/t/warning-in-1-0/35281/14 "2020-02-28T13:31:27Z")

</div>

Warnings in 0.7 are VERY USEFUL for both new and fear users. Experiences of advanced users have nothing to do with it. Why can’t they be an option in new eversions?

A simple example:  
If I do not know that there is a Statistic(s?) package, then for user ‘mean’ does not exist in Julia

```julia
julia> mean(rand(10,10),1)
ERROR: UndefVarError: mean not defined
Stacktrace:
 [1] top-level scope at none:0

help?> mean
search: SegmentationFault macroexpand @macroexpand @macroexpand1 Meta numerator enumerate timedwait

Couldn't find mean
Perhaps you meant map, max, min, atan, read, real, tan, Real, Meta, merge, Main, map!, mark, mod, mod1 or modf
  No documentation found.

  Binding mean does not exist.

```

Perhaps you meant … max, min… but never mean ;/ my goodnes 😉

Paul

---

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [February 28, 2020, 1:46pm UTC](https://discourse.julialang.org/t/warning-in-1-0/35281/15 "2020-02-28T13:46:13Z")

</div>

Let’s see what happens in python…

 ![image](https://global.discourse-cdn.com/julialang/original/3X/8/9/897ce96f2b85a862f6d3d9455b5f4b602f0a2ba8.png)

---

<div class="post-metadata">

**Author:** ![programista](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/programista/32/5372_2.png) [@programista](https://discourse.julialang.org/u/programista)\
**Post date:** [February 28, 2020, 1:47pm UTC](https://discourse.julialang.org/t/warning-in-1-0/35281/16 "2020-02-28T13:47:04Z")

</div>

> [@programista](#):
>
> Experiences of advanced users have nothing to do with it.

😉

---

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [February 28, 2020, 1:49pm UTC](https://discourse.julialang.org/t/warning-in-1-0/35281/17 "2020-02-28T13:49:21Z")

</div>

Search the julia documentation rather than the REPL. [Julia Documentation · The Julia Language](https://docs.julialang.org/en/v1/)

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [February 28, 2020, 2:04pm UTC](https://discourse.julialang.org/t/warning-in-1-0/35281/18 "2020-02-28T14:04:16Z")

</div>

> [@programista](#):
>
> If I do not know that there is a Statistic(s?) package, then for user ‘mean’ does not exist in Julia

These points were discussed in detail at the time when `Statistics` was moved out from `Base`. If you are interested, please look them up in the archives. There is very little point in restarting them 2 years later.

There is detailed advice on upgrading to 1.0, with

> [@PSA: use Julia 0.7 if you are upgrading](https://discourse.julialang.org/t/psa-use-julia-0-7-if-you-are-upgrading/13321):
>
> A lot of people are posting issues where their old code doesn’t work anymore on 1.0 because some function has been renamed or removed. The 0.7 release exists exactly for this reason: your old code will work on 0.7 and give you a specific warning about how to fix your code. If you have any old code, you should use 0.7 to get these warnings before switching to 1.0; even if you just have work habits that may need changing, you should probably use 0.7 for a while. If someone posts an issue like thi…

as a good starting point. Please respect the effort that people have put into these things by reading them first and following the advice there.

---

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [March 1, 2020, 4:37am UTC](https://discourse.julialang.org/t/warning-in-1-0/35281/19 "2020-03-01T04:37:51Z")

</div>

> I work on 0.7 which has a lot of problems and I can’t jump on 1.3 and more because I don’t

uhhh, I do not understand. First, which problems 0.7 has? It should be basically equal to version 1.0 but with those warnings enabled, and 1.0 is the long term support version (it is the one I use to develop and most packages support it). You actually need the features of 1.3 or 1.4 in your code? If you do not, then I am not aware of any problems in developing using 0.7 until you feel confident in using versions 1.x.

If your code is valid 0.7/1.0 code, but you want to run with 1.x because of some optimization, then you may have multiple versions of Julia in your computer. You may have 0.7 and 1.3 installed, for example, and create links to them in your path as `julia0.7` and `julia1.3` and call the 0.7 version to check your code and the 1.3 to make use of any speedup improvements.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [March 1, 2020, 6:09am UTC](https://discourse.julialang.org/t/warning-in-1-0/35281/20 "2020-03-01T06:09:59Z")

</div>

> [@programista](#):
>
> Why can’t they be an option in new eversions?

What you may be missing is that some things were deprecated so that the syntax can be _reused_ for something else. So it is not possible to give warnings in later version, because that syntax is now valid.

An example is `range`, see

> <https://github.com/JuliaLang/julia/pull/28708>
>
> This was discussed in #25896, and can be added now that deprecations are removed…. This probably could have been in 1.0, and so might be ok to put in a point release. Thoughts? Otherwise it can go in 1.1.

for details.

[Next page](https://discourse.julialang.org/t/warning-in-1-0/35281.md?page=2)
