Skip to content

Expose store root and cmdliner term with non-required store#119

Merged
tmcgilchrist merged 2 commits intoocurrent:masterfrom
MisterDA:non-req-cmdliner
Oct 14, 2022
Merged

Expose store root and cmdliner term with non-required store#119
tmcgilchrist merged 2 commits intoocurrent:masterfrom
MisterDA:non-req-cmdliner

Conversation

@MisterDA
Copy link
Copy Markdown
Contributor

@MisterDA MisterDA commented Sep 9, 2022

This allows configuring the OBuilder store fully inside the library and not using the store spec externally. I could add an interface to limit the exposed functions to the type and the cmdliner term.

Comment on lines +50 to +56
let store' =
Arg.value @@
Arg.opt Arg.(some store_t) None @@
Arg.info
~doc:"$(docv) must be one of $(b,btrfs:/path), $(b,rsync:/path) or $(b,zfs:pool) for the OBuilder cache."
~docv:"STORE"
["obuilder-store"]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There doesn't seem to be a reason to have 2 copies of this code.

Suggested change
let store' =
Arg.value @@
Arg.opt Arg.(some store_t) None @@
Arg.info
~doc:"$(docv) must be one of $(b,btrfs:/path), $(b,rsync:/path) or $(b,zfs:pool) for the OBuilder cache."
~docv:"STORE"
["obuilder-store"]
let store =
Arg.opt Arg.(some store_t) None @@
Arg.info
~doc:"$(docv) must be one of $(b,btrfs:/path), $(b,rsync:/path) or $(b,zfs:pool) for the OBuilder cache."
~docv:"STORE"
["store"]

then combining it with Arg.value or Arg.required at the call site.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There doesn't seem to be a reason to have 2 copies of this code.

I also want to keep the option --obuilder-store for current compatibility with ocluster-worker. Maybe the API should expose the names of the option?

To avoid code duplication with the users of OBuilder as a library
(think ocluster-worker).
@tmcgilchrist tmcgilchrist merged commit 1190d70 into ocurrent:master Oct 14, 2022
@MisterDA MisterDA deleted the non-req-cmdliner branch October 15, 2022 04:44
tmcgilchrist added a commit to tmcgilchrist/opam-repository that referenced this pull request Nov 7, 2022
CHANGES:

- Add --fuse-path to allow selection of the path redirected by FUSE (@mtelvers ocurrent/obuilder#128, reviewed by @MisterDA )
- Pre-requisites for Windows support using docker for Windows (@MisterDA ocurrent/obuilder#116, reviewed by @tmcgilchrist)
- Additional tests and prerequistes for Windows support (@MisterDA ocurrent/obuilder#130, reviewed by @tmcgilchrist)
- Add support for Docker/Windows spec (@MisterDA ocurrent/obuilder#117, reviewed by @tmcgilchrist)
- Depend on Lwt.5.6.1 for bugfixes (@MisterDA ocurrent/obuilder#108, reviewed by @tmcgilchrist)

- Add macOS support (@patricoferris ocurrent/obuilder#87, reviewed by @tmcgilchrist @talex5 @kit-ty-kate)
- Enable macOS tests only on macOS (@MisterDA ocurrent/obuilder#126, reviewed by @tmcgilchrist)
- Dune 3.0 generates empty intf for executables (@MisterDA ocurrent/obuilder#111, reviewed by @talex5)
- Fix warnings and CI failure (@MisterDA ocurrent/obuilder#110, reviewed by @talex5)

- Expose store root and cmdliner term with non-required store (@MisterDA ocurrent/obuilder#119, reviewed by @tmcgilchrist)
- Expose Rsync_store module (@MisterDA ocurrent/obuilder#114, reviewed by @talex5)
- Rsync hard-links to save space (@art-w ocurrent/obuilder#102, reviewed by @patricoferris)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants