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

fix(scoop-search): Remove redundant 'bucket/' in search result #4773

Merged
merged 4 commits into from
Mar 7, 2022

Conversation

zStruCat
Copy link
Contributor

@zStruCat zStruCat commented Mar 3, 2022

Closes #4772

@rashil2000
Copy link
Member

rashil2000 commented Mar 3, 2022

Actually, the bucket/ is not redundant. Sometimes multiple buckets have same package, so we specify scoop install <bucket>/<app> to install a particular app.

It would be better to replace the bucket/ word by the actual name of the bucket, like games/.

@zStruCat
Copy link
Contributor Author

zStruCat commented Mar 3, 2022

Actually, the bucket/ is not redundant. Sometimes multiple buckets have same package, so we specify scoop install <bucket>/<app> to install a particular app.

It would be better to replace the bucket/ word by the actual name of the bucket, like games/.

The display of searched manifests is divided into several section, each belonging to a particular bucket with its name displayed at the begining of the section, so perhaps there's no need for it to appear again in the manifest.

pid

@rashil2000
Copy link
Member

Then we should leave it as it is, because the instruction scoop install <bucket>/<app> is still important

@zStruCat
Copy link
Contributor Author

zStruCat commented Mar 3, 2022

Also, it's consistent with the display format of local bucket
图片

Off the topic, i do think scoop install bucket/app is important. To be more precise, i feel that the form of bucket/app@version as a consistent input query is vital. Unfortunately, different command of scoop has acted inconsistently. For instance, search and list doesn't support bucket/app yet......

@rashil2000
Copy link
Member

I think a common middle ground would be to make this result:

Results from other known buckets...
(add them using 'scoop bucket add <name>')

'nonportable' bucket:
    bucket/qttabbar-np

into

Results from other known buckets...
(add them using 'scoop bucket add <name>')

'nonportable' bucket (install using 'scoop install nonportable/<app>'):
    qttabbar-np

This will make it consistent with local bucket results.

@zStruCat
Copy link
Contributor Author

zStruCat commented Mar 3, 2022

I think a common middle ground would be to make this result:

Results from other known buckets...
(add them using 'scoop bucket add <name>')

'nonportable' bucket:
    bucket/qttabbar-np

into

Results from other known buckets...
(add them using 'scoop bucket add <name>')

'nonportable' bucket (install using 'scoop install nonportable/<app>'):
    qttabbar-np

This will make it consistent with local bucket results.

This is exactly what my commit do.
pic

@rashil2000
Copy link
Member

Notice the additional text beside the bucket header, that is not present in your commit

@zStruCat
Copy link
Contributor Author

zStruCat commented Mar 3, 2022

Notice the additional text beside the bucket header, that is not present in your commit

But scoop install cannot install app from a known but not added bucket. It results in the following:

WARN  Bucket 'games' not installed. Add it with 'scoop bucket add games' or 'scoop bucket add games <repo>'.  
Couldn't find manifest for '0ad' from 'games' bucket.

@rashil2000
Copy link
Member

But scoop install cannot install app from a known but not added bucket. It results in the following:

Instruction for adding other known buckets is already given at the beginning of results, right

@zStruCat
Copy link
Contributor Author

zStruCat commented Mar 4, 2022

changed accordingly

@niheaven
Copy link
Member

niheaven commented Mar 4, 2022

You should make bucket/ optional since it is not required in bucket repo.

@rashil2000
Copy link
Member

You should make bucket/ optional since it is not required in bucket repo.

Do you mean the hint should only be shown for not added buckets?

@niheaven
Copy link
Member

niheaven commented Mar 4, 2022

Do you mean the hint should only be shown for not added buckets?

No, the regex. Not all bucket repo has manifest files in 'bucket' subfolder, they may be put in root folder and that's scoop's original bucket structure.

@zStruCat
Copy link
Contributor Author

zStruCat commented Mar 5, 2022

Do you mean the hint should only be shown for not added buckets?

No, the regex. Not all bucket repo has manifest files in 'bucket' subfolder, they may be put in root folder and that's scoop's original bucket structure.

First, currently the remote search only search the remote 'known' bucket, i.e. main, extras, nirsoft, etc, all of which put manifests under bucket directory.
Secondly, if scaning all files, we won't be able to distinguish between a manifest and a normal json file without downloading and checking them against the schema. I doubt if the time-cost here is acceptable.

@zStruCat
Copy link
Contributor Author

zStruCat commented Mar 7, 2022

Any other issues?

@niheaven
Copy link
Member

niheaven commented Mar 7, 2022

I've tweaked some code and now LGTM.

@niheaven niheaven changed the title fix(scoop-search): Fix #4772 fix(scoop-search): Remove redundant 'bucket/' in search result Mar 7, 2022
@rashil2000 rashil2000 merged commit 43d5e99 into ScoopInstaller:develop Mar 7, 2022
se35710 pushed a commit to se35710/scoop that referenced this pull request Mar 8, 2022
…Installer#4773)

* fix remote search

* add hint

* tweak

* docs(changelog): Update CHANGELOG

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
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.

3 participants