How to make my develop version library?

Hi, I’m developing a module for my team.

I’m currently developing a Julia package that relies on a forked version of another public package (Fortran90Namelists.jl). I’ve made some important internal modifications to this dependency and want my package to use this modified fork rather than the version registered in the General registry.

Although I’ve taken the following steps:

But I still find that when users install my main package (e.g., via Pkg.add(“https://github.com/.../MyPackage.jl”)), Julia resolves the dependency using the original registered version, not my custom fork — unless the user explicitly runs Pkg.develop on the forked dependency.

My core question is:

How can I ensure that when other users install my package, Julia automatically pulls in my forked version of a dependency (e.g., Fortran90Namelists.jl), rather than resolving to the version in the registry?

I’d prefer a solution that does not require the user to manually develop the dependency, if possible.

Your best option is probably adding a [sources] section to MyPackage.jl/Project.toml (10. Project.toml and Manifest.toml · Pkg.jl), with the link to the Fortran90Namelists.jl repo. Note however that it won’t work if MyPackage is used as a dependency. The condition is that your users have to work inside the MyPackage environment.

2 Likes

Setup GitHub - GunnarFarneback/LocalRegistry.jl: Create and maintain local registries for Julia packages.

1 Like

@xgdgsc Wow this one looks cool. Very helpful for me. I appreciate! :grinning_face: