google/tachometer

Using SSH in Github dependency resolutions

Closed this issue · 3 comments

When using a config similar to that found in the README.md that leverages a Github repo via SSH (included at the bottom of the issue for reference), I am running into issues where tachometer attempts to install the dependency from the local file system. It seems that this stems from this code:

https://github.com/Polymer/tachometer/blob/2b296a0a0ab57ecbadc3c3625a499570fb5e0c83/src/versions.ts#L366-L380

It appears to expect a protocol reference at the beginning of the repo value for the dependency, and when it doesn't fine one it assumes the dependency is local. Would a naive return on str.search('git@') === 0 be an acceptable addition to this logic? Or is there a better path forward for adding support for SSH here? Or am I missing something all together?

Config Reference:

{
  "benchmarks": [
    {
      "name": "my-benchmark",
      "url": "my-benchmark.html",
      "packageVersions": {
        "label": "my-label",
        "dependencies": {
          "my-package": {
            "kind": "git",
            "repo": "git@github.com:MyOrg/my-repo.git",
            "ref": "my-branch",
            "subdir": "packages/my-package",
            "setupCommands": [
              "npm install",
              "npm run build"
            ]
          }
        },
      }
    },
  ],
}

Oops, yeah that's just a bug. Should be fixed by #212

For now you can write ssh://git@github.com/MyOrg/my-repo.git

Fixed in 0.5.9 just published

Thanks!!!