Skip to content

Merge 11.0_release into master #6832

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

Merged
merged 13 commits into from
Jun 27, 2024
Merged

Conversation

cknitt
Copy link
Member

@cknitt cknitt commented Jun 26, 2024

Consolidates git history and CHANGELOG after 11.1.2 release.

cknitt and others added 13 commits June 16, 2024 07:35
The location of let bindings did not include annotations attached to the binding (for the first binding in a sequence).

This would show up in actions for dead code elimination in the editor tooling, which would remove everything but the annotation: rescript-lang/rescript-vscode#991
* PPX v4: mark props type in externals as `@live`.

Fixes rescript-lang/rescript-vscode#994

Dead code elimination in the editor tooling complains about props never being read in the `props` type record defined by the V4 ppx.
This is because externals don't provide the implementation of the component, and it's in the implementation that props could be read.
This OR marks the `props` type definition as `@live` for external components, so the dead code analysis does not fire.

* Update CHANGELOG.md
When disambiguating record types, there's a check that all the labels are supplied when constructing a record.
While not supplying all the labels is supported in case of optional labels, the order of disambiguation is affected by the presence of optional labels.

Example:

```res
type t1 = {x:int, y:int}
type t2 = {x:int, y:int, z?:int}

let v = {x:3, y:4}
```

Currently `v` has type `t1`, while it's perfectly fine for it to have type `t2`.
In particular, the normal shadowing behaviour that applies without optional labels, does not happen. (If you remove `z` from the second type definition, then the normal shadowing happens, and `v` gets type `t2`.

This wip changes the disambiguation so that supplying at least all the mandatory labels is enough in disambiguation.

The change also addresses the issue rescript-lang#6752 of spurious warning of unused open.

# Conflicts:
#	CHANGELOG.md
#	jscomp/test/build.ninja
The type Jsx.element can show user-side in ppx V4 (at least), and affects gentype too.
It special-cases `React.element`, and needs to then special-case `Jsx.element` too.

Fixes rescript-lang#6807

# Conflicts:
#	CHANGELOG.md
rescript-lang#6669)

* POC print variant runtime repr

As in `type t = @as(undefined) A`

Triggered in error message:

```res
Type declarations do not match:
    type t = @as(undefined) A
  is not included in
    type t = @as(null) A
```

* Print @unboxed for variants and check inclusion correctly.

- Print `@unboxed` in the variant type declaration in the outcome printer.
- Fix issue where attributes such as `@unboxed` were printed twice.
- Fix issue where inconsistency in `@unboxed` in variant declarations between implementation and interface was not chedked.

* snake case

* Changelog and test.

* Bump rescript-core for playground bundling.
@cknitt cknitt requested a review from fhammerschmidt June 26, 2024 19:35
@cknitt cknitt merged commit 88c6ba6 into rescript-lang:master Jun 27, 2024
19 checks passed
@cknitt cknitt deleted the 11-to-master branch June 27, 2024 06:38
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.

3 participants