Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
3176731
ocamlmerlin.c: consistent definition of PATHSZ
MisterDA Nov 19, 2025
ca6d582
ocamlmerlin.c: improve location of socket path
MisterDA Nov 19, 2025
5ed30b1
Improve passing arrays as parameters
MisterDA Nov 19, 2025
19ff5e5
ocamlmerlin.c: improve declaration of retrieve_user_sid_string
MisterDA Nov 19, 2025
c041cae
ocamlmerlin.c: use centralized exit of function with gotos pattern
MisterDA Nov 19, 2025
ce0eba7
ocamlmerlin.c: don't hard-code size of unix domain socket path
MisterDA Nov 19, 2025
be07c27
ocamlmerlin.c: cleanly separate Windows and non-Windows code
MisterDA Nov 19, 2025
dd89e7f
ocamlmerlin.c: improve initialization of struct sockaddr_un
MisterDA Nov 19, 2025
1fb0e32
Always use __declspec(import) on environ on Windows
MisterDA Nov 19, 2025
11f0b1e
ocamlmerlin.c: fix unused variable warnings
MisterDA Nov 19, 2025
3a90936
ocamlmerlin.c: use the cool _Countof op from C2y
MisterDA Nov 19, 2025
dc3157a
ocamlmerlin.c: fearless booleans
MisterDA Nov 19, 2025
975620d
ocamlmerlin.c: correctly report WinAPI errors
MisterDA Nov 19, 2025
6eb3e38
ocamlmerlin.c: use C99-conforming snprintf with mingw+msvcrt
MisterDA Nov 25, 2025
168075e
ocamlmerlin.c: mark some objects as const
MisterDA Nov 25, 2025
a3d7fc3
ocamlmerlin.c: fix sign-compare warnings
MisterDA Nov 25, 2025
a685d6e
ocamlmerlin.c: avoid shadowing and mixing variables
MisterDA Nov 25, 2025
3574d92
os_ipc_stub.c: use C99 for loop
MisterDA Nov 25, 2025
73783e1
Ensure CMSG accesses are aligned
MisterDA Nov 25, 2025
1cbfab6
ocamlmerlin.c: fix mingw-w64 format-truncation warnings
MisterDA Nov 25, 2025
f0845c7
ocamlmerlin: use Dune to generate the C compiler invocation
MisterDA Nov 25, 2025
9d003f5
os_ipc_stub: fix unused variable warning
MisterDA Nov 25, 2025
9ff80ee
Don't run Make targets in parallel
MisterDA Nov 25, 2025
4a3dd2f
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
- Fix completion not working for inlined records labels (#1978, fixes #1977)
- Perform buffer indexing only if the query requires it (#1990 and #1991)
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