Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Pin LS: Direct pins should override indirect pins #2518

Closed
aschmahmann opened this issue Oct 7, 2019 · 4 comments
Closed

Pin LS: Direct pins should override indirect pins #2518

aschmahmann opened this issue Oct 7, 2019 · 4 comments
Assignees
Labels
good first issue Good issue for new contributors kind/enhancement A net-new feature or improvement to an existing feature kind/resolved-in-helia

Comments

@aschmahmann
Copy link
Contributor

aschmahmann commented Oct 7, 2019

We have 3 pin types recursive, direct, indirect. In my eyes the type associated with a pin should follow the priority order recursive/direct then indirect since it seems reasonable that a user should be able to pass the results of pin ls filtered by the types recursive and direct into pin rm and clear their repo.

Currently js-ipfs prioritizes indirect > direct and recusive > indirect

// if something is pinned both directly and indirectly,
// report the indirect entry

// recursive pins pre-empt indirect pins

go-ipfs is currently a bit broken ipfs/kubo#6527, but used to follow (and in the CoreAPI does follow) the same pattern as js-ipfs. In addition to fixing #6527 we're considering moving to recursive/direct > indirect.

Is there a reason why this decision was made, or any objections to having everyone move to recursive/direct > indirect?

@Stebalien @daviddias @achingbrain

@achingbrain
Copy link
Member

The js implementation was modelled after the go implementation so it's probably a bug.

The recursive/direct > indirect order of precedence sounds sensible.

@SgtPooki SgtPooki added kind/enhancement A net-new feature or improvement to an existing feature good first issue Good issue for new contributors labels Nov 3, 2022
@ef3n9r98
Copy link

Hey @SgtPooki, would you be willing to pay a dev to fix this issue?

@SgtPooki
Copy link
Member

SgtPooki commented Dec 7, 2022

Hey @SgtPooki, would you be willing to pay a dev to fix this issue?

That's a great question, thanks for offering! Before the plan to rewrite the js implementation of ipfs, that answer may have been a yes, but now i think the answer is no.

Either way, i'd defer to @achingbrain and @tinytb for this one :)

@achingbrain
Copy link
Member

achingbrain commented May 31, 2023

js-ipfs is being deprecated in favor of Helia. You can #4336 and read the migration guide.

This issue has been fixed in Helia since it pins by depth rather than having separate recursive, direct, etc.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good issue for new contributors kind/enhancement A net-new feature or improvement to an existing feature kind/resolved-in-helia
Projects
No open projects
Status: Done
Development

No branches or pull requests

5 participants