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

It would be nice if ../ always meant "look at the bower directory" #934

Closed
rictic opened this issue Oct 16, 2016 · 12 comments
Closed

It would be nice if ../ always meant "look at the bower directory" #934

rictic opened this issue Oct 16, 2016 · 12 comments

Comments

@rictic
Copy link
Contributor

rictic commented Oct 16, 2016

Migrated from Polymer/atom-plugin#3
On September 29th, 2016, @notwaldorf said:

Context: if you have an enormous folder with a billion elements in it because you work on Polymer Elements and that's how you cope, auto-complete looks at the sibling directories rather than the bower deps, which may be woefully out of date.

@rictic
Copy link
Contributor Author

rictic commented Oct 16, 2016

On October 4th, 2016, @TimvdLippe said:

I just downloaded and followed the instructions in the README and for me the linter was not recognizing these ../ paths. Since bower install creates bowercomponents/, in a usage project the imports are expected to be bower_components/paper-spinner/paper-spinner.html instead of ../paper-spinner/paper-spinner.html. Now this is an example project, so in general I think it is fine. Just my 2 cents of my initial impression of relative url imports.

@LostInBrittany
Copy link
Contributor

It's a problem for users (in any editor, VSCode, Atom or Sublime) that deals with lots of components and prefers to open the big parent folder, yeah. Specially when not all the dependant elements are in sibling directories, as in Polymer/vscode-plugin#18.

@rictic
Copy link
Contributor Author

rictic commented Oct 19, 2016

Yeah, this would make the editors easier to use and less fragile, as you wouldn't have to make your workspace root exactly right.

We could keep the current behavior for the analyzer by adding a new URL resolver that searches for a bower_components directory when resolving a ../ URL anywhere.

What do you think @justinfagnani ?

@LostInBrittany
Copy link
Contributor

In the analyzer side you don't even get the ../ as path are computed before in client-side and made relative to workspaceRoot

@justinfagnani
Copy link
Contributor

@rictic I need to understand what's going on here. The PackageUrlResolver should already be doing this.

@rictic
Copy link
Contributor Author

rictic commented Oct 20, 2016

PackageUrlResolver only does that rewriting when the path is reaching out of the basedir. This is a proposal for doing it opportunistically, whenever it looks like it would help.

@oneezy
Copy link

oneezy commented Dec 1, 2016

Yeah..when attempting to ctrl + click on any ../ bower_components url, it doesn't know how to find it.


Here's a screenshot of the bug in VScode:

image

@bashmish
Copy link
Contributor

bashmish commented Nov 1, 2017

@rictic any updates on this? Do you use any workarounds to live with this limitation and still be able to use this Jump To Definition feature?

@tedium-bot
Copy link
Collaborator

Issue migrated to polymer/tools#452

@aomarks aomarks transferred this issue from Polymer/polymer-editor-service Jan 3, 2019
@aomarks
Copy link
Member

aomarks commented Jan 3, 2019

Re-opening because this original issue is now transferred and canonical again.

@aomarks aomarks reopened this Jan 3, 2019
@stale
Copy link

stale bot commented Mar 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 4, 2020
@stale
Copy link

stale bot commented Apr 30, 2022

This issue has been automatically closed after being marked stale. If you're still facing this problem with the above solution, please comment and we'll reopen!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants