# Undefined variable errors when upgrading from 0.6 to 1.0

**URL:** https://discourse.julialang.org/t/undefined-variable-errors-when-upgrading-from-0-6-to-1-0/15432
**Category:** New to Julia
**Created:** [September 24, 2018, 5:55pm UTC](https://discourse.julialang.org/t/undefined-variable-errors-when-upgrading-from-0-6-to-1-0/15432 "2018-09-24T17:55:57Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![threadedblue](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/threadedblue/32/19247_2.png) [@threadedblue](https://discourse.julialang.org/u/threadedblue)
#### Post date: [September 24, 2018, 5:55pm UTC](https://discourse.julialang.org/t/undefined-variable-errors-when-upgrading-from-0-6-to-1-0/15432/1 "2018-09-24T17:55:57Z")

</div>

As stated in another topic, I am saddled upgrading some legacy code that worked in 0.6 but not in 1.0. I just finished asking about AbstractSparseMatrix where 1.0 complained that it was undefined. `julia> using SparseArrays` fixed that problem.

Now 1.0 says Range is undefined. I’ll bet it too has been… what? refactored into another package? I am sure I am going to have a lot of this type of issue going forward. Is there any of one stop shopping I can reference? I’ve been Googling but not finding much.

It will keep me from bugging you good people.

Thanks

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [September 24, 2018, 5:57pm UTC](https://discourse.julialang.org/t/undefined-variable-errors-when-upgrading-from-0-6-to-1-0/15432/2 "2018-09-24T17:57:26Z")

</div>

Use 0.7 for upgrading code. It has deprecation warnings in place to help with this.

---

<div class="post-metadata">

### Author: ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)
#### Post date: [September 24, 2018, 6:01pm UTC](https://discourse.julialang.org/t/undefined-variable-errors-when-upgrading-from-0-6-to-1-0/15432/3 "2018-09-24T18:01:58Z")

</div>

> [@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…

---

<div class="post-metadata">

### Author: ![threadedblue](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/threadedblue/32/19247_2.png) [@threadedblue](https://discourse.julialang.org/u/threadedblue)
#### Post date: [September 24, 2018, 6:51pm UTC](https://discourse.julialang.org/t/undefined-variable-errors-when-upgrading-from-0-6-to-1-0/15432/4 "2018-09-24T18:51:03Z")

</div>

Tried 0.7 but my package won’t run. This is the same error I posted on earlier only in 1.0 my package is useable in spite of the error. In 0.7 it is not

What does this error mean? It must be the cause of my troubles.  
In 0.7  
`pkg> add /XYZ **Updating** git-repo `/XYZ`  
**ERROR:** GitError(Code:EUNBORNBRANCH, Class:Reference, reference ‘refs/heads/master’ not found)

# In 1.0, I get the above error but the following works anyway. btw: /XYZ is a # git repository with everything committed.`

` **julia\>** using XYZ  
**ERROR:** ArgumentError: Package XYZ not found in current path:

- Run `Pkg.add("XYZ")` to install the XYZ package.`

Thanks

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [September 24, 2018, 6:56pm UTC](https://discourse.julialang.org/t/undefined-variable-errors-when-upgrading-from-0-6-to-1-0/15432/5 "2018-09-24T18:56:35Z")

</div>

Try use `dev` instead of `add`, it is likely what you want.

---

<div class="post-metadata">

### Author: ![jonathanBieler](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@jonathanBieler](https://discourse.julialang.org/u/jonathanBieler)
#### Post date: [September 24, 2018, 6:59pm UTC](https://discourse.julialang.org/t/undefined-variable-errors-when-upgrading-from-0-6-to-1-0/15432/6 "2018-09-24T18:59:32Z")

</div>

If you have your package on git you can also try to use [FemtoCleaner](https://github.com/JuliaComputing/FemtoCleaner.jl), it fixes automatically a lot of deprecations. All you need to do is activate it and push a commit with `julia 0.7` in REQUIRE (although it doesn’t always trigger it for some reason).

---

<div class="post-metadata">

### Author: ![mschauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mschauer/32/13946_2.png) [@mschauer](https://discourse.julialang.org/u/mschauer)
#### Post date: [September 24, 2018, 8:19pm UTC](https://discourse.julialang.org/t/undefined-variable-errors-when-upgrading-from-0-6-to-1-0/15432/7 "2018-09-24T20:19:21Z")

</div>

As a side remark, I’d appreciate the use of more descriptive post titles.

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [September 24, 2018, 8:23pm UTC](https://discourse.julialang.org/t/undefined-variable-errors-when-upgrading-from-0-6-to-1-0/15432/8 "2018-09-24T20:23:42Z")

</div>

I updated it.
