Skip to content

Errors in Problems window are cut, weirdly formatted and super hard to decipher in comparison to compiler output #86

Closed

Description

@mbergal

Compiler output in terminal window:

image

Problems window:

image

Hover is a bit better:

image

Activity

  1. mbergal commented on Feb 25, 2021

    @mbergal
    Author

    Here is another example of incomplete error message:

    image

    Compiler log:

    #Start(1614285167013)
    
      Warning number 33
      /home/misha/projects/productionmason/web/auth/src/ErrorHandlingMiddleware.res:1:1-15
      
      1 │ open CommonBase
      2 │ 
      3 │ external jsExnToExpressError: Js.Exn.t => Express.Error.t = "%identity"
      
      unused open CommonBase.
      
    
      Warning number 27
      /home/misha/projects/productionmason/web/auth/src/config/Config.res:10:22-27
      
       8 │ external stringifyAnyWithSpace: ('a, @bs.as(json`null`) _, int) => str
           ing = "stringify"
       9 │ 
      10 │ let validateConfig = config => {
      11 │   let googleApplicationCredentialsPath =
      12 │     NodeJs.Process.env(NodeJs.Process.process)->Js.Dict.get("GOOGLE_AP
           PLICATION_CREDENTIALS")
      
      unused variable config.
      
    
      Warning number 34
      /home/misha/projects/productionmason/web/auth/src/express-handler/ExpressHandler.re:48:5-26
      
      46 ┆ module Input = {
      47 ┆   [@decco]
      48 ┆   type t = Request.input;
      49 ┆ };
      50 ┆ 
      
      unused type t.
      
    
      Warning number 32
      /home/misha/projects/productionmason/web/auth/src/express-handler/ExpressHandler.re
      
      unused value t_encode.
      
    
      We've found a bug for you!
      /home/misha/projects/productionmason/web/auth/tests/Auth_Test.res:224:45
      
      222 ┆ ->AsyncResult.mapOk(x => {
      223 ┆   expect(x.data.users->Array.length)->toBeGreaterThan(0)
      224 ┆   expect(x.data.users->Array.getExn(0).last_name)->toBe(Some("Glenliv
            et"))
      225 ┆   Ok()
      226 ┆ })
      
      This has type: int
      Somewhere wanted: array<'a>
      
    #Done(1614285167075)
    
    
  2. chenglou commented on Feb 28, 2021

    @chenglou
    Member

    Thanks, this is a known bug from the little editor error parser. We'll fix it. The line's too long and breaks onto the next line. In the meantime, you can manually put that line onto multiple lines.

  3. mbergal commented on Apr 4, 2021

    @mbergal
    Author

    Looks as it is described as fixed in 1.0.7, but I am still having problems:

    image

    #Start(1617503102013)
    
      We've found a bug for you!
      /home/misha/projects/voltron/frontend/src/clients/shared/external/Commands/appointments/Commands_Appointments.res:51:17-23
      
      49 ┆ ~exceptions=ids->Array.map(id =>
      50 ┆   RemoveAppointments.makeInputObjectrecurring_appointment_exceptions_i
           nsert_input(
      51 ┆     ~date=id.date,
      52 ┆     ~production_id=id.productionId,
      53 ┆     ~user_id=id.userId,
      
      This has type: MomentTz.Moment.t
      Somewhere wanted: Js.Json.t (defined as Js_json.t)
      
    
      Warning number 27
      /home/misha/projects/voltron/frontend/src/clients/supervisor/view/zones/Supervisor_Zones.res:271:59-66
      
      269 ┆ 
      270 ┆ @react.component
      271 ┆ let make = (~selectable, ~table: ZonesTableState.table, ~refetch) => 
            {
      272 ┆   <>
      273 ┆     <Ui_Material_Table stickyHeader=true>
      
      unused variable refetch.
      
    #Done(1617503102167)
    
    
  4. chenglou commented on Apr 4, 2021

    @chenglou
    Member

    Ah sorry, I should have added an extra note. The fix requires master bs-platform, which will be making a release this weekend or so.

  5. chenglou commented on Apr 4, 2021

    @chenglou
    Member

    Your diagnostics formatting issue is a different problem. Unfortunately that vscode panel swallows whitespace, and I think intentionally... Not sure what to do there yet

  6. mbergal commented on Apr 6, 2021

    @mbergal
    Author

    Your diagnostics formatting issue is a different problem. Unfortunately that vscode panel swallows whitespace, and I think intentionally... Not sure what to do there yet

    Well, after using it for some time I think F8 (Go to Next Problem) through errors works ok, although it is in a single color, at least the indentation works ok there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions