Skip to content

5.1.0.dev-2 regressions #3695

@Coobaha

Description

@Coobaha

Hi, I've tried [email protected]

and it seems that it has regression (or breaking changes)?

i've spoted two:

  1. for
[@genType.import "common/components/ButtonV2"] [@react.component]
external make: (~className: string=?) => React.element = "default";

gentype generates

  readonly className?: (null | undefined | string); 

makes TS mad, correct output before was

  readonly className?: string; 
  1. Another issue is with bs-reform. It has interface files, which don't match implementation with new version of bsb
[21/21] Failure:Building ~/bs-platform/lib/ninja.exe 
 src/ReForm.cmj
 Location: ~/bs-reform/lib/bs

  We've found a bug for you!
  ~/bs-reform/src/ReForm.re
  
  The implementation src/ReForm.mlast
       does not match the interface src/reForm.cmi:
       ...
       At position module Create(Config) : <here>
       Values do not match:
         [@bs...] external makeProps:
           (~onSubmit: onSubmit => unit,
           ~onSubmitFail: list((Config.fields, option(string))) => unit=?,
           ~onFormStateChange: state => unit=?,
           ~validate: values => option(string)=?,
           ~initialState: Config.state, ~schema: schema,
           ~i18n: Validation.I18n.dictionary=?, ~children: 'children,
           ~key: string=?, unit) =>
           {. "children": 'children,
             "i18n": option(Validation.I18n.dictionary),
             "initialState": Config.state,
             "onFormStateChange": option(state => unit),
             "onSubmit": onSubmit => unit,
             "onSubmitFail": option(list((Config.fields, option(string))) =>
                                    unit),
             "schema": schema, "validate": option(values => option(string))}
           = ""
       is not included in
         [@bs...] external makeProps:
           (~onSubmit: onSubmit => unit,
           ~onSubmitFail: list((Config.fields, option(string))) => unit=?,
           ~onFormStateChange: state => unit=?,
           ~validate: values => option(string)=?,
           ~initialState: Config.state, ~schema: schema,
           ~i18n: Validation.I18n.dictionary=?,
           ~children: reform => ReasonReact.reactElement, ~key: string=?,
           unit) =>
           {. "children": reform => ReasonReact.reactElement,
             "i18n": option(option(Validation.I18n.dictionary)),
             "initialState": Config.state,
             "onFormStateChange": option(option(state => unit)),
             "onSubmit": onSubmit => unit,
             "onSubmitFail": option(option(list((Config.fields,
                                                option(string))) =>
                                           unit)),
             "schema": schema,
             "validate": option(option(values => option(string)))}
           = ""
       File "~/bs-reform/src/ReForm.re", line 95, characters 4-19:
         Actual declaration
  

ReForm.rei part:

 [@react.component]
    let make:
      (
        ~onSubmit: onSubmit => unit,
        ~onSubmitFail: list((Config.fields, option(string))) => unit=?,
        ~onFormStateChange: state => unit=?,
        ~validate: values => option(string)=?,
        ~initialState: Config.state,
        ~schema: schema,
        ~i18n: Validation.I18n.dictionary=?,
        ~children: reform => ReasonReact.reactElement
      ) => React.element

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions