Undefined variable errors when upgrading from 0.6 to 1.0

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

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

2 Likes
3 Likes

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

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

If you have your package on git you can also try to use FemtoCleaner, 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).

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

I updated it.

1 Like