Skip to content

[BUG] pg_bsd_indentPath not working as expected #2

New issue

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

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

Already on GitHub? # to your account

Closed
zhjwpku opened this issue Dec 23, 2024 · 3 comments
Closed

[BUG] pg_bsd_indentPath not working as expected #2

zhjwpku opened this issue Dec 23, 2024 · 3 comments

Comments

@zhjwpku
Copy link

zhjwpku commented Dec 23, 2024

Describe the bug
I'm using meson out of tree build, so the pg_bsd_indent is not in postgres src.

The postgres src directory is: /home/postgres/postgres/
and the build directory is: /home/postgres/build
I set "postgresql-hacker-helper.pg_bsd_indentPath": "/home/postgres/build/src/tools/pg_bsd_indent/pg_bsd_indent", but
it seems not work.

VSCode give out the following error: Seems like pg_bsd_indent is not build yet. Formatting is not supported without it. Build?,
I search the code a little bit, the error is from findExistingPgbsdindent, but before that is should call Configuration.getCustomPgbsdindentPath() in getPgbsdindent, which seems not working.

I'm skeptical about the following code, but I don't know how to debug vscode extension, it will be great if you(@ashenBlade) can check this, thanks in advance.

    static ConfigSections = {
        TopLevelSection: this.ExtensionName,
        NodeTagFiles: 'nodeTagFiles',
        LogLevel: 'logLevel',
        PgindentPath: 'pgindentPath',
        PgbsdindentPath: 'pgindentPath',
        SrcPath: 'srcPath'
    };
@ashenBlade
Copy link
Owner

Hi! Thanks for report. Seems that you are right about root cause of this bug. I will fix this ASAP

@ashenBlade
Copy link
Owner

Released v1.4.2 with this bug fix

@zhjwpku
Copy link
Author

zhjwpku commented Dec 24, 2024

Released v1.4.2 with this bug fix

It works now, thanks for the quick fix :)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants