Skip to content

Change typecheckRule to throw an error #4090

@soulomoon

Description

@soulomoon
          Could you also change the following in `typecheckRule` to throw an error?
    when (foi == NotFOI) $
      logWith recorder Logger.Warning $ LogTypecheckedFOI file

Earlier it was very easy to trigger this warning/error, you just opened a file in vscode, waited for it to typecheck and then closed it.

If this patch avoids that we can have more confidence that it is working as intended.

Originally posted by @wz1000 in #4087 (comment)

This should be be done after we merge #4087, should fix some test that is not setup right with FOI along the way.

e.g.

      Imported symbol:              FAIL (0.83s)
        test/exe/TestUtils.hs:293:
        Expecting exactly one definition, got 0
        Use -p '/ghcide.get.definition.Imported/&&$0=="ghcide.get.definition.Imported symbol"' to rerun this test only.
      Imported symbol (reexported): FAIL (0.79s)
        test/exe/TestUtils.hs:293:
        Expecting exactly one definition, got 0
        Use -p '/ghcide.get.definition.Imported/&&/Imported symbol (reexported)/' to rerun this test only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions