Defining custom Attributes with tablegen

Hello. I’m having problems when defining custom attribute via tablegen. I was using the earlier version of MLIR and after updating MLIR I get the following message (when trying to construct MLIR module):
error: dialect ‘hil’ provides no attribute parsing hook
Attribute definition:

class HIL_Attr<string name, string attrMnemonic, list<Trait> traits = []>
    : AttrDef<HIL_Dialect, name, traits> { 
  let mnemonic = attrMnemonic;  

def PortAttr : HIL_Attr<"Port", "port"> {
  let summary = "Port attribute";

  let description = [{
    port arg type

  let parameters = (ins

  let hasCustomAssemblyFormat = 1;

I have defined the corresponding print and parse functions for this Attribute and it worked fine in the previous version of MLIR. Am I missing something?

The error should come from this code snippet in lib/IR/Dialect.cpp:

 /// Parse an attribute registered to this dialect.
 Attribute Dialect::parseAttribute(DialectAsmParser &parser, Type type) const {
       << "dialect '" << getNamespace()
       << "' provides no attribute parsing hook";
   return Attribute();

Maybe something went wrong with your parser?

Thank you for your reply.
Am I to understand that you see nothing wrong with that tablegen code?
This mistake appeared only recently: after migrating to a new version of MLIR. It worked fine in the previous version.

Make sure your dialect has let useDefaultAttributePrinterParser = 1;

Thank you very much! It solved the problem.