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

Fix installation and tests #744

Merged
merged 3 commits into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ format-check: ## Checks if format is correct
.PHONY: install
install: ## Update the package dependencies when new deps are added to dune-project
@opam pin add -y melange --dev-repo
@opam pin add -y dune --dev-repo
@opam install . --deps-only --with-test
@npm install

Expand Down
2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(lang dune 3.8)
(lang dune 3.9)
Copy link
Member

Choose a reason for hiding this comment

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

This change is clearly requiring 3.9

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, thought you talked about Reason, not dune.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

But melange only requires dune 3.8

Copy link
Member Author

Choose a reason for hiding this comment

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

The current state of this repo is very broken, since it requires melange master and Reason 3.9.0 for the snapshot testing + the reason-react-ppx from the repo

So there should be a few things to un-tangle before we can even publish newer versions


(using melange 0.1)

Expand Down
236 changes: 83 additions & 153 deletions ppx/test/output.expected

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions ppx/test/react.t
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ Demonstrate how to use the React JSX PPX
// Generated by Melange
'use strict';

var Belt_List = require("melange.belt/belt_List.js");
var Belt__Belt_List = require("melange.belt/belt_List.js");
var JsxRuntime = require("react/jsx-runtime");

function X$App(Props) {
return Belt_List.toArray(Belt_List.map({
return Belt__Belt_List.toArray(Belt__Belt_List.map({
hd: "Hello!",
tl: {
hd: "This is React!",
Expand Down
2 changes: 1 addition & 1 deletion reason-react-ppx.opam
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ homepage: "https://reasonml.github.io/reason-react"
doc: "https://reasonml.github.io/reason-react"
bug-reports: "https://github.com/reasonml/reason-react/issues"
depends: [
"dune" {>= "3.8"}
"dune" {>= "3.9"}
"ocaml" {>= "4.13.0"}
"reason" {>= "3.6.0"}
"ppxlib" {>= "0.28.0"}
Expand Down
2 changes: 1 addition & 1 deletion reason-react.opam
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ homepage: "https://reasonml.github.io/reason-react"
doc: "https://reasonml.github.io/reason-react"
bug-reports: "https://github.com/reasonml/reason-react/issues"
depends: [
"dune" {>= "3.8"}
"dune" {>= "3.9"}
"ocaml" {>= "4.13.0"}
"melange" {>= "1.0.0"}
"reason-react-ppx"
Expand Down
3 changes: 1 addition & 2 deletions test/dune
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
(melange.emit
(alias runtest)
(target test)
(package reason-react)
(module_systems
(commonjs bs.js))
(libraries reason_react jest)
(libraries reason-react jest)
(preprocess
(pps melange.ppx reason-react-ppx)))