eclipse / Xpect

This repository has been rewritten to move to the Eclipse Foundation. Find the old history here: https://github.com/TypeFox/Xpect
http://www.xpect-tests.org/
Eclipse Public License 2.0
30 stars 28 forks source link

Modernize Xpect #320

Closed cdietrich closed 11 months ago

cdietrich commented 1 year ago

Xpect still uses the old xtext workflow (see what new Xtext project wizard generates) and the old xtext generator.(xpand based) this is cause of https://github.com/eclipse/Xpect/blob/018800b3af074c402b2aa53174e2457ea6f48046/org.eclipse.xpect/src/org/eclipse/xpect/GenerateXpect.mwe2#L124C6-L124C6 which uses https://github.com/meysholdt/xtext_stateful_lexer/blob/48a4201ea3e0e52743af553ffaea89ba2d79144c/de.itemis.statefullexer/src/de/itemis/statefullexer/StatefulLexerFragment.xtend#L22

we should move the new fragment to a new plugin in the xpect project. we also need to make sure content assist and highlighting lexer get put to the ide project.

once this is done we can move in xpect

also the workflows in the examples need to be modernized, but that should be straight forward. we also should get of deprecated xtext junit4 there

maybe we also should create a 0.2.0 branch with the current state and bump master to 0.3.0 then

in an alternative approach we would update target platform, xtext+java version, workflow, tycho and pom first and use fragment adapter (see history of /org.eclipse.xtext.ui.codetemplates/src/org/eclipse/xtext/ui/codetemplates/GenerateCodetemplateLanguages.mwe2) to call old workflow and then create the new fragment. in this case we could make sure the "new dependencies" work first before introducing the changed code.

regardings versions:

merks commented 1 year ago

Wow, this doesn't sound fun at all. 😱

merks commented 1 year ago

These are the dependencies I see:

image

cdietrich commented 1 year ago

yes. and xpand is not maintained since 2016

cdietrich commented 1 year ago

see also https://github.com/eclipse/xtext/issues/2676

cdietrich commented 1 year ago

This will also fix https://github.com/eclipse/Xpect/issues/300

cdietrich commented 1 year ago

with merging the complete logic from stateful lexer to modernizeXpect branch (see https://github.com/eclipse/Xpect/pull/322) all dependencies to xpand, stateful lexer, icu and org.eclipse.xtext.generator (the old one) should be removable

merks commented 1 year ago

That sounds very promising!

cdietrich commented 11 months ago

many thanks for your contribution @tjeske

cdietrich commented 11 months ago

open tasks

cdietrich commented 11 months ago

will close this for now. open points can be handled separately many thanks for your efforts @tjeske