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

Should check and warn if an action type is not annotated with ActionTypeAttribute #28

Closed
dahlia opened this issue Jan 7, 2019 · 2 comments
Labels
hacktoberfest Newcomer-welcoming issues for Hacktoberfest help wanted Extra attention is needed stale The issue is stale suggestion Suggestion or feature request

Comments

@dahlia
Copy link
Contributor

dahlia commented Jan 7, 2019

It currently crashes without any warning or meaningful error message if an action type is not annotated with ActionTypeAttribute. This behavior can confuse library users whether they are aware that an action should be annotated with the attribute and just miss it or not aware of it at all.

  • We should makeBlockchain<T> to throw a runtime exception (e.g., InvalidActionTypeException) with a well-guided error message if T is not annotated with the attribute.
  • We could write a small Roslyn Analyzer so that this situation is warned at compile-time.

(Reported by @ipdae.)

@dahlia dahlia added the suggestion Suggestion or feature request label Jan 7, 2019
@dahlia
Copy link
Contributor Author

dahlia commented May 27, 2019

Since the patch #169, ActionTypeAttribute has been no more used by all IAction implementations, but only actions used with PolymorphicAction<T>. Currently, a MissingActionTypeException is thrown when an action type which lacks ActionTypeAttribute is passed to PolymorphicAction<T> class. This issue is not closed because we don't have a Roslyn Analyzer to detect this at compile-time.

@dahlia dahlia added hacktoberfest Newcomer-welcoming issues for Hacktoberfest help wanted Extra attention is needed labels Sep 30, 2019
@stale
Copy link

stale bot commented Nov 29, 2019

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@stale stale bot added the stale The issue is stale label Nov 29, 2019
limebell pushed a commit to limebell/libplanet that referenced this issue Jul 7, 2021
…dated-addresses-in-buy-action

Fix bug/Not equal updated addresses in buy action
OnedgeLee pushed a commit to OnedgeLee/libplanet that referenced this issue Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Newcomer-welcoming issues for Hacktoberfest help wanted Extra attention is needed stale The issue is stale suggestion Suggestion or feature request
Projects
None yet
Development

No branches or pull requests

2 participants