AdaCore / RecordFlux

Formal specification and generation of verifiable binary parsers, message generators and protocol state machines
Apache License 2.0
105 stars 6 forks source link

"ERROR Manifest missing field: version" while building vscode extension #1300

Closed mgrojo closed 1 month ago

mgrojo commented 1 month ago
$ make -C ide/vscode dist
make: se entra en el directorio '/home/mgr/src/github/mgrojo/coap_spark/tools/RecordFlux/rflx/ide/vscode'
npm ci

added 334 packages, and audited 335 packages in 5s

77 packages are looking for funding
  run `npm fund` for details

1 moderate severity vulnerability

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
sed -i "s/\"version\": \".*\"/\"version\": \"$(echo  | sed 's/\.dev/-dev/')\"/" package.json && vsce package -o recordflux.vsix && sed -i "s/\"version\": \".*\"/\"version\": \"0.0.0\"/" package.json
 ERROR  Manifest missing field: version
make: *** [Makefile:15: recordflux.vsix] Error 1
make: se sale del directorio '/home/mgr/src/github/mgrojo/coap_spark/tools/RecordFlux/rflx/ide/vscode'

The problem is that the environment variable VERSION does not exist. Maybe the make execution should define it or a reference in the documentation about defining it should be added?

My workaround has been:

export VERSION=0.0.1
make -C ide/vscode dist

Current commit in the repository is tag v0.23.0.

mgrojo commented 1 month ago

Later, the extension is installed correctly using make install, but in the documentation is not very evident that you have to run that inside ide/vscode/

treiher commented 1 month ago

Thank you for reporting this issue. We have simplified the creation of the VS Code extension and improved the documentation. You can now execute make vscode from the top-level directory to build the extension.