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

extra folder should have search priority over user added search paths #289

Closed
porres opened this issue Jan 12, 2018 · 10 comments
Closed

extra folder should have search priority over user added search paths #289

porres opened this issue Jan 12, 2018 · 10 comments
Labels
severity:feature suggestion for an enhancement

Comments

@porres
Copy link
Contributor

porres commented Jan 12, 2018

Hi, in cyclone we have a hilbert~ object, that I'm trying to load only as [cyclone/hilbert~], so just "[hilbert~]" would still call the abstraction that resides in "extra".

But that never happens as it seems externals have priority in the search path before the extra folder.

So the only way I can load pd vanilla's hilbert~ is if I don't have cyclone in Pd's path or in [declare], which is bad...

this could be fixed if extra had priority in the search, which I think it'd be common sense, as Pd Vanilla objects actually do have priorities over externals in general.

cheers

@umlaeute
Copy link
Contributor

i concur.

each and every software i know will prioritize in the following order:

  1. user specific (e.g. %AppData%\Pd)
  2. administrator provided data (e.g. %CommonProgramFiles%\Pd)
  3. system provided data (e.g. %ProgramFiles%\Pd\extra)

if you want to avoid nameclashes with "builtins", you shouldn't create them in the first place.

@porres porres changed the title extra folder should have search priority over externals extra folder should have search priority over user added search paths Jan 13, 2018
@umlaeute umlaeute added the severity:feature suggestion for an enhancement label Sep 26, 2018
@porres
Copy link
Contributor Author

porres commented May 11, 2019

if you want to avoid nameclashes with "builtins", you shouldn't create them in the first place.

I ended up not including a [hilbert~] option for cyclone.

But I still think Pd Vanilla objects should have priorities over externals.

@danomatika
Copy link
Contributor

danomatika commented Aug 10, 2019

ping @umlaeute @millerpuckette

My first take was "oh no, reordering paths might break something" but, in this case, the following is a good point:

this could be fixed if extra had priority in the search, which I think it'd be common sense, as Pd Vanilla objects actually do have priorities over externals in general.

This is not likely to change many setups unless they rely on putting everything in extra, however we've clearly demphasized this with [declare] and the Documents/externals directory + documentation.

@porres
Copy link
Contributor Author

porres commented Aug 10, 2019

reordering paths might break something

can't see how

This is not likely to change many setups unless they rely on putting everything in extra

but how? If everything is in extra, things will still be found. It'll just look there first

@danomatika
Copy link
Contributor

danomatika commented Aug 10, 2019 via email

@millerpuckette
Copy link
Contributor

millerpuckette commented Aug 10, 2019 via email

@porres
Copy link
Contributor Author

porres commented Aug 12, 2019

yeah, I can't see the issues, but my vision is limited anyway so I can't argue :)

Since I'm now more worried about documenting Pd and editing the manual, I'm just concerned on understanding how it really works so I can explicitly explain this structure in that reference.

So it seems the search priority for externals is: relative folder (relative to the patch), then the user added search paths (in preferences => path), and then finally the standard paths (which still includes global system provided data, administrator provided data and finally the user/application folder - which is the 'extra' folder - in the very end of the search list.

It did make sense to me that "extra" should have a search priority over other externals, it seems weird to point out in the manual that this is the last place Pd will ever search for something - but maybe not that many people will question it as I did. Maybe if we say this is more of just another external library, and not something to be deeply connected to Pd itself, it can make more sense - otherwise it seems counterintuitive to me.

@porres
Copy link
Contributor Author

porres commented Aug 12, 2019

and actually, as I'm revising Pd's manual, it does say pretty clearly, already, that 'extra' is searched for last. This may indicate it was all very intentional. If so, @millerpuckette can you tell us the reasoning behind it?

@millerpuckette
Copy link
Contributor

So that you can override stuff in extra with your own better objects.

@porres
Copy link
Contributor Author

porres commented Aug 12, 2019

So that you can override stuff in extra with your own better objects.

I don't think I can make better ones :) but that reminds me we could include some information on how Pd allows you to override internals with compiled objects, and then it can also include this idea that objects in 'extra' can also be overriden!

So I'll do that in my manual revision, and I might just say that the reason is because you can override stuff with better objects, cause it sounds funny :)

Anyway, will close this issue and my PR

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity:feature suggestion for an enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants