Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ jobs:
- os: ubuntu-24.04
ocaml_compiler: ocaml-variants.5.2.1+options,ocaml-option-static
# Reanalyze does not work on OCaml 5.3.0 anymore, therefore run it on 5.2.1
# disabled for now, since Reanalyze will stop working going forward. Can likely be removed entirely soon
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since this is the only use of reanalyze, how about removing it entirely.
No point in bringing it back later, as it would immediately give an error.
CC @cknitt

Copy link
Member Author

Choose a reason for hiding this comment

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

@cknitt you agree? I'll remove it before merging this, if so.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, go ahead!

run_reanalyze: false
- os: ubuntu-24.04
ocaml_compiler: ocaml-variants.5.0.0+options,ocaml-option-static
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
- Add `inert` attribute to `JsxDOM.domProps`. https://github.com/rescript-lang/rescript/pull/7326
- Make reanalyze exception tracking work with the new stdlib. https://github.com/rescript-lang/rescript/pull/7328
- Fix Pervasive.max using boolean comparison for floats. https://github.com/rescript-lang/rescript/pull/7333
- Support nested/inline record types - records defined inside of other records, without needing explicit separate type definitions. https://github.com/rescript-lang/rescript/pull/7241
- Experimental: Support nested/inline record types - records defined inside of other records, without needing explicit separate type definitions. https://github.com/rescript-lang/rescript/pull/7241

#### :boom: Breaking Change

Expand Down
2 changes: 2 additions & 0 deletions analysis/src/Hover.ml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ let expandTypes ~file ~package ~supportsMarkdownLinks typ =
| {decl; path} :: _
when Res_parsetree_viewer.has_inline_record_definition_attribute
decl.type_attributes ->
(* We print inline record types just with their definition, not the constr pointing
to them, since that doesn't make sense to show the user. *)
( [
Markdown.codeBlock
(decl
Expand Down
1 change: 1 addition & 0 deletions compiler/ml/printtyp.ml
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,7 @@ let rec tree_of_typexp ?(printing_context : printing_context option) sch ty =
find_inlined_type (Path.name p) printing_context |> Option.get
with
| Record {labels} ->
(* Print inlined records as actual inlined record structures, not a reference to the inlined type only. *)
Otyp_record (List.map (tree_of_label ?printing_context) labels))
| Tconstr (p, tyl, _abbrev) ->
let p', s = best_type_path p in
Expand Down
1 change: 1 addition & 0 deletions compiler/ml/printtyp.mli
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ open Types
open Outcometree

type printing_context = {inlined_types: type_inlined_type list}
(** Tracks things like inlined records, to help with printing. *)

val print_res_poly_identifier : (string -> string) ref
val longident : formatter -> Longident.t -> unit
Expand Down