Specifying dependencies

When you specify dependencies in Melody.toml, you can restrict to a range or an exact version/revision that Melody should install. These versions are extracted from repository’s SemVer-compatible tags or auto-generated by melodyRepo. We support the following dependency restrictions:

  • "" or "*" specifies the latest tagged release version
  • "head" specifies the latest possible revision in main branch
  • "1.2.3" will only install a specific version (tagged or auto-generated)
  • "#sha" will install a specific revision of the repo
  • You can also use ranges similar to npm-semver
  • TODO: Expand SemVer range docs here

Importing local dependencies

If you would like to import a package from another local repository, unfortunately at this time Melody cannot help you. Instead, we suggest temporarily removing that dependency from your Melody.toml and vendor subdirectory, and letting Go toolchain reference that local dependency via GOPATH. Once you’ve pushed the local changes to the origin server, you can return to vendoring that dependency via Melody.