Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default Julia version for the Project.toml buildpack is the latest, but the logic indicates it was supposed to be 1.6.x #1190

Open
consideRatio opened this issue Oct 9, 2022 · 0 comments
Labels
maintenance Under the hood fixes and improvements

Comments

@consideRatio
Copy link
Member

It turns out tha the default Julia version for the Project.toml buildpack is the latest version (currently 1.8.2), but the logic indicates it was supposed to be 1.6.x. This caused quite a bit of confusion for me in #1188.

@property
def julia_version(self):
if os.path.exists(self.binder_path("JuliaProject.toml")):
project_toml = toml.load(self.binder_path("JuliaProject.toml"))
else:
project_toml = toml.load(self.binder_path("Project.toml"))
try:
# For Project.toml files, install the latest julia version that
# satisfies the given semver.
compat = project_toml["compat"]["julia"]
except:
# Default version which needs to be manually updated with new major.minor releases
compat = "1.6"
match = find_semver_match(compat, self.all_julias)
if match is None:
raise RuntimeError("Failed to find a matching Julia version: {compat}")
return match

There are some action points here.

  1. Define the desired behavior
  2. Add unit tests for the logic that provides us with a julia version using a value from a Project.toml's compat -> julia key
  3. Update the julia_project.py buildpack making the logic easier to read
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Under the hood fixes and improvements
Projects
None yet
Development

No branches or pull requests

1 participant