Local package dependency

Hello everyone!

I am trying to use fpm for a local project for which I require another local package that has been build with fpm. I tried to add the latter as a dependency passing in the .toml the full path of the directory but it doesn’t seem to work. I couldn’t find any info or example on this case, am missing something? Is it impossible to pass local dependencies?

An example of what I had in the .toml file:

[dependencies]
stdlib = “*”
mypackage=“path/to/mypackage”

Thank you in advance!

1 Like

The syntax is:

[dependencies]
mypackage = { path = "../mypackage" }

(supposing here that the subdirectory mypackage is in the same directory as your project subdirectory.)

Welcome to the Discourse!

3 Likes

Hi @SamuG, welcome!

The correct syntax should be

[dependencies]
mypackage = { path = "path/to/mypackage" }

PS: Ooops, I can see you’ve already received the correct answer ahah!

1 Like