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

schema.js not passing Configuration.h #83

Open
ellensp opened this issue Jun 23, 2024 · 0 comments
Open

schema.js not passing Configuration.h #83

ellensp opened this issue Jun 23, 2024 · 0 comments

Comments

@ellensp
Copy link

ellensp commented Jun 23, 2024

The error given is

workbench.desktop.main.js:sourcemap:1847 Activating extension 'marlinfirmware.auto-build' failed: Cannot read properties of undefined (reading 'length').

But if you enable debugging you can track it down to these lines in schema.js

          console.log("Handling else/end line", line_number);

          if (iselif || iselse || drctv == '#endif') {
          if (conditions.length == 0) {
            //raise Exception(f'no #if block at line {line_number}')
            // TODO: Revert the view back to plain text editing
          }

conditions.length is the length that is not set

How to reproduce:

Add this eg to Configuration.h

#if(MOTHERBOARD == BOARD_FYSETC_CHEETAH_V20)
  #define CUSTOM_MACHINE_NAME "Fysetc Cheetah V2.0"
#else
  #define CUSTOM_MACHINE_NAME "3D Printer"
#endif

Restart vscode and attempt to start ABM, it will not start as it fails to pass the Configuration.h

simply adding a space after the #if eg

#if (MOTHERBOARD == BOARD_FYSETC_CHEETAH_V20)
  #define CUSTOM_MACHINE_NAME "Fysetc Cheetah V2.0"
#else
  #define CUSTOM_MACHINE_NAME "3D Printer"
#endif

And restarting vscode and ABM starts as expected.
But the user shouldn't have to do this....

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

No branches or pull requests

1 participant