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

Move some workspace crates into a separate repository #1592

Open
2 of 6 tasks
NobodyXu opened this issue Feb 1, 2024 · 7 comments
Open
2 of 6 tasks

Move some workspace crates into a separate repository #1592

NobodyXu opened this issue Feb 1, 2024 · 7 comments

Comments

@NobodyXu
Copy link
Member

NobodyXu commented Feb 1, 2024

Move:

  • leon and leon-macros into one repository leon
  • atomic-file-install
  • fs-lock
  • normalize-path
  • simple-git
  • cargo-toml-workspace

Rationale:

  • they are not.strongly coupled with cargo-binstall
  • they rarely update
  • they can be reused outside cargo-binstall easily
  • improve caching since rust-cache doesn't cache workspace to reduce cache size
@NobodyXu NobodyXu changed the title Move leon, leon-macros, atomic-file-install, fs-lock, normalize-path and simple-git into a separate repository Move some workspace crates into a separate repository Feb 1, 2024
@passcod
Copy link
Member

passcod commented Feb 1, 2024

I think if we're going to split let's split all the atomic-file-install, fs-lock, and normalize-path into their own individual repos. They're not really related to each other.

@NobodyXu
Copy link
Member Author

NobodyXu commented Feb 1, 2024

Yeah that makes sense.

@passcod
Copy link
Member

passcod commented Feb 16, 2024

while i'm here, leon Template should support ToOwned to convert all the borrowed cows into owned ones

@NobodyXu
Copy link
Member Author

Yeah, I can add that function when koving them to a separate repo

@NobodyXu
Copy link
Member Author

NobodyXu commented Feb 20, 2024

@passcod std::borrow::ToOwned is implemented for T: Clone, though <Cow as Clone>::clone returns a copies of the Cow::Borrowed.

I could manually implement <Template as Clone>::clone to convert Cow::Borrowed to Cow::Owned, but I feel that it is a breaking behavior.

Maybe we could add an associated fn to_owned to leon::Template?

P.S. I've already moved the code into a new repository https://github.com/cargo-bins/leon

@passcod
Copy link
Member

passcod commented Feb 20, 2024

I think we might as well issue a breaking change implementing ToOwned 'correctly'

@NobodyXu
Copy link
Member Author

created cargo-bins/leon#4 to further discuss this

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

2 participants