Skip to content

Prefixing manifest dependencies with organization name #814

@minhqdao

Description

@minhqdao

To avoid name collisions and squatting, the current state (especially for the registry) would be that every dependency has to be part of a namespace (or organization or publisher). The question is now how that should look like within the fpm manifest.

Without namespace, get this dependency from the registry:

[dependencies]
name = "dependency_name"
version = "0.1.0"

With namespace:

[dependencies]
name = "organization%dependency_name"
version = "0.1.0"

This would, in theory, allow multiple packages with the same name to be incorporated:

[dependencies]
name = "organization%same_dependency_name"
version = "0.1.0"
name2 = "organization2%same_dependency_name"
version = "0.2.0"

I could envisage multiple kinds of separators for separating the namespace from the package name, like _, -, / or% (the latter is probably the most Fortran 😄). But distinguishing the namespace from package name in organization_name_package_name might be difficult using _ as the separator.

Of course, we could also add an additional required field as such:

[dependencies]
name = "dependency_name" (required)
organization = "organization" (required)
version = "0.1.0" (if not specified, get the newest version)

However, having to add another field might be overkill? 🤔

We also thought about adding namespaces for git dependencies in the same go.

How do feel about all of this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions