Skip to content
This repository has been archived by the owner on Jan 2, 2021. It is now read-only.

Make Filetargets absolute before continue using them #914

Merged
merged 2 commits into from
Nov 21, 2020

Conversation

fendor
Copy link
Collaborator

@fendor fendor commented Nov 17, 2020

The filetargets are not correctly absolute. The hie-bios API did not articulate this post-condition correctly.

So, in certain cases, the following error is shown for file-targets in a sub-directory:

/tmp/extra-dir-30793437515428/src/Main.hs: openBinaryFile: does not exist (No such file or directory)

Adds a test that this was the case and is now fixed.

@fendor fendor force-pushed the make-filetargets-absolute branch from 7ce49a9 to 414ee64 Compare November 17, 2020 20:20
@pepeiborra
Copy link
Collaborator

Thanks! We didn't see any bug reports about this because the cabal and stack cradles produce module targets, right?

@fendor
Copy link
Collaborator Author

fendor commented Nov 17, 2020

For the executables main module you get file targets. I got a bug report on IRC, but the IDE kept working for the module anyways. However, there is a problem (with the mentioned error message) in the vscode problems tab. You can actually provoke it pretty easily, e.g. open main executable of cabal, or in the test project I added here.

@fendor fendor force-pushed the make-filetargets-absolute branch from 414ee64 to d71667f Compare November 18, 2020 13:35
@fendor fendor force-pushed the make-filetargets-absolute branch from d71667f to 193f461 Compare November 18, 2020 21:19
@fendor fendor merged commit b11d010 into haskell:master Nov 21, 2020
pepeiborra pushed a commit to pepeiborra/ide that referenced this pull request Dec 29, 2020
)

* Add testcase for proving relative filetargets

* Normalise file targets after loading
pepeiborra pushed a commit to pepeiborra/ide that referenced this pull request Dec 29, 2020
)

* Add testcase for proving relative filetargets

* Normalise file targets after loading
pepeiborra pushed a commit to pepeiborra/ide that referenced this pull request Dec 29, 2020
)

* Add testcase for proving relative filetargets

* Normalise file targets after loading
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants