Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use julia package at a certain commit?

Tags:

julia

A new version of a julia package causes a problem in my project. I could use Pkg.pin to use the package at some version and I could use Pkg.checkout to use the package in a certain github branch, but how to use the package at a certain github commit? So I could find out which commit actually causes the issue in my project.

like image 918
Consistency Avatar asked Feb 15 '26 14:02

Consistency


2 Answers

To answer the original question, we can add a package at a specified commit, by specifying the commit-sha1 as follows:

(@v1.6) pkg> add Example#commitSHA1

by replacing the commitSHA1 with the commit-sha1 of the required commit of the package.

See the Pkg docs for more.

like image 192
rashid Avatar answered Feb 17 '26 20:02

rashid


Every Julia package is just a git repo, you could always do source code management stuff using git from the command line, and use some full-featured git commands like git bisect to find out that commit.

X-ref: How to use git bisect?

like image 38
Gnimuc Avatar answered Feb 17 '26 19:02

Gnimuc



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!