Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make error if there's no such type, properties and interface in scope #14

Open
zhiburt opened this issue Aug 4, 2019 · 1 comment
Open

Comments

@zhiburt
Copy link
Contributor

zhiburt commented Aug 4, 2019

Hey Eliot you prolong creating nice stuff.
Personally I am pleased to see this repository.
Thanks for that.

So what about problem.
I believe that if we cannot find type, interface and property in time when we parse AST is a problem and we should notify about that user

At present it is going to be adjourned to compile's message.

What I mean

if we have such file as this

services:
  DoSomething:
    type: '*Worker'
    interface: Do
    properties:
      Name: '"Bil"'

If there's no type, interface or property like this, some useful information could be displayed

@lucas-gio
Copy link

Hello to all!!!
I give an error in my incorrect input, but withouts warnings, really is very difficult know the problem.
Im my file:
datasourceService:
type: '*DatasourceService'
interface: IDatasourceService.go
properties:
configurationService: '@{configurationService}'

The .go of the interface field generate an invalid value in dingo.go, then the error is given:
panic: dingo.go:8:39: expected 'IDENT', found 'go' (and 1 more errors)

goroutine 1 [running]:
main.(*File).getPackageName(0xc00005e7b0, 0x58e88d, 0x9, 0x0, 0x0)
/home/pc/go/pkg/mod/github.com/elliotchance/[email protected]/file.go:108 +0x405
main.main()
/home/pc/go/pkg/mod/github.com/elliotchance/[email protected]/main.go:38 +0x333

Other observation: if i have an invalid value, and an incorrect file dingo.go is generated, later i cant use again dingo command. Is needed remove the file by hand. The command would delete the dingo.go file before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants