Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
de3661a
ocamlmerlin.c: consistent definition of PATHSZ
MisterDA Nov 19, 2025
34decec
ocamlmerlin.c: improve location of socket path
MisterDA Nov 19, 2025
3ec6ccc
Improve passing arrays as parameters
MisterDA Nov 19, 2025
c943d20
ocamlmerlin.c: improve declaration of retrieve_user_sid_string
MisterDA Nov 19, 2025
93e7dee
ocamlmerlin.c: use centralized exit of function with gotos pattern
MisterDA Nov 19, 2025
7a26562
ocamlmerlin.c: don't hard-code size of unix domain socket path
MisterDA Nov 19, 2025
c1affdd
ocamlmerlin.c: cleanly separate Windows and non-Windows code
MisterDA Nov 19, 2025
fc21092
ocamlmerlin.c: improve initialization of struct sockaddr_un
MisterDA Nov 19, 2025
b1e10b2
ocamlmerlin.c: fix unused variable warnings
MisterDA Nov 19, 2025
cc4596f
ocamlmerlin.c: use the cool _Countof op from C2y
MisterDA Nov 19, 2025
b9ce32a
ocamlmerlin.c: fearless booleans
MisterDA Nov 19, 2025
e3d6b06
ocamlmerlin.c: correctly report WinAPI errors
MisterDA Nov 19, 2025
3bdad60
ocamlmerlin.c: use C99-conforming snprintf with mingw+msvcrt
MisterDA Nov 25, 2025
f891206
ocamlmerlin.c: mark some objects as const
MisterDA Nov 25, 2025
0420e41
ocamlmerlin.c: fix sign-compare warnings
MisterDA Nov 25, 2025
2fa3604
ocamlmerlin.c: avoid shadowing and mixing variables
MisterDA Nov 25, 2025
f8db002
ocamlmerlin.c: fix mingw-w64 format-truncation warnings
MisterDA Nov 25, 2025
a51e49f
ocamlmerlin.c: we're going to need a bigger buffer
MisterDA Dec 1, 2025
bfadec9
os_ipc_stub.c: use C99 for loop
MisterDA Nov 25, 2025
08e02ac
os_ipc_stub.c: fix unused variable warning
MisterDA Nov 25, 2025
9d630be
os_ipc_stub.c: raise ENOMEM if realloc failed
MisterDA Dec 11, 2025
f8357b7
Always use __declspec(import) on environ on Windows
MisterDA Nov 19, 2025
ce32d91
Ensure CMSG accesses are aligned
MisterDA Nov 25, 2025
c9b8319
ocamlmerlin: use Dune to generate the C compiler invocation
MisterDA Nov 25, 2025
393bea5
Don't run Make targets in parallel
MisterDA Nov 25, 2025
fe0a3f8
Update changes
MisterDA Nov 25, 2025
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
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
unreleased
==========

+ merlin binary
- Fix a plethora of minor issues with the C code (#1998)
+ merlin library
- Signature help should not appear on the function name (#1997)
- Fix completion not working for inlined records labels (#1978, fixes #1977)
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ bench:
jq . merl-an_bench/bench.json

.PHONY: all build dev clean test promote bench bench
.NOTPARALLEL:
49 changes: 38 additions & 11 deletions src/frontend/ocamlmerlin/dune
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,55 @@
-open Merlin_analysis
-open Merlin_kernel
-open Merlin_commands)
(modules (:standard \ gen_ccflags))
(libraries merlin-lib.config yojson merlin-lib.analysis merlin-lib.kernel
merlin-lib.utils merlin-lib.os_ipc merlin-lib.ocaml_parsing
merlin-lib.query_protocol merlin-lib.query_commands
merlin-lib.ocaml_typing merlin-lib.ocaml_utils
merlin-lib.commands
unix str))

(executable
(name gen_ccflags)
(modules gen_ccflags)
(libraries str))
; Write one flag per line in the output file

(rule
(enabled_if (= %{ocaml-config:ccomp_type} "cc"))
(action
(progn
(write-file ldlibs "")
(write-file outputexe "-o"))))

(rule
(enabled_if (= %{ocaml-config:ccomp_type} "msvc"))
(action
(progn
(write-file ldlibs "advapi32.lib")
(write-file outputexe "-Fe"))))

(rule
(enabled_if
(and
(= %{ocaml-config:ccomp_type} "cc")
(= %{profile} "dev")))
(action
(write-file cflags "-Wextra\n-Werror")))

(rule
(enabled_if
(and
(= %{ocaml-config:ccomp_type} "msvc")
(= %{profile} "dev")))
(action
(write-file cflags "-WX")))

(rule
(targets pre-flags post-flags)
(deps gen_ccflags.exe)
(action (run %{deps} "%{ocaml-config:ccomp_type}" %{targets})))
(enabled_if
(<> %{profile} "dev"))
(action
(write-file cflags "")))

(rule
(targets ocamlmerlin.exe)
(deps (:c ocamlmerlin.c) pre-flags post-flags)
(action (run %{cc} "%{read-lines:pre-flags}%{targets}" %{c} %{read-lines:post-flags})))
(target ocamlmerlin.exe)
(deps (:c ocamlmerlin.c))
(action (run %{cc} %{read-strings:cflags} %{read:outputexe}%{target} %{c} %{read-strings:ldlibs})))

(install
(package merlin)
Expand Down
17 changes: 0 additions & 17 deletions src/frontend/ocamlmerlin/gen_ccflags.ml

This file was deleted.

Loading
Loading