Dependency node in the projects dependency tree
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | cached | = | .false. | Dependency was loaded from a cache | |
| logical, | public | :: | done | = | .false. | Dependency is handled | |
| type(string_t), | public, | allocatable | :: | features(:) | Requested features for the dependency | ||
| type(git_target_t), | public, | allocatable | :: | git | Git descriptor | ||
| character(len=:), | public, | allocatable | :: | name | Name of the dependency | ||
| character(len=:), | public, | allocatable | :: | namespace | Namespace which the dependency belongs to. Enables multiple dependencies with the same name. Required for dependencies that are obtained via the official registry. | ||
| type(string_t), | public, | allocatable | :: | package_dep(:) | Internal: package dependencies of this node | ||
| character(len=:), | public, | allocatable | :: | path | Local target | ||
| type(preprocess_config_t), | public, | allocatable | :: | preprocess(:) | Requested macros for the dependency | ||
| character(len=:), | public, | allocatable | :: | proj_dir | Installation prefix of this dependencies | ||
| type(version_t), | public, | allocatable | :: | requested_version | The requested version of the dependency. The latest version is used if not specified. | ||
| character(len=:), | public, | allocatable | :: | revision | Checked out revision of the version control system | ||
| logical, | public | :: | update | = | .false. | Dependency should be updated | |
| type(version_t), | public, | allocatable | :: | version | Actual version of this dependency | 
Add a preprocessor configuration
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dependency_config_t), | intent(inout) | :: | dep | Instance of the dependency config | ||
| type(preprocess_config_t), | intent(in) | :: | preprocess | Instance of the preprocessor configuration | 
Dump dependency to toml table
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(srcfile_t), | intent(inout) | :: | self | Instance of the serializable object | ||
| type(toml_table), | intent(inout) | :: | table | Data structure | ||
| type(error_t), | intent(out), | allocatable | :: | error | Error handling | 
Write serializable object to file
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(serializable_t), | intent(inout) | :: | self | Instance of the dependency tree | ||
| character(len=*), | intent(in) | :: | file | File name | ||
| type(error_t), | intent(out), | allocatable | :: | error | Error handling | |
| logical, | intent(in), | optional | :: | json | Optional JSON format | 
Write serializable object to a formatted Fortran unit
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(serializable_t), | intent(inout) | :: | self | Instance of the dependency tree | ||
| integer, | intent(in) | :: | unit | Formatted unit | ||
| type(error_t), | intent(out), | allocatable | :: | error | Error handling | |
| logical, | intent(in), | optional | :: | json | Optional JSON format requested? | 
Dump dependency to toml table
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dependency_node_t), | intent(inout) | :: | self | Instance of the serializable object | ||
| type(toml_table), | intent(inout) | :: | table | Data structure | ||
| type(error_t), | intent(out), | allocatable | :: | error | Error handling | 
Get dependency from the registry.
Get a dependency from the registry. Whether the dependency is fetched from a local, a custom remote or the official registry is determined by the global configuration settings.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dependency_node_t), | intent(in) | :: | self | Instance of the dependency configuration. | ||
| character(len=:), | intent(out), | allocatable | :: | target_dir | The target directory of the dependency. | |
| type(fpm_global_settings), | intent(in) | :: | global_settings | Global configuration settings. | ||
| type(error_t), | intent(out), | allocatable | :: | error | Error handling. | |
| class(downloader_t), | intent(in), | optional | :: | downloader_ | Downloader instance. | 
Print information on this instance
Write information on instance
Call base object info
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dependency_node_t), | intent(in) | :: | self | Instance of the dependency configuration | ||
| integer, | intent(in) | :: | unit | Unit for IO | ||
| integer, | intent(in), | optional | :: | verbosity | Verbosity of the printout | 
Read dependency from toml table (no checks made at this stage)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(srcfile_t), | intent(inout) | :: | self | Instance of the serializable object | ||
| type(toml_table), | intent(inout) | :: | table | Data structure | ||
| type(error_t), | intent(out), | allocatable | :: | error | Error handling | 
Read dependency tree from file
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(serializable_t), | intent(inout) | :: | self | Instance of the dependency tree | ||
| character(len=*), | intent(in) | :: | file | File name | ||
| type(error_t), | intent(out), | allocatable | :: | error | Error handling | |
| logical, | intent(in), | optional | :: | json | Optional JSON format | 
Read dependency tree from file init JSON interpreter Read object from TOML table
use default TOML parser
Read object from TOML table
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(serializable_t), | intent(inout) | :: | self | Instance of the dependency tree | ||
| integer, | intent(in) | :: | unit | File name | ||
| type(error_t), | intent(out), | allocatable | :: | error | Error handling | |
| logical, | intent(in), | optional | :: | json | Optional JSON format | 
Read dependency from toml table (no checks made at this stage)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dependency_node_t), | intent(inout) | :: | self | Instance of the serializable object | ||
| type(toml_table), | intent(inout) | :: | table | Data structure | ||
| type(error_t), | intent(out), | allocatable | :: | error | Error handling | 
Check that two source files are equal All checks passed!
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(srcfile_t), | intent(in) | :: | this | |||
| class(serializable_t), | intent(in) | :: | that | 
Update dependency from project manifest.
Update dependency from project manifest
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dependency_node_t), | intent(inout) | :: | node | Instance of the dependency node | ||
| type(package_config_t), | intent(in) | :: | package | Package configuration data | ||
| character(len=*), | intent(in) | :: | root | Root directory of the project | ||
| logical, | intent(in) | :: | fetch | Project has been fetched | ||
| character(len=*), | intent(in), | optional | :: | revision | Git revision of the project | |
| type(error_t), | intent(out), | allocatable | :: | error | Error handling | 
Serialization interface
Check that two dependency nodes are equal All checks passed!
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(dependency_node_t), | intent(in) | :: | this | |||
| class(serializable_t), | intent(in) | :: | that | 
Test load/write roundtrip
Test serialization of a serializable object Dump to scratch file Load from scratch file Check same
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(serializable_t), | intent(inout) | :: | self | |||
| character(len=*), | intent(in) | :: | message | |||
| type(error_t), | intent(out), | allocatable | :: | error | 
type, extends(dependency_config_t) :: dependency_node_t !> Actual version of this dependency type(version_t), allocatable :: version !> Installation prefix of this dependencies character(len=:), allocatable :: proj_dir !> Checked out revision of the version control system character(len=:), allocatable :: revision !> Dependency is handled logical :: done = .false. !> Dependency should be updated logical :: update = .false. !> Dependency was loaded from a cache logical :: cached = .false. !> Internal: package dependencies of this node type(string_t), allocatable :: package_dep(:) contains !> Update dependency from project manifest. procedure :: register !> Get dependency from the registry. procedure :: get_from_registry procedure, private :: get_from_local_registry !> Print information on this instance procedure :: info !> Serialization interface procedure :: serializable_is_same => dependency_node_is_same procedure :: dump_to_toml => node_dump_to_toml procedure :: load_from_toml => node_load_from_toml end type dependency_node_t