Updating Julia version

I have a c++ visual studio project which works with some extern libraries wrappers, these are developed with Julia code in order to follow the preliminary design.

I am now triying to improve the whole project and the first step that I am gonna to change is the version of the Julia I am using.

Should I know some previous advices related to new Julia version?
Is there a possibility that the lates Julia version gonna crash or not work correct?
How can I change the Julia version in the whole code? Manually or automatically? In case that I can do it automatically, how can I do thath?

Thanks to all of you.

Julia follows Semver, which means that minor releases since 1.X should be non-breaking as long as the code relies only on the documented API.

3 Likes

And how can I modify the Julia version in my code?
Can I do these changes with an automation process?

In general, all you need to do is install whatever Julia version you want to run your code in and then run it (i.e. include("my_code.jl") if it’s some sort of script, or using MyCode if it’s in a package).

If I understand you correctly though, you have created some type of Julia application that exposes C++ bindings and you call it from C++, is that right? I’ve never used Julia in this way so can’t really say how you would go about it, but my guess is you need to re-take whatever steps you took initially to create your Julia library, just with Julia 1.8.1 instead of whatever Julia version you used initially.

My project follows the next procedure:
There is a main subproject that is based on C++. It call some external libraries (actually the wrapper i told) to push on some dependencies.
In other hand, these libraries (actually these are .h files) are formed by other subproject. This subproject present two branchs: it upload the libraries and binaries from the download Julia version by using the path of Julia, and it upload some julia files (created with julia code by me) which cointain algorithms that are the base of the project.
In order to update the Julia version on my project, I must to update the path where Julia is set and the source code of Julia that was created by me.
First step is already done, but the second step is what I was asking for. I know that every new version of Julia implement several new changes related to functions, procedures…
So, my question is if there is some form to do these changes automatically (the whole code is too long) or I have to go through it and implement the changes one by one.

To sum up, I have a C++ application that interact with two extern libraries, a library “A” that is wrote in Julia 0.3.12 code and a library “B” that is wrote in Julia 1.0.5 code. The main purpose is to unify both with the same Julia version.
So, what will be the best Julia version to implement?
Is it possible to implement the version update automatically?

Okay I think I understand a little better now. If the main question is “is there a tool for automatically updating code (i.e. syntax) to newer Julia versions” the answer is no as far as I know.

As I said, Julia follows SemVer so code written for 1.0 should run on Julia 1.8. I think the main issue you might be facing is with breaking package updates - you can of course continue using the old package versions but that will likely mean missing out some of the benefits of e.g. better threading support in later Julia versions.

Code for 0.3.12 is unfortunately not easy to update - there were 4 breaking versions (0.4, 0.5, 0.6 and 0.7) since then. 0.7 is actually the same as 1.0, but with deprecation warnings instead of errros for changes between 0.6 and 1.0, so it’s a sort of “bridge” to allow users to update more easily. You can either try going straight from 0.3 to 0.7 (and thus 1.0), or go version-by-version if too many things break because of such a large jump.

In any case I would assume that people round here will be happy to help if you run into trouble.

Finally, on

So, what will be the best Julia version to implement?

I think your choices are to target either current stable (1.8.1) or LTS (1.6.7). Here’s a read on Julia’s release process including a discussion of “risk tolerance personas” and recommended Julia versions:

Thank you so much for the explication, it was very helpful for me.
Related to the update of the Julia version onto the code, as you said that it is not possible to do automatically, how can I detect where I have to implement the specific changes?
Should I look for the new language features that Julia made in the relase note for each Julia version update?

I would recommend initially forgetting about the C++ bindings and write a test suite in Julia that integration tests both libraries on the same Julia version using common dependencies. You can run the CI suite on all versions 0.3 through 0.7 and 1 and see what works where. Use compat entries in the test suite project files in order to have control over individual dependency versions.

EDIT: I was assuming that each library is unit tested on Julia 1, otherwise do that first.

Thanks @simsurace. From the replies above I understand that only the 0.3.12 one needs to be updated to 1.0. Since the two libraries provide different functionalities, there is no single test suite to cover both. I understand that your suggestion is to have a test suite and run it to validate each conversion stage (i.e. 0.3 through 1.0). Is that correct? I am not familiar with “compact entries”, what does that mean?

If there is no test suite to cover both, you can still execute both test suites in the same environment if required. I was talking about the compat section of the project file: 6. Compatibility · Pkg.jl