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

Add a mechanism to prevent hie-bios from searching upwards #136

Merged
merged 5 commits into from
Jun 28, 2020

Conversation

lukel97
Copy link
Contributor

@lukel97 lukel97 commented Jan 26, 2020

Changes the logic of findFileUpwards to stop at any directories that contain the file .hie-bios.stop. This should be useful for testing different cradle setups.

src/HIE/Bios/Cradle.hs Outdated Show resolved Hide resolved
Copy link
Collaborator

@fendor fendor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the linux CI, you need to add the test directories to the hie-bios.cabal extra-source-files

Changes the logic of `findFileUpwards` to stop at any directories that
contain the file `.hie-bios.stop`. This should be useful for testing
different cradle setups.
@lukel97
Copy link
Contributor Author

lukel97 commented Jun 26, 2020

@jneira @fendor Turns out I need this again for testing in hls 😅

@jneira jneira added the type: bug Something isn't working label Jun 26, 2020
@alanz
Copy link

alanz commented Jun 27, 2020

I previously worked around this by physically copying the directory to be tested to a withTempDir location.

But being able to limit scope is a good thing, e.g. trying to work on checked-out ghcide submodule of hls, only.

@fendor fendor added type: enhancement New feature or request and removed type: bug Something isn't working labels Jun 27, 2020
@fendor
Copy link
Collaborator

fendor commented Jun 27, 2020

Out of interest, what happens if the .hie-bios.stop file is in the same dir as hie.yaml?

@lukel97
Copy link
Contributor Author

lukel97 commented Jun 27, 2020

@fendor It uses the hie.yaml in that same directory, but if there wasn't one there then it wouldn't search any further

Copy link
Collaborator

@fendor fendor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@fendor fendor merged commit dd181b8 into haskell:master Jun 28, 2020
lukel97 added a commit to lukel97/hie-bios that referenced this pull request Jul 7, 2020
fendor pushed a commit that referenced this pull request Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants