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

goto-def doesn't work with spago/bower dual build #172

Open
reactormonk opened this issue Mar 23, 2019 · 3 comments
Open

goto-def doesn't work with spago/bower dual build #172

reactormonk opened this issue Mar 23, 2019 · 3 comments

Comments

@reactormonk
Copy link

reactormonk commented Mar 23, 2019

I have a project which has both bower and spago build - rave, and goto-def doesn't work there. It doesn't find rather straightfoward (e.g. Mu) constructors where I don't have any issues in other projects.

@kritzcreek
Copy link
Collaborator

The plugin detects the project type in the order psc-package -> bower -> spago

psc-ide-emacs/psc-ide.el

Lines 252 to 254 in b2c833d

('("psc-package.json") (psc-ide--psc-package-globs))
('("bower.json") (psc-ide--bower-globs))
('("spago.dhall") (psc-ide--spago-globs))

So if you've got a bower.json it will use globs for a bower project by default. I'm assuming you've installed your dependencies with spago though? What's the behaviour we should be going for here? Just appending globs for both bower and spago will lead to problems if you've installed dependencies with both.

@reactormonk
Copy link
Author

reactormonk commented Mar 24, 2019

Maybe make it explicit in the message

Detected multiple project files: bower.json, spago.dhall

which one will be picked. Yeah, I installed deps via spago mostly.

However, even if I run bower install, it can't find the definition of SProxy. Works just fine in my bower-only project.

@kritzcreek
Copy link
Collaborator

I think for now we could just change the order in which it checks things and assume that if people have a spago.dhall file they want to use that for their local development, and just have the bower.json there for publishing purposes. (So flip around the ordering of cases to 1 spago 2 psc-package 3 bower)

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

No branches or pull requests

2 participants