Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect error message #349

Closed
fbef0102 opened this issue Oct 22, 2023 · 2 comments
Closed

Incorrect error message #349

fbef0102 opened this issue Oct 22, 2023 · 2 comments
Assignees
Labels
bug Something isn't working sourcepawn-lsp Issue affects the LSP tree-sitter Issue related to the tree-sitter grammar

Comments

@fbef0102
Copy link

fbef0102 commented Oct 22, 2023

Basic informations

  • OS: Windows
  • VSCode version: Latest (v1.83.1)
  • Extension version: Latest (v6.2.0)
  • SourcePawn version: v1.11.0.6945

Further Information

Recently I update SourcePawn Extension from v4.2.4 to v6.2.0, and I got lot of problems
I also install Error Lens version: Latest (v3.14.0)

Code to reproduce the behaviour

#define ShouldFixLerp() (hFixLerpValue.BoolValue)

#define ShouldAnnounceLerpChanges() (hAnnounceLerp.BoolValue)

#define DefaultLerpStyle() (hPrintLerpStyle.BoolValue)

#define ShouldLogLerpChanges() (hLogLerp.BoolValue)

image

sPath[pos] = '\x0';

image

b >>>= 1;
x >>>= 1;
r >>>= 8;
l >>>= 8;

image

iPassTime %= 3600;
iPassTime %= 60;

image

  1. I already have include/SteamWorks.inc, probably because case-sensitive check?
#include <steamworks> 

image

#define TYPE_UNKNOWN                  (0 << 0) // 0 | 000
#define TYPE_CONCRETE_CHUNK           (1 << 0) // 1 | 001
#define TYPE_TREE_TRUNK               (1 << 1) // 2 | 010

    int type = 5;
    switch (type)
    {
        case TYPE_CONCRETE_CHUNK: {};
        case TYPE_TREE_TRUNK: {};
        case TYPE_UNKNOWN: {};
    }

image

Expected behaviour

All errors above should not appear because I can compile code without any errors and warnings
image

Messages

sourcepawn-lsp log

[2023-10-22T13:34:42.259Z INFO] Telemetry is enabled. To disable it, use the --disable-telemetry flag.
[2023-10-22T13:34:42.259Z INFO] Starting sourcepawn-lsp version 0.12.0
[2023-10-22T13:34:42.264Z INFO] Received config [
    Object {
        "disableSyntaxLinter": Bool(false),
        "includesDirectories": Array [
            String("D:\\Github\\Private-Work\\L4D2-插件\\scripting_1.11\\include"),
        ],
        "linterArguments": Array [],
        "spcompPath": String("D:\\Github\\Private-Work\\L4D2-插件\\scripting_1.11\\spcomp.exe"),
    },
]
[2023-10-22T13:34:57.223Z ERROR] Unknown token: Range {
    start: Position {
        line: 312,
        character: 66,
    },
    end: Position {
        line: 312,
        character: 99,
    },
}
[2023-10-22T13:35:01.556Z ERROR] Unknown token: Range {
    start: Position {
        line: 417,
        character: 32,
    },
    end: Position {
        line: 417,
        character: 33,
    },
}
[2023-10-22T13:35:30.194Z WARN] Unknown notification: $/setTrace
[2023-10-22T13:35:30.195Z INFO] Received config [
    Object {
        "disableSyntaxLinter": Bool(false),
        "includesDirectories": Array [
            String("D:\\Github\\Private-Work\\L4D2-插件\\scripting_1.11\\include"),
        ],
        "linterArguments": Array [],
        "spcompPath": String("D:\\Github\\Private-Work\\L4D2-插件\\scripting_1.11\\spcomp.exe"),
    },
]
[2023-10-22T13:35:40.208Z ERROR] Unknown token: Range {
    start: Position {
        line: 312,
        character: 66,
    },
    end: Position {
        line: 312,
        character: 99,
    },
}
[2023-10-22T13:35:44.568Z ERROR] Unknown token: Range {
    start: Position {
        line: 417,
        character: 32,
    },
    end: Position {
        line: 417,
        character: 33,
    },
}
@fbef0102 fbef0102 added the bug Something isn't working label Oct 22, 2023
@Sarrus1
Copy link
Owner

Sarrus1 commented Dec 27, 2023

Thanks for reporting!

1, 2, 3, 4, 6 were fixed in https://github.com/Sarrus1/tree-sitter-sourcepawn/commits/main/.
They will be merged into main when feat/salsa is merged.
I will fix 5 at the same time as well.

@Sarrus1 Sarrus1 added sourcepawn-lsp Issue affects the LSP tree-sitter Issue related to the tree-sitter grammar labels Dec 27, 2023
@Sarrus1
Copy link
Owner

Sarrus1 commented Jan 3, 2025

This should be fixed now.
Please feel free to reopen if this happens again.

@Sarrus1 Sarrus1 closed this as completed Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sourcepawn-lsp Issue affects the LSP tree-sitter Issue related to the tree-sitter grammar
Projects
None yet
Development

No branches or pull requests

2 participants