Deprecation warnings are typically very specific and going through a large
code base only takes a couple of hours in my experience and doesn't require
deep Julia expertise. It's pretty similar to fixing compiler warnings in C.
Using Compat is a little harder but not by much. I would recommend this
process:
0. Make sure your code base is a clean fully committed state in git.
1. Run under 0.4 and keep fixing warnings until there aren't any more.
2. Git commit the new 0.4-compatible code. If you only need 0.4 support,
stop.
3. Run under 0.3 and see what breaks, repeat these steps until it works:
a) First try just adding `using Compat` at the top of module with
errors.
b) For remaining errors, use `@compat` on the specific incompatible
syntax.
c) For any syntaxes that can't be addressed this way, file issues with
Compat.
4. Git commit the version that now works under 0.3 with Compat.
5. Try running under 0.4 again and make sure that still works.
On Sat, Oct 17, 2015 at 11:21 AM, Tony Kelman <[email protected]> wrote:
> No, not really. The compiled code is pretty highly dependent on the
> runtime library, which changes between each version. Some day in the future
> you will probably be able to directly compile Julia code into object files,
> libraries, or executables, but not that's not an easy thing to do right now.
>
>
> On Friday, October 16, 2015 at 10:48:43 PM UTC-7, Forrest Curo wrote:
>>
>> There's something I haven't quite understood about the language...
>>
>> It compiles a function the first time that function is run... So I should
>> be able to save a file from that
>>
>> that julia should be able to link to...?
>>
>> Is there a way to run a module in julia 3, freeze the machine code that
>> this generates, and afterwards just let julia 4 use that without
>> re-compiling?
>>
>> On Fri, Oct 16, 2015 at 10:26 PM, Tony Kelman <[email protected]> wrote:
>>
>>> You can continue using 0.3 if you want to use 0.3-developed code without
>>> changes or warnings. Yes, the purpose of Compat is to allow using the new
>>> 0.4 syntax, eliminating deprecation warnings but allowing the code to still
>>> run on 0.3.
>>>
>>>
>>> On Friday, October 16, 2015 at 9:27:59 PM UTC-7, Forrest Curo wrote:
>>>>
>>>> Um... In other words, I can run my old code using julia 0.3 but if I
>>>> want to add new things in julia 0.4 syntax, Compat will translate it so
>>>> julia 0.3 can run it?
>>>>
>>>> Nothing to convince julia 0.4 to look up & use an older graphics
>>>> package? (That's really the issue here... The graphics for this were a
>>>> trivial hassle I thought I'd finished, & now I'm needing to excavate &
>>>> reconstruct that in order to use them.)
>>>>
>>>> On Fri, Oct 16, 2015 at 8:41 PM, Matt Bauman <[email protected]> wrote:
>>>>
>>>>> On Friday, October 16, 2015 at 11:29:40 PM UTC-4, Forrest Curo wrote:
>>>>>>
>>>>>> Okay, this might be a good time to explain that 'Compat' package.
>>>>>> Evidently I do have it, because I can't Pkg.add it... How does this work?
>>>>>>
>>>>>
>>>>> See the readme here: https://github.com/JuliaLang/Compat.jl
>>>>>
>>>>> The short version is that it allows you to write code using the new
>>>>> 0.4 names and syntaxes, while still providing compatibility for 0.3. For
>>>>> the most part, you're able to update your code to the new 0.4 names and
>>>>> simply saying `using Compat` at the top of your file will make things work
>>>>> on 0.3. There are some syntaxes, however, whose new form is an error on
>>>>> 0.3. In those cases, you can use the `@compat` macro. For example, a
>>>>> function definition like `f(x::Union(Int,Float64)) = 2` would become
>>>>> `f(x::@compat(Union{Int,Float64})) = 2`.
>>>>>
>>>>
>>>>
>>