Packages Manager - custom packages cannot have custom dependencies

Hi,
I’m trying to create custom packages. There is very few available options yet but I would like to point a bug which is “handled” by developers but scenario works only for unity packages:

If I define my own package in manifest like
“am.packages.other”:“file:W:/Users/fzielinski/Packages/inny/0.0.1”
…it works until I define any dependency to other custom package because that dependency should looks the same way for example:
“dependencies”: {
“am.packages.test”:“file:W:/Users/fzielinski/Packages/test/1.0.1”
}

I need the full path to the custom dependency to resolve it but unity expect that dependency will be subversion only like
“dependencies”: {
“am.packages.test”:“1.0.1”
}

This subversion ofc cannot be resolved so this assertion for version format in dependencies should be abandoned

1 Like

Hi @Hostur ,

Just so you know, the custom package is not a supported feature for the moment. That said, I’ll do my best to help you :). What is the error message you get? It would be easier to help you out if I could see the error message.

Regards,

Pascal

Hi, so if I leave “file:” part of the path I’m receiving this error:

"An error occurred while resolving packages:
Package am.packages.inny@0.0.1 has invalid dependencies:
am.packages.testowy: Version is invalid. Expected a pattern like ‘x.x.x[-prerelease]’, got ‘W:/Users/fzielinski/Packages/testowy/1.0.1’ instead.

A re-import of the project may be required to fix the issue or a manual modification of C:/UnityProjects/AMCoreLibExample/Packages/manifest.json file."

If I add “file:” part before path in dependencies I’m receiving:

"An error occurred while resolving packages:
Package am.packages.inny@0.0.1 has invalid dependencies:
am.packages.testowy: Version is invalid. Expected a ‘semver’ compatible version, got ‘file:W:/Users/fzielinski/Packages/testowy/1.0.1’ instead.

A re-import of the project may be required to fix the issue or a manual modification of C:/UnityProjects/AMCoreLibExample/Packages/manifest.json file."

I understand the issue. Local package dependencies are only accepted in the project manifest (/<project path>/Packages/manifest.json). What you are trying to do is not supported for the moment.

Either remove the dependency In your am.packages.inny package or use a temporary Semver value. Add your leaf dependency as a root dependency in your project. The conflict resolution algorithm will always pick root packages.

Hope it will help,

Pascal