Fix not working --no-missing-ricardian-clause#1197
Fix not working --no-missing-ricardian-clause#1197conr2d wants to merge 2 commits intoEOSIO:developfrom
Conversation
tools/include/eosio/abigen.hpp
Outdated
| public: | ||
| explicit eosio_abigen_visitor(CompilerInstance *CI) { | ||
| get_error_emitter().set_compiler_instance(CI); | ||
| set_suppress_ricardian_warning(ag.suppress_ricardian_warnings); |
There was a problem hiding this comment.
I don't think you need this one. suppress_ricardian_warnings above is taken from abigen
There was a problem hiding this comment.
Yes, when I wrote this patch, eosio_abigen_visitor called eosio_abigen_visitor::parse_contracts instead of abigen::parse_contracts. This is obsolete now.
There was a problem hiding this comment.
got it. Yes, After some refactoring ricardian contracts generation was broken and recently it was fixed including this warning suppression.
So now other then correcting warning message there is nothing to do. Anyway if you'll add toolchain tests for this warning it will be helpful for future
| // TODO | ||
| std::cout << "Warning, action <"+get_action_name(decl)+"> does not have a ricardian contract\n"; | ||
| if (!suppress_ricardian_warnings) | ||
| CDT_CHECK_WARN(!rcs[get_action_name(decl)].empty(), "abigen_warning", decl->getLocation(), "Action <"+get_action_name(decl)+"> does not have a ricardian contract"); |
There was a problem hiding this comment.
what is the difference? Does it now outputs to stderr instead of stdout?
There was a problem hiding this comment.
Duplicated code. It seems original author intended replacing stdout warning message with CDT_CHECK_WARN macro when macro is implemented, but just added rather than replace it.
|
thanks for your contribution. basically you need just to create dummy contract with same name and check stderr/stdout in json. you can use regexp there. |
5accc84 to
ada19a0
Compare
Change Description
This PR makes
--no-missing-ricardian-clausecompile option work correctly.API Changes
Documentation Additions