Skip to content

no diagnostics for everything that depends on semantic analysis #2017

Open
@Techatrix

Description

@Techatrix

In its current state, ZLS is only able to report syntax errors and errors that are provided by zig ast-check. Everything else (like semantic analysis) is not available. Here are some examples of errors that are not being reported:

  • no field named 'foo' in 'bar'
  • function expected x argument(s), found y
  • expected type 'x', found 'y'
  • comptime conditional calls to @compileError (used by std.debug.print to report errors)

There have been attempts in the past that tried to partially address this:

The most viable solution right now is the build-on-save feature. This issue will remain open until it is enabled by default. Probably once incremental compilation has matured enough.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions