eclipse-langium / langium

Next-gen language engineering / DSL framework
https://langium.org/
MIT License
725 stars 65 forks source link

moved generator API to a dedicated package export, solves #1285 #1287

Closed sailingKieler closed 10 months ago

sailingKieler commented 11 months ago

I named the new export generating, as its content is to be used for generating code. generators may also work. generator is IMO a bit misleading as there is no langium generator, and generation means something different. 😉

I took the opportunity to:

spoenemann commented 10 months ago

Thanks! Refactoring langium-cli is great, I had that on my mind for quite some time.

Regarding the name: I agree generator is misleading, but I would propose generate, which is more consistent with test (otherwise it should be testing).

Then I'd also rename src/generator to src/generate.

sailingKieler commented 10 months ago

Regarding the name: I agree generator is misleading, but I would propose generate, which is more consistent with test (otherwise it should be testing).

Right, switched to generate.

Then I'd also rename src/generator to src/generate.

Done 👍

Lotes commented 10 months ago

Nice work with replacing the CompositeGeneratorNodes with expandToNode.

sailingKieler commented 10 months ago

There are lots of compile errors at the moment. I don't know why the GitHub Action wasn't triggered.

I missed to update an import of NEWLINE_REGEX, and a recent change in the yeoman generator test caused a conflict -> no actions where executed.

I would like to merge this PR ASAP, I left a hint in tsconfig.export-main.json, see packages/langium/test/tsconfig.export-main.json