arr-ai / arrai

The ultimate data engine.
http://arr.ai
Apache License 2.0
20 stars 15 forks source link

Improve error message on failed remote import #503

Open orlade-anz opened 4 years ago

orlade-anz commented 4 years ago

Please do not post any internal, closed source snippets on this public issue tracker!

Current arrai Version

arrai info
Version    : DIRTY-v0.90.0
Git commit : d5da7bd82ec5306fdb80bd854372221c77c098ba
Date       : 2020-07-15T01:09:07Z
OS/arch    : darwin/amd64
Go version : go1.14.4 darwin/amd64

Use-cases

Please describe the end goal you are trying to achieve that has led you to request this feature.

When attempting to naively import a remote arr.ai file, the error message is unhelpful.

let service = //{github.com/anz-bank/sysl-go/codegen/arrai/service.arrai};
service
---

$ arrai run thatfile.arrai
INFO[0007] failed to import https://github.com/anz-bank/sysl-go/codegen/arrai/service.arrai - failed to download modules: go command failed: go mod download: no modules specified (see 'go help mod download')
, and request https://github.com/anz-bank/sysl-go/codegen/arrai/service.arrai failed: 404 Not Found

It's not obvious why go modules have anything to do with an arr.ai import, so users should at least be linked to importing docs with some troubleshotting.