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

Can't load project with multiple prebuild directives #61

Open
mfruendtxylem opened this issue Oct 4, 2023 · 4 comments
Open

Can't load project with multiple prebuild directives #61

mfruendtxylem opened this issue Oct 4, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@mfruendtxylem
Copy link

mfruendtxylem commented Oct 4, 2023

Describe the bug:
When I load a project with multiple prebuild directives like

<prebuild>python "$PROJ_DIR$\CommonCode\version_gen.py" chdr -o "$PROJ_DIR$\CommonCode\version.h" --dirty && $PROJ_DIR$\Tools\AStyle\astyle.bat</prebuild>

I get the following error

Could not parse project file 'Project.ewp': Error: Invalid character in entity name
Line: 6577
Column: 124
Char: &

Loading the project in IAR works fine.

To Reproduce:

Have multiple prebuild directives, connected by && in the project.

Expected behavior:

The project should load, just like in IAR

Actual behavior:

Loading is aborted

Environment:

  • OS: Windows
  • Embedded Workbench: Arm
  • Embedded Workbench version: 9.32
  • VSC Extension version: I Tested 1.30.3 and 1.30.2
@mfruendtxylem mfruendtxylem added the bug Something isn't working label Oct 4, 2023
@mfruendtxylem
Copy link
Author

After finally building with IAR I noticed IAR automatically replaced && with &amp;&amp; in the ewp file and after that it works again. So not sure if this is something that can be fixed on your side. Possibly the error could tell the user to replace && with &amp;&amp; or the auto conversion is also applied.

@jlonnberg
Copy link
Collaborator

Hi @mfruendtxylem,
Did you manually add the pre-build to the ewp-file or did you add it using the Embedded Workbench. We typically discourage users from manually editing the ewp-file as we cannot guarantee that the file will be readable by the IDE and/or VsCode.

@jlonnberg jlonnberg self-assigned this Nov 28, 2023
@mfruendtxylem
Copy link
Author

I'm mostly sure it was through EW, but an older version at the time, though we also used https://github.com/IARSystems/project-migration-tools at the time which messed with the && too (I was told it's fixed now). So it mostly confused me that the IAR compiler did automatic correction while the VSC extension did not.

@jlonnberg
Copy link
Collaborator

So, we do some minor parsing that differs between the Embedded Workbench and VsCode which will be removed in the next release. So most likely, this will be fixed in the next release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants