Skip to content

Commit

Permalink
clear vendor directory when installing lsp
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg committed Oct 17, 2020
1 parent 157ccb1 commit 80d7c3f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Unreleased

- Do not use vendored libraries when building the lsp package (#260)

# 1.1.0 (10/14/2020)

## Features
Expand Down
1 change: 1 addition & 0 deletions lsp.opam.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
build: [
["ocaml" "unvendor.ml"]
["dune" "subst"] {pinned}
[
"dune"
Expand Down
11 changes: 11 additions & 0 deletions unvendor.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
let rec rm_rf path =
if Sys.is_directory path then (
clear path;
Unix.rmdir path
) else
Unix.unlink path

and clear path =
Sys.readdir path |> Array.iter (fun name -> rm_rf (Filename.concat path name))

let () = clear "./vendor"

0 comments on commit 80d7c3f

Please sign in to comment.