Pin dependency at current state

I want my project Project to depend on an unregistered and untagged version of a registered package ToolBox. Is this a valid way to accomplish this?

pkg>add ToolBox#master
pkg>pin ToolBox

When I would at a later time instantiate the environment, will the commit at master at that later time be pulled in, or will I get the commit master was pointing at when I issued the pkg commands above?

I am aware of 29480/3; this is not what I’m after.

instantiate always gives you the exact version that is recorded in the Manifest. The effect of pin is that it will keep the version even if you do an explicit update.

1 Like

What is recorded in Manifest.toml is

pinned = true
git-tree-sha1 = "31a045a4d0ffe4e82bf51af1f33e7761c2e7f6cb"
repo-rev = "master"

leading to my confusion: is master pointing at the commit at the time of pinning or is it the ever forward moving master branch?

It records master so that if you do a update it knows from which branch to fetch. Unless you update the code identified by the git-tree-sha1 is used.

2 Likes