PROS: Issue with applying local templates to project

Hi guys. I’ve experimented a bit recently with some the features of PROS that I didn’t use this season. One of those features is the templating/library feature that it has. However, at the moment I am having an issue with getting the template that I have created into a project. The CLI properly applies the kernel and okapilib, and when I check the registry of templates my template is there. However, when I ask the CLI to apply the template to a project, it returns an error that it can’t find the template, though as I states before it knows it exists. Wondering if any of you might know why this is happening, thanks a lot.

Not sure why that would be happening. Can you provide a bit more details - specifically what commands are you running?

You should be able to do

> prosv5 c f
> cd ../to/my/project
> prosv5 c a mytemplate

Applying with a version spec should also work just fine:

> prosv5 c a mytemplate@1.0.0

Thats what I do…

C:\Users\kaila\Documents\GitHub\MBeddedL>prosv5 c f
Extracting [####################################] 100%
Fetched MBeddedL@1.0.0 from local depot
Adding MBeddedL@1.0.0 to registry…Done

C:\Users\kaila\Documents\GitHub\MBeddedL>cd C:\Users\kaila\Documents\GitHub\robot

C:\Users\kaila\Documents\GitHub\robot>prosv5 c a MBeddedL
Updating pros-mainline… Done
ERROR - main:main - Could not find a template satisfying MBeddedL@>=0 (BaseTemplate) for v5
File “D:\a\1\s\pros\cli\”, line 100, in apply
File “D:\a\1\s\pros\conductor\”, line 179, in apply_template
pros.conductor.project.template_resolution.InvalidTemplateException: Could not find a template satisfying MBeddedL@>=0 (BaseTemplate) for v5

any idea what is happening

Also just so you know, when I use the upgrade command it does find the template but just doesn’t apply it (obviously), so the problem seems to be specific to the installing part.

There’s additional filtering of templates, which primarily includes making sure that the template supports the same PROS kernel as your project. Perhaps that’s the issue.

Can you send me:

  • The template.pros file inside (or just send the whole zip)
  • The project.pros file inside robot project (or just send the whole project in a zip)

I upgraded both the template and the project to kernel 3.1.6 and it did the charm. Thanks.

1 Like

Glad you got it figured out. The default behavior is MBeddedL to support any kernel version greater than you have installed. That is, if your MBeddedL project is on 3.1.4, then any newer version will work fine. If you have 3.1.3 installed on your robot project, then MBeddedL won’t support that project.