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

Prepare release of merlin 5.1-502 #1784

Merged
merged 5 commits into from
Jun 18, 2024
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
3 changes: 2 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
UNRELEASED
merlin 5.1
==========
Tue Jun 18 12:00:42 CEST 2024

+ merlin binary
- Support project-wide occurrences queries using index files (#1766)
Expand Down
4 changes: 4 additions & 0 deletions merlin.opam
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ depends: [
"dune" {>= "3.0.0"}
"merlin-lib" {= version}
"dot-merlin-reader" {>= "5.0"}
"ocaml-index" {>= "1.0" & post}
"yojson" {>= "2.0.0"}
"conf-jq" {with-test}
"ppxlib" {with-test}
Expand Down Expand Up @@ -70,3 +71,6 @@ See https://github.com/OCamlPro/opam-user-setup
"
{success & !user-setup:installed}
]
pin-depends: [
["ocaml-index.1.0" "git+https://github.com/voodoos/ocaml-index#82b08987921884daeeb5dccc345a2dcb667fe113"]
]
3 changes: 2 additions & 1 deletion src/analysis/occurrences.ml
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,9 @@ let locs_of ~config ~env ~typer_result ~pos ~scope path =
log ~title:"occurrences" "Found %i locs" (Lid_set.cardinal locs);
Lid_set.elements locs
|> List.filter_map ~f:(fun {Location.txt; loc} ->
let lid = try Longident.head txt with _ -> "not flat lid" in
log ~title:"occurrences" "Found occ: %s %a"
(Longident.head txt) Logger.fmt (Fun.flip Location.print_loc loc);
lid Logger.fmt (Fun.flip Location.print_loc loc);
let loc = last_loc loc txt in
let fname = loc.Location.loc_start.Lexing.pos_fname in
if not (Filename.is_relative fname) then Some loc else
Expand Down
Loading