nwolverson/atom-ide-purescript

Default source glob should include psc-package dependencies

MiracleBlue opened this issue · 5 comments

Currently, the default value for the source glob only includes the src and bower_components directories, which isn't working for projects that use psc-package dependencies.

I've tested an additional glob entry that seems to work great for psc-package deps:

psc-package/**/src/**/*.purs

I think we should include this as part of the default glob, if there are no concerns.

An option would also be to switch between the bower glob and psc glob based on a flag, as there may be some weirdness if someone appears to have both bower and psc packages in the same project.

Also as @nwolverson mentioned in slack, this glob doesn't account for different package sets, which is actually a serious problem with my glob currently, so I'd say we'll probably have to add something to check the projects current selected package set, or something similar.

I don't know what happens if there are older versions of libraries picked up by the globs, I guess it's likely some dodgy navigation?

I'm leaning towards [optionally] picking up psc-package sources globs when in a psc-package project, and add this to the specified glob. I split the sources/packages paths into 2 settings in the vscode plugin, which does seem more amenable to such an addition.

I think that's a much much better idea. Using the output of the sources command means we don't have to worry about updating the glob to suit any future directory structure changes or whatever, and we get a more explicit and targeted set of globs 👍

This is now implemented with an "Add psc-package sources" option. Sorry it took a while...

No need to apologise! Thank you for your efforts!