-
Notifications
You must be signed in to change notification settings - Fork 97
Conversation
Once again I had to special case the implicit cradle... |
450e8a9
to
94d25ba
Compare
@wz1000 check that my change to not filter by |
Why remove the check that the files exist? The file paths are still coming from the same source as far as I can tell, last I remember they were generated by something like a cartesian product of import paths and module names. |
I think the files eventually go here, so this is not correct: https://github.com/haskell/ghcide/blob/master/src/Development/IDE/Core/Rules.hs#L374 |
would that be needed after #782? |
I'm removing the check that the files exist (when extending the set of known files) because otherwise ghcide doesn't pick up new modules created after updating the cradle. Is the Cartesian product logic in hie-bios or in ghc? |
this doesn't seem related |
It is. We call |
It's in |
b3d074f
to
44c0cc5
Compare
I see your point now. I've restored the filtering and implemented an alternative solution for missing modules which preserves the old behaviour. EDIT: Hmm, I don't think the alternative solution works. ghcide will not locate a missing module when it is created because it is not in the set of known files. Perhaps extending the set of known files to a map of candidates will do it. |
7484e34
to
68d1cfe
Compare
The problem is that we are trying to use the KnownFiles to determine what imports are part of the local project, and the KnownFiles do not have enough information for that. The solution is to enrich the KnownFiles to become KnownTargets, which provides a mapping from every target to a list of normalised file paths that do exist for them. The keys of the mapping are the targets and can be used to determine local imports, whereas the values of the mapping are still used to drive the module graph |
68d1cfe
to
9c788d5
Compare
Won't we still end up calling |
I noticed ghcide HEAD was broken on the ghcide submodule of the hls repo.
The implicit cradle comes without import paths, so we need to preserve the old logic that synthetised them from the current module
Also, DO NOT filter out missing targets
I restored the filtering, so I don't think so |
Command 'ru' is not supported by Azure Pipelines. Supported commands
See additional documentation. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
9c788d5
to
e46f21d
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
I have disabled a flaky test that was blocking this PR. Have you noticed this test failing before? |
Yes, I saw it for the first time yesterday. Rerunning the job fixed it.
Maybe saving ifaces exposed this? Switching the order of iface-error-1 and
iface-error-2 could be one way to tell.
…On Sat, 12 Sep, 2020, 13:25 Pepe Iborra, ***@***.***> wrote:
I have disabled a flaky test that was blocking this PR. Have you noticed
this test failing before?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#781 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABEW5UXR6RTX6GNKTQPLZOLSFMSL7ANCNFSM4RFN7X4Q>
.
|
I think it's likely related to saving ifaces, I don't recall seeing it before, but maybe CI history can confirm. Could you investigate? The failure could be indicative of a real bug. I have not managed to reproduce it locally though, it's very annoying. |
* Import paths are relative to cradle I noticed ghcide HEAD was broken on the ghcide submodule of the hls repo. * remove unused * Fix comment placement * Special case the implicit cradle The implicit cradle comes without import paths, so we need to preserve the old logic that synthetised them from the current module * Hlint * Fix timing issue: update known files before restarting the session Also, DO NOT filter out missing targets * Use --verbose when running tests * Log test outputs on 3rd attempt * Fall back to filtering known files * hlint * Upgrade KnownFiles to KnownTargets * Use KnownTargets to filter modules, not module paths * Fix test cradle * Increase pauses in flaky test * remove no longer needed check * Disable ansi color codes in CI * Disable flaky test
* Import paths are relative to cradle I noticed ghcide HEAD was broken on the ghcide submodule of the hls repo. * remove unused * Fix comment placement * Special case the implicit cradle The implicit cradle comes without import paths, so we need to preserve the old logic that synthetised them from the current module * Hlint * Fix timing issue: update known files before restarting the session Also, DO NOT filter out missing targets * Use --verbose when running tests * Log test outputs on 3rd attempt * Fall back to filtering known files * hlint * Upgrade KnownFiles to KnownTargets * Use KnownTargets to filter modules, not module paths * Fix test cradle * Increase pauses in flaky test * remove no longer needed check * Disable ansi color codes in CI * Disable flaky test
* Import paths are relative to cradle I noticed ghcide HEAD was broken on the ghcide submodule of the hls repo. * remove unused * Fix comment placement * Special case the implicit cradle The implicit cradle comes without import paths, so we need to preserve the old logic that synthetised them from the current module * Hlint * Fix timing issue: update known files before restarting the session Also, DO NOT filter out missing targets * Use --verbose when running tests * Log test outputs on 3rd attempt * Fall back to filtering known files * hlint * Upgrade KnownFiles to KnownTargets * Use KnownTargets to filter modules, not module paths * Fix test cradle * Increase pauses in flaky test * remove no longer needed check * Disable ansi color codes in CI * Disable flaky test
I noticed ghcide HEAD was broken on the ghcide submodule of the haskell-language-server repo, after the recent changes to import paths. Hopefully this fixes the issue
Fixes #780