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 duplicate operations error a failing error #1812

Merged
merged 3 commits into from
Feb 26, 2020

Conversation

JakeDawkins
Copy link
Contributor

@JakeDawkins JakeDawkins commented Feb 24, 2020

This PR aims to fix an issue where some users are pushing client code that errors because the error notifying users of duplicate client operation names doesn't exit appropriately.

the previous error, just told users that duplicate operations aren't permitted in client projects, but never actually enforced that as it should have. This PR should fix that behavior.

TODO:

  • Update CHANGELOG.md* with your change (include reference to issue & this PR)
  • Make sure all of the significant new logic is covered by tests
  • Rebase your changes on master so that they can be merged easily
  • Make sure all tests and linter rules pass

*Make sure changelog entries note which project(s) has been affected. See older entries for examples on what this looks like.

Copy link

@mgeraci mgeraci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So moving contents/documents/documentDidChange out of the try block causes the whole command to exit with an error? That's perfect!

@JakeDawkins
Copy link
Contributor Author

I believe this is good to go, so I'm gonna give it a merge and minor release.

I tested manually with client:push and client:check and verified it failed both before trying to actually run the operation (which is what we want).

I think this error could be cleaned up (as right now it's a very unfriendly format when it's output), potentially even as a step on client:* commands, but as for right now, I think that work would be best pushed to a major, since it'd require reworking the project loading as well as VS Code errors a bit.

@JakeDawkins JakeDawkins merged commit 8b07093 into master Feb 26, 2020
@JakeDawkins JakeDawkins deleted the jake/fix-exit-when-loading-error branch February 26, 2020 14:57
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

Successfully merging this pull request may close these issues.

2 participants