def compile(name, content, package=package, project=project, parent=parent, endpoint=endpoint):
    # send job buildJar to api
    sock = request('buildJar', name, content, package, project, parent, endpoint)

    # decode result into sane json
    resp = decode(sock.recv())

    # make sure job completed
    if resp['status'] != 'complete':
        try:
            raise ResolveCompilerError(resp['errors'][0]['errors'])
        except __HOLE__:
            raise ResolveAPIError(resp['bugs'][0]['bugs'])

    # download jar file
    with urllib.request.urlopen('https://{}/download?job=download&name={}&dir={}'.format(endpoint, resp['result']['jarName'], resp['result']['downloadDir'])) as response:
        jar = response.read()

    # return jar bytes
    return jar
dataset/ETHPy150Open fkmclane/vim-resolve/rplugin/python3/resolve/api.py/compile