Skip to content

Conversation

@davesnx
Copy link
Member

@davesnx davesnx commented Sep 4, 2023

Previously to remove the legacy APIs I want to make sure we don't rely on those on the ppx. I'm doing this small abstraction to have an easy way to know which bindings we use from the ppx and improving a big the quality of this beast.

This refactor should be harmless. I have tested the location test and seems ok.

  • Abstract bindings into Binding
  • Remove Ast_helper usages

Comment on lines 755 to 758
(pos_bol 0) (pos_cnum 18)))
(loc_end
((pos_fname generated_locations.ml) (pos_lnum 1)
(pos_bol 0) (pos_cnum 23)))
(pos_bol 0) (pos_cnum 65)))
Copy link
Collaborator

Choose a reason for hiding this comment

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

These are pretty big changes, do you know what happened?


let componentLike ~loc props return =
Ptyp_constr
( { loc; txt = Ldot (Lident "React", "componentLike") },
Copy link
Collaborator

Choose a reason for hiding this comment

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

This and ReactDOM.domProps are types, not bindings. But I guess it is ok :)

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess it's fine, right?

Maybe Bindings.Types.* is an overkill?

davesnx and others added 3 commits September 5, 2023 10:21
Co-authored-by: Javier Chávarri <javier.chavarri@gmail.com>
…legacy-apis

* 'main' of github.com:/reasonml/reason-react:
  test: add merlin test for key prop (#771)
  Migrate snapshot to cram (#767)
  Allow memoCustomCompareProps on ppx (#766)
@davesnx davesnx mentioned this pull request Sep 6, 2023
* main:
  Remove ReactDOM.props (#764)
  update package-lock.json (#772)
@davesnx davesnx merged commit 0d45bd2 into main Sep 7, 2023
@davesnx davesnx deleted the Remove-legacy-apis branch September 7, 2023 15:23
davesnx added a commit that referenced this pull request Sep 7, 2023
…-test-for-inference-regression

* 'main' of github.com:/reasonml/reason-react:
  Abstract bindings on ppx (#768)
  Remove ReactDOM.props (#764)
  update package-lock.json (#772)
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