Skip to content
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
15 changes: 3 additions & 12 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ make setup # once: the switch solidtype, all dependencies, and
# Bun's
make test # the ppx's lowering, the plugin's rewrite, the
# libraries' tests and the example's
make lint # formatting, the plugin's and the generators' types, the
# release build, and the generated bindings
make lint # formatting, the plugin's and the generators' types,
# litany, the release build, and the generated bindings
make fmt # format in place
make example # the board, built by Vite into _build/example-dist, and
# its Astro page, into _build/example-astro
Expand All @@ -34,7 +34,7 @@ make docs # the documentation site, odoc's reference copied into
# as .github/workflows/docs.yml publishes it from main
make docs-serve # the documentation site built, served on DOCS_PORT with
# search
make release VERSION=1.2.3 # once CHANGES.md names it: tag and release with open-opam
make release VERSION=1.2.3 # tag and release
```

The plugin and the example run on Bun 1.3 or later: JavaScript here only
Expand Down Expand Up @@ -282,9 +282,6 @@ test/does_not_compile.t
installed library, with the error a user reads
```

Each module's contract is its `.mli`. Read the `.mli` before changing a
module.

## The pipeline

MLX parses `.mlx` into OCaml with each element marked `[@JSX]`.
Expand Down Expand Up @@ -689,12 +686,6 @@ break.
a test in TypeScript would reach a component through the names Melange
emits. Symptom: a `.test.ts` or `.test.tsx` that imports an OCaml
module.
- **The opens are the ppx's `Ppxlib`**, which every ppxlib rewriter opens
to build the AST it writes, and its `Result.Syntax`, whose `let*` chains
the results it builds, **and a test library's `Syntax`**
(`Testing.Syntax`, `Harness.Syntax`), whose `let*` awaits a promise as
`MELANGE.md` lets a test. Symptom: `rg -n '^\s*open ' src ppx example
test | rg -v 'open (Ppxlib|Syntax|\w+\.Syntax)$'` finds any other.

## Changes and releases

Expand Down
8 changes: 8 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changes

## 0.11.1 (2026-11-16)

- The code `ppx_solidtype` writes around a component's tag, the `if false`
that holds its props to `Props.check`, is at a ghost location, so a linter
reading the typed tree no longer reports a literal condition at every tag.
- `Theme`'s storage catches the browser's throw alone, `Js.Exn.Error`, and
no longer an OCaml exception raised beside it.

## 0.11.0 (2026-11-15)

- In JSX a value is written as itself, and Solid keeps it current, as its
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ test: build node_modules ## run the tests
$(OPAM) bun run test

# Release is the profile opam installs with.
lint: node_modules ## check formatting, types, the release build and bindings
lint: node_modules ## check formatting, types, litany, the release build and bindings
$(OPAM) dune build @all @fmt
$(OPAM) dune build --profile release @all
$(OPAM) litany check
bun run tsc -p vite-plugin
bun run tsc -p generate
$(OPAM) bun generate/html.ts --check
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ GitHub release:
"solid-js": "~1.9.17",
"vite": "^8.3.0",
"vite-plugin-solid": "^2.11.14",
"vite-plugin-solidtype": "https://github.com/hyphatech/solidtype/releases/download/0.11.0/vite-plugin-solidtype-0.11.0.tgz"
"vite-plugin-solidtype": "https://github.com/hyphatech/solidtype/releases/download/0.11.1/vite-plugin-solidtype-0.11.1.tgz"
}
}
```
Expand Down
7 changes: 6 additions & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,12 @@
(ocamlformat-mlx
(and
:with-dev-setup
(= 0.29.0.1)))))
(= 0.29.0.1)))
(hypha-litany
(and
:with-dev-setup
(>= 1.2.2)
(< 2.0.0)))))

(package
(name solidtype-kobalte)
Expand Down
4 changes: 2 additions & 2 deletions generate/binding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export type Library = {
// already an optional prop's absence; undefined for any other, which the
// core maps by its rules.
ported?: (symbol: ts.Symbol, args: Type[], absent: boolean) => Type | undefined;
// Whether a number is a small whole one where it is met, by where: an int,
// as MELANGE.md lets a binding that knows it; a float anywhere else.
// Whether a number is a small whole one where it is met, by where: an int
// where the binding knows it fits 32 bits; a float anywhere else.
whole?: (where: string) => boolean;
// The classes whose values are one type of Types, Value, a kind each, and
// the structural interfaces they satisfy: a union of the classes, or one of
Expand Down
2 changes: 1 addition & 1 deletion heroui/autocomplete.mlx
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ let%component make ?(placeholder : string = "Select an item")
Aria's does; an autocomplete opens with no option at all only by
[allows_empty_collection]. *)
let open_refused o =
o && (not (S.get allows_empty_collection)) && List.length (options ()) = 0
o && (not (S.get allows_empty_collection)) && List.is_empty (options ())
in
match mode with
| `single ->
Expand Down
6 changes: 4 additions & 2 deletions heroui/theme.ml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ external set_attribute : Dom.element -> string -> string -> unit
let stored () =
match get_item storage_key with
| value -> Js.Null.toOption value
| exception _ -> None
| exception Js.Exn.Error _ -> None

let store theme =
match set_item storage_key theme with () -> () | exception _ -> ()
match set_item storage_key theme with
| () -> ()
| exception Js.Exn.Error _ -> ()

type t = {
theme : string S.accessor;
Expand Down
8 changes: 8 additions & 0 deletions litany
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
(lint
(select default)
(extend open-of-ordinary-module))

(per-path
(paths heroui/toggle_button_group.mlx)
(ignore suspicious-physical-equality)
(reason "a button leaving the group removes its own accessor: identity is the point"))
Loading
Loading