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

Not very helpful error on misconfiguration #42

Closed
dustyhorizon opened this issue Mar 20, 2018 · 4 comments
Closed

Not very helpful error on misconfiguration #42

dustyhorizon opened this issue Mar 20, 2018 · 4 comments

Comments

@dustyhorizon
Copy link

On misconfiguring .mbt.yml file by naming a module and referencing itself in dependencies in the same configuration, the following error is thrown:

Error: An unexpected error occurred. See below for more details.
For support, create a new issue at https://github.com/mbtproject/mbt/issues

not a dag
inner error: not a dag
call stack:
github.com/mbtproject/mbt/e.Wrap /home/travis/gopath/src/github.com/mbtproject/mbt/e/e.go(90)
github.com/mbtproject/mbt/lib.toModules /home/travis/gopath/src/github.com/mbtproject/mbt/lib/discover.go(176)
github.com/mbtproject/mbt/lib.(*stdDiscover).ModulesInWorkspace /home/travis/gopath/src/github.com/mbtproject/mbt/lib/discover.go(126)
github.com/mbtproject/mbt/lib.(*stdManifestBuilder).ByWorkspaceChanges /home/travis/gopath/src/github.com/mbtproject/mbt/lib/manifest_builder.go(105)
github.com/mbtproject/mbt/lib.(*stdSystem).ManifestByWorkspaceChanges /home/travis/gopath/src/github.com/mbtproject/mbt/lib/manifest.go(43)
github.com/mbtproject/mbt/cmd.glob..func13 /home/travis/gopath/src/github.com/mbtproject/mbt/cmd/describe.go(119)
github.com/mbtproject/mbt/cmd.buildHandler.func1 /home/travis/gopath/src/github.com/mbtproject/mbt/cmd/build_handler.go(15)
github.com/mbtproject/mbt/vendor/github.com/spf13/cobra.(*Command).execute /home/travis/gopath/src/github.com/mbtproject/mbt/vendor/github.com/spf13/cobra/command.go(698)
github.com/mbtproject/mbt/vendor/github.com/spf13/cobra.(*Command).ExecuteC /home/travis/gopath/src/github.com/mbtproject/mbt/vendor/github.com/spf13/cobra/command.go(783)
github.com/mbtproject/mbt/vendor/github.com/spf13/cobra.(*Command).Execute /home/travis/gopath/src/github.com/mbtproject/mbt/vendor/github.com/spf13/cobra/command.go(736)
main.main /home/travis/gopath/src/github.com/mbtproject/mbt/main.go(10)
runtime.main /home/travis/.gimme/versions/go1.9.4.linux.amd64/src/runtime/proc.go(195)
runtime.goexit /home/travis/.gimme/versions/go1.9.4.linux.amd64/src/runtime/asm_amd64.s(2337)

(0xbba140,0xc420399bc0)

mbt should be able to identify which module is misconfigured and should throw an appropriate message with it.

@buddhike
Copy link
Member

This error occurs when there are cycling dependencies. I agree, we can display the path of the cycle instead of the cryptic message.

buddhike pushed a commit to buddhike/mbt that referenced this issue Mar 25, 2018
We display path of the cyclic reference in the error message.
This should help the developers to find the misconfigured
module easily and correct the problem.

This change also includes the following changes.
- Simplified the graph interface
- Improved the source file organisation in graph module
- Added tests for complex graphs

Closes mbtproject#42
buddhike pushed a commit that referenced this issue Mar 25, 2018
We display path of the cyclic reference in the error message.
This should help the developers to find the misconfigured
module easily and correct the problem.

This change also includes the following changes.
- Simplified the graph interface
- Improved the source file organisation in graph module
- Added tests for complex graphs

Closes #42
@buddhike
Copy link
Member

@dustyhorizon, Please checkout the build from dev channel and let me know if the new behaviour is satisfactory.

@buddhike
Copy link
Member

Preview can be found here: https://media.giphy.com/media/2wYr5lhgZQKmKobv1Z/giphy.mp4

@dustyhorizon
Copy link
Author

@BuddySpike looking good, thanks!

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

No branches or pull requests

2 participants