Missing all metadata for custom error

Open
#4,532 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
haskell
Domain
compilers

Research direction

Start by locating the compiler path that creates UserDefinedWarning and determine how its source position and filename are obtained. Reproduce the 0.15.14 behavior if possible, then trace the metadata construction; done means UserDefinedWarning diagnostics include at least a position and filename, with coverage for the reported case.

Written by the indexing model from the issue text.

Description

type: bug

Description

I discovered a debug error in the compiler without any metadata.

    {
      "position": null,
      "message": "  A custom warning occurred while solving type class constraints:\n\n    Debug function usage\n",
      "errorCode": "UserDefinedWarning",
      "errorLink": "https://github.com/purescript/documentation/blob/master/errors/UserDefinedWarning.md",
      "filename": null,
      "moduleName": null,
      "suggestion": null,
      "allSpans": []
    },

To Reproduce

I have no idea how this happened unfortunately :(

Expected behavior

Expected all UserDefinedWarnings to at least have a position and filename

Additional context

PureScript version

0.15.14

Dominant language
Haskell
Stars
8.9k
Forks
575
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from purescript/purescript

All issues in purescript/purescript

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.