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

Flavor from repo in ToolboxRegistry cannot be overridden locally #96

Open
aernesto opened this issue Apr 15, 2019 · 1 comment
Open
Assignees

Comments

@aernesto
Copy link

The toolbox Lab-Matlab-Control is currently listed in the public ToolboxRegistry with the stable flavor.

Specifying a different flavor for this toolbox in another project's .json config file does not override the setting from the registry.

More precisely, if I have a TbTb project named foo with a foo.json file that looks like the following:

[
	{	
		"name": "foo",
		"type": "git",
		"url": "<some_url>"
	},
	{
		"name": "Lab-Matlab-Control",
                "flavor": "<a_valid_branch_other_than_stable>",
		"type": "include",
		"pathPlacement": "append"
	}
]

A call to tbUseProject('foo') still loads Lab-Matlab-Control on the stable branch.

What is the recommended approach for my needs?

Changing the type of the dependency from include to git would require me to manually enter all the dependencies of Lab-Matlab-Control in the foo.json file. If there is another solution, I would prefer it.

@DavidBrainard
Copy link
Collaborator

I suspect that our design of how to recurse through "includes" is not perfect - it's actually a little tricky to decide exactly what the inheritance rules should be, but I agree that it would make sense if the flavor field in an entry that was an include overrode the flavor field of what was being included.

I am not sure how hard it would be to make that happen. Will try to look.

In the meantime, an approach that would be less irritating than having to paste in the whole included record into each case might be to create a record "Lab-Matlab-Control-BranchName" and include that in Foo.json. Then specify the desired branch in "Lab-Matlab-Control-BranchName".

In our lab, we take a slightly different approach to this, but I can see how one might not like it. On each computer that uses particular branches, we simply check out that branch and let it sit. TbTb does not override the branch checked out if flavor is empty, so this sits stably until someone changes the branch. But it's true that this is not as transparent as one might like, and subject to someone coming along and changing something without telling someone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants