cask-pkg / cask.rs

A universal, distributed binary file manager. 一个通用的去中心化二进制管理器
MIT License
74 stars 3 forks source link

Why need a separate repo to store Cask.toml #4

Closed iawia002 closed 2 years ago

iawia002 commented 2 years ago

I see the configuration is only one file, why not just put Cask.toml in the project repo instead of creating a separate one, I understand that Cask.toml should also be part of the project, no need to store it separately.

axetroy commented 2 years ago

I can understand that this may make people confused or have invasiveness.

Imagine what happens in the same directory in the same directory?

In order to fetch Cask.toml file, We have to clone the entire project, for some large projects, this seriously affects the speed

Or if you have any better suggestions, welcome

iawia002 commented 2 years ago

In order to fetch Cask.toml file, We have to clone the entire project, for some large projects, this seriously affects the speed

This could indeed lead to some problems.

I didn't think of a good solution, what do you think about us supporting both ways? Either in the project repo or in a separate repo, with preference given to trying to fetch it from the separate repo.

axetroy commented 2 years ago

with preference given to trying to fetch it from the separate repo.

How about adding a new flag?

By default, it is still getting from a separate repo

But we can add a FLAG to get it from the current repo.

cask install github.com/iawia002/lux --current
iawia002 commented 2 years ago

Adding a flag will increase the cost of use, so we can just try the two URLs separately in our code: if we fetch the {package}-cask URL failed, try fetching the {package} URL again.

axetroy commented 2 years ago

Adding a flag will increase the cost of use, so we can just try the two URLs separately in our code: if we fetch the {package}-cask URL failed, try fetching the {package} URL again.

LGTM

iawia002 commented 2 years ago

If there is no rush I can implement this feature.

axetroy commented 2 years ago

If there is no rush I can implement this feature.

Nice!

axetroy commented 2 years ago

if we fetch the {package}-cask URL failed

Here is the method to how detect the repo exists or not #8