-
Notifications
You must be signed in to change notification settings - Fork 89
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
Driver: Read a config file to apply the right -P
and -L
.
#1194
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
7508b6e
Driver: add global config to the package type
panglesd d66bb6a
Driver: Follow convention when computing `pkg_arg`
panglesd 31ae731
Fix typo in error message
panglesd eda4751
Driver: add debugging utilities
panglesd da898e1
Driver: Add instructions to test the pkg_args values
panglesd bd9df7f
Disable config file test for odoc_driver
panglesd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,7 @@ depends: [ | |
"eio_main" | ||
"progress" | ||
"cmdliner" | ||
"sexplib" | ||
] | ||
|
||
build: [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,5 @@ | |
logs | ||
logs.fmt | ||
eio_main | ||
sexplib | ||
odoc_utils)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
open Sexplib0 | ||
|
||
type deps = { packages : string list; libraries : string list } | ||
|
||
type t = { deps : deps } | ||
|
||
module Ast = struct | ||
type item = Libraries of string list | Packages of string list | ||
|
||
type t = item list | ||
end | ||
|
||
let parse_string_list sexps = | ||
List.filter_map (function Sexp.Atom s -> Some s | _ -> None) sexps | ||
|
||
let parse_entry (sexp : Sexp.t) = | ||
match sexp with | ||
| Atom _ -> None | ||
| List (Atom "libraries" :: libraries) -> | ||
Some (Ast.Libraries (parse_string_list libraries)) | ||
| List (Atom "packages" :: pkgs) -> | ||
Some (Ast.Packages (parse_string_list pkgs)) | ||
| _ -> None | ||
|
||
let of_ast (ast : Ast.t) = | ||
let libs, pkgs = | ||
List.fold_left | ||
(fun (libs, pkgs) item -> | ||
match item with | ||
| Ast.Libraries l -> (l :: libs, pkgs) | ||
| Ast.Packages l -> (libs, l :: pkgs)) | ||
([], []) ast | ||
in | ||
let libraries, packages = | ||
let f x = x |> List.concat |> List.sort_uniq String.compare in | ||
(f libs, f pkgs) | ||
in | ||
{ deps = { libraries; packages } } | ||
|
||
let parse s = | ||
let entries = Sexplib.Sexp.of_string_many s in | ||
let ast = List.filter_map parse_entry entries in | ||
of_ast ast | ||
|
||
let empty = { deps = { libraries = []; packages = [] } } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
type deps = { packages : string list; libraries : string list } | ||
|
||
type t = { deps : deps } | ||
|
||
val empty : t | ||
|
||
val parse : string -> t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These will be used for both pages and modules ? I think that's fine. My initial idea was that the new dependencies will be specified on the
(documentation)
stanza and it might be weird that they also affect modules. It seems that this will be defined indune-project
instead, which is fine.