Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The remaining tests that fail are due to what appears to be a ghc bug. [17:19] <edsko> dcoutts: it does seem that ghc remembers what filenames correspond to which modules though [17:19] <edsko> when I update one and give it a different module name it suddenly starts to complain [17:19] <dcoutts> edsko: you mean, if you edit a file, change its module name and reload [17:19] <edsko> uh [17:20] <edsko> 'reload' -- not sur eyou can do that with ghc or ghci [17:20] <edsko> but yes [17:20] <edsko> with an ide-session [17:20] <edsko> I load all of cabal [17:20] <edsko> with the paths I mention above [17:20] <edsko> and that all works fine [17:20] <dcoutts> 'k [17:20] <edsko> then one of the unit tests replaces the contents of one of those files [17:20] <edsko> with "a = unknownX" [17:20] <edsko> and I get [17:20] <edsko> Unexpected source errors: SourceError {errorKind = KindError, errorSpan = test/Cabal/Distribution/Compat/CopyFile.hs@1:1-1:1, errorMsg = "File name does not match module name:\nSaw: `Main'\nExpected: `Distribution.Compat.CopyFile'\n"} [17:21] <edsko> that doesn't quite fit your description above, does it? [17:21] <dcoutts> no, indeed [17:21] <dcoutts> and if you started from scratch with those file contents, I expect you'd get a different error [17:21] <edsko> because if it rescans all of the files, it might regard this one as "Main" and then simply would be unable to find Distribution.Compat.CopyFile [17:22] <dcoutts> namely that it fails to find the module (the one in the file that you edited) [17:22] <dcoutts> edsko: indeed [17:22] <edsko> right [17:22] <edsko> *snap :) [17:22] <edsko> or don't british kids say that? :) [17:22] <dcoutts> edsko: so I would classify this as a ghc quirk, it's caching the modulename -> filename mapping [17:22] <edsko> yeah, seems so [17:22] <dcoutts> technically that should be classified as a bug [17:23] <edsko> ok [17:23] <edsko> so I shouldn't worry about it in my unit test? just ignore this one? [17:23] <dcoutts> not unless we find it's a problem in practice for the ide [17:23] <edsko> me wonders if we can query's filename-module name mapping [17:23] <dcoutts> we should file a ticket though, and note it in our internal list of ghc issues
- Loading branch information