cucumber / messages

A message protocol for representing results and other information from Cucumber
MIT License
21 stars 19 forks source link

polyglot-release generates an error if developer hasn't built js messages #180

Open luke-hill opened 1 year ago

luke-hill commented 1 year ago

👓 What did you see?

> @cucumber/messages@23.0.0 prepare
> make generate

ruby ../jsonschema/scripts/codegen.rb TypeScript ../jsonschema typescript.ts.erb > src/messages.ts
TypeError: Java is not a class
  <main> at ../jsonschema/scripts/codegen.rb:190
make: *** [Makefile:17: src/messages.ts] Error 1
npm ERR! code 2
npm ERR! path /home/luke/Code/messages/javascript
npm ERR! command failed
npm ERR! command sh -c make generate

npm ERR! A complete log of this run can be found in: /home/luke/.npm/_logs/2023-11-01T15_02_44_485Z-debug-0.log

✅ What did you expect to see?

Polyglot-release working

📦 Which tool/library version are you using?

polyglot-release latest messages v22 (latest)

🔬 How could we reproduce it?

Pull the repo but don't install js packages

📚 Any additional context?


This text was originally generated from a template, then edited by hand. You can modify the template here.

davidjgoss commented 1 year ago

This is currently needed because a source file is generated with the package version number.

The usage is in cucumber-js when we generate the meta message: https://github.com/cucumber/cucumber-js/blob/6eede88fe6e6aed83a1ac581740d179e09643e3b/src/cli/helpers.ts#L105

I don't think we should need this - I'll see if I can get the version by interrogating the package.json instead (which is what people normally do).

luke-hill commented 3 months ago

re-ping @davidjgoss - Not sure if this is still an issue as I've installed these things now. Maybe something for the backburner

EDIT: If you've built js messages this still fails because of missing node modules