Suppose we have installed the latest version of a package named PkgB v0.1.0 in our project environment. It has PkgA v0.1.0 as one of its dependencies. Now we find that PkgA v0.1.0 has a new commit on GitHub without releasing a new version. Of course, if we update PkgB at this point, nothing will happen. But we do want the PkgB we are using to depend on the newest commit of PkgA. Then what should we do?
If PkgB doesn’t have an upper bound in its compatibility declarations with PkgA, you can add the version of PkgA on a github branch to your own environment and it should be picked up by PkgB too.
Do you mean, that suppose the new commit of PkgA is at the main branch on GitHub, then I just need to additionally add PkgA#main in my environment, and do nothing with the already installed package PkgB?
Yes. This should result in PkgB using the explicitly installed version of PkgA in that environment, as long as the compatibility declarations work out.
Sorry. Now I have another question. If some day PkgA releases a new version PkgA v0.1.1 while PkgB still keeps PkgB v0.1.0, what should I do, given that the [compat] declaration of PkgB v0.1.0 reads PkgA = "0.1.0"? And how about PkgA = "0.1"?