Skip to content
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

Library Binary Pattern #124

Open
1 of 6 tasks
pinkforest opened this issue Jul 2, 2021 · 5 comments
Open
1 of 6 tasks

Library Binary Pattern #124

pinkforest opened this issue Jul 2, 2021 · 5 comments
Assignees

Comments

@pinkforest
Copy link
Contributor

pinkforest commented Jul 2, 2021

Tracking Patch-Set

  • Initial lib-bin split (files) Lib bin initial #141
  • Move panics off library (snafu / anyhow / thiserror, quick_error)
  • Move bin-tests (under tests/) to use library (w/ httpmock) sans exec(bin)
  • Args parsing into binary
  • Output formatting into binary?
  • Create doctests for example uses of binary in README.md and include with doc_comment

Intent

@CohenArthur @Skallwar Are you okay if I change to lib-bin pattern from binary only now?

Essentially I would split all the library logic to library and binary that requires different things e.g. for shell related libraries.

This is a common pattern and will make organising code, benches, testing and dependency management easier between two sets of needs among other things.

Also common pattern is that library will never panic whilst binary may panic but idea is to propagate errors to binary.

@CohenArthur
Copy link
Collaborator

Yup, this is a really good idea. This is something that we had thought about earlier, but never got around to doing. I'd love to see it implemented.

@pinkforest
Copy link
Contributor Author

pinkforest commented Jul 6, 2021

@CohenArthur @Skallwar initial lib-bin split is #141

@Skallwar
Copy link
Owner

Skallwar commented Jul 6, 2021

Add a checkbox list to this issue to make it a tracking issue of the patch-set

@Skallwar
Copy link
Owner

Skallwar commented Jul 6, 2021

I would also like to see the argument parsing moved to the bin

@Skallwar
Copy link
Owner

Hi @pinkforest, I hope you are doing well. I was wondering if you are not planing to followup on this or if you are just taking a break?

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

No branches or pull requests

3 participants