-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from mbarbin/commandlang
Assorted changes - prepare 0.0.5
- Loading branch information
Showing
270 changed files
with
1,294 additions
and
769 deletions.
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Vcs - a Versatile OCaml Library for Git Interaction | ||
Vcs - a Versatile OCaml Library for Git Operations | ||
Copyright (C) 2024 Mathieu Barbin <[email protected]> | ||
|
||
This file is part of Vcs. | ||
|
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
(*******************************************************************************) | ||
(* Vcs - a Versatile OCaml Library for Git Interaction *) | ||
(* Vcs - a Versatile OCaml Library for Git Operations *) | ||
(* Copyright (C) 2024 Mathieu Barbin <[email protected]> *) | ||
(* *) | ||
(* This file is part of Vcs. *) | ||
|
@@ -19,4 +19,15 @@ | |
(* <http://www.gnu.org/licenses/> and <https://spdx.org>, respectively. *) | ||
(*******************************************************************************) | ||
|
||
let () = Command_unix_for_opam.run Vcs_command.main | ||
let () = | ||
Commandlang_to_cmdliner.run | ||
Vcs_command.main | ||
~name:"ocaml-vcs" | ||
~version:"%%VERSION%%" | ||
~exn_handler:(function | ||
| Vcs.E e -> | ||
Some | ||
(Commandlang_err.Err.make | ||
[ Commandlang_err.Err.pp_of_sexp (Vcs.Err.sexp_of_t e) ]) | ||
| _ -> None [@coverage off]) | ||
;; |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
mbarbin: | ||
name: Mathieu Barbin | ||
title: Maintainer of ocaml-vcs | ||
title: Author & Maintainer of ocaml-vcs | ||
url: https://github.com/mbarbin | ||
image_url: https://github.com/mbarbin.png |
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 |
---|---|---|
@@ -1,33 +1,17 @@ | ||
# The Power of Traits in `Vcs` | ||
|
||
The `Vcs` library leverages the `provider`-based parametric model to offer a | ||
flexible and adaptable interface for Git interaction. This model, also used in | ||
the `Eio` library (`Eio.Resource`), allows us to define small scopes of | ||
functionality, or `Traits`, within the `Vcs` library. | ||
The `Vcs` library leverages the `provider`-based parametric model to offer a flexible and adaptable interface for Git operations. This model, also used in the `Eio` library (`Eio.Resource`), allows us to define small scopes of functionality, or `Traits`, within the `Vcs` library. | ||
|
||
## Experience with `providers` | ||
|
||
Our use of the [provider](https://github.com/mbarbin/provider) based parametric | ||
library in `Vcs` serves as a practical, real-world case study of this pattern. | ||
Our use of the [provider](https://github.com/mbarbin/provider) based parametric library in `Vcs` serves as a practical, real-world case study of this pattern. | ||
|
||
We aim to bring this pattern to the attention of the community, fostering a | ||
general understanding that can be applied to other projects using the same | ||
pattern. In essence, understanding the parametrized model of `Vcs` equates to | ||
understanding `Eio.Resource`, and vice versa. | ||
We aim to bring this pattern to the attention of the community, fostering a general understanding that can be applied to other projects using the same pattern. In essence, understanding the parametrized model of `Vcs` equates to understanding `Eio.Resource`, and vice versa. | ||
|
||
## Granularity of the Interface via Trait Granularity | ||
|
||
The `Trait` design of `provider` allows us to define specific and isolated | ||
sub-functionalities within the `Vcs` library. This granularity enables different | ||
providers to choose which `Trait` they wish to implement, offering a level of | ||
flexibility not possible with a monolithic functor. | ||
The `Trait` design of `provider` allows us to define specific and isolated sub-functionalities within the `Vcs` library. This granularity enables different providers to choose which `Trait` they wish to implement, offering a level of flexibility not possible with a monolithic functor. | ||
|
||
With `Traits`, you can select a provider with the specific set of traits you | ||
need, without changing any other code. As explained | ||
[here](https://mbarbin.github.io/provider/provider/Provider/Interface/index.html#type-t), | ||
provider interfaces come with some notion of phantom types, offering additional | ||
compiler assistance. | ||
With `Traits`, you can select a provider with the specific set of traits you need, without changing any other code. As explained [here](https://mbarbin.github.io/provider/provider/Provider/Interface/index.html#type-t), provider interfaces come with some notion of phantom types, offering additional compiler assistance. | ||
|
||
In summary, the use of `Traits` in `Vcs` provides a flexible, adaptable, and | ||
granular interface for Git interaction, promoting a broader understanding and | ||
application of the `provider`-based parametric model. | ||
In summary, the use of `Traits` in `Vcs` provides a flexible, adaptable, and granular interface for Git operations, promoting a broader understanding and application of the `provider`-based parametric model. |
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
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.