uber-archive / idl

A CLI for managing Thrift IDL files
http://www.uber.com
MIT License
78 stars 19 forks source link

idl-daemon with config file fails #45

Open anushaML opened 8 years ago

anushaML commented 8 years ago

Getting the following error when running idl-daemon --config-file=config.json (masked exact git repo with ...)

failed to process thrift file ~ { err2:
   { [Error: spawn /bin/sh ENOENT]
     code: 'ENOENT',
     errno: 'ENOENT',
     syscall: 'spawn /bin/sh',
     path: '/bin/sh',
     spawnargs: [ '-c', 'git remote --verbose' ],
     cmd: 'git remote --verbose' },
  remote:
   Remote {
     repository: 'git+ssh://git@.../test-idl',
     branch: 'master',
     directoryName: 'test-idl',
     fileName: 'test-idl.thrift' } }
/usr/local/lib/node_modules/idl/node_modules/debug-logtron/backends/debug-log-backend.js:118
        throw new Error(logRecord.fields.msg);
        ^

Error: failed to process thrift file
    at DebugLogStream.write (/usr/local/lib/node_modules/idl/node_modules/debug-logtron/backends/debug-log-backend.js:118:15)
    at DebugLogtron._log (/usr/local/lib/node_modules/idl/node_modules/debug-logtron/index.js:57:18)
    at DebugLogtron.error (/usr/local/lib/node_modules/idl/node_modules/debug-logtron/index.js:89:10)
    at onProcessed (/usr/local/lib/node_modules/idl/repository.js:189:29)
    at onServiceName (/usr/local/lib/node_modules/idl/repository.js:217:20)
    at onVerboseRemote (/usr/local/lib/node_modules/idl/service-name.js:40:24)
    at exithandler (child_process.js:209:5)
    at ChildProcess.errorhandler (child_process.js:221:5)
    at emitOne (events.js:90:13)
    at ChildProcess.emit (events.js:182:7)

Here is the config.json (masked exact git repo with ...) Your documentation is not update to date, some of the fields in config were required by code, but was not updated in the documentation.

{
    "upstream": "git+ssh://git@.../idl-registry",
    "repositoryDirectory": ".../idl-registry/repo",
    "cacheLocation": ".../idl-registry/cache",
    "fileNameStrategy": "lastSegment",
    "fetchInterval": 10, //not sure what this is
    "remotes": [
        {
            "repository": "git+ssh://git@.../test-idl",
            "branch": "master"
        }
    ]
}

After a bit of going through your code, the error seems to be occurring at line 30 exec in service-name.js. Please help.

blampe commented 8 years ago

@malandrew any ideas?

andrewdeandrade commented 8 years ago

None off the top of my head. I'll add this to my backlog, but in the meantime pull requests are welcome.