eclipse / xtext-eclipse

xtext-eclipse
Eclipse Public License 2.0
49 stars 73 forks source link

Make resource save deterministic by forcing the resolution of cross-refs #1980

Closed rubenporras closed 1 year ago

rubenporras commented 1 year ago

Otherwise it can be that between the builder process the resource and the builder participant is called, the resource set is cleared, and then by loading it on demand we might persist a resource with proxies.

cdietrich commented 1 year ago

@rubenporras in general can you create an issue and then a pr linking to the issue?

rubenporras commented 1 year ago

for https://github.com/eclipse/xtext/issues/2484

szarnekow commented 1 year ago

A more holistic approach would be to run the generator on the resource that have already been processed before the resource set is cleared. Might that be an option?

rubenporras commented 1 year ago

Yes, I think that is the right option, if you do not mind the right refactor. That is what I meant with my post before "the real fix would be to save the resource in the builder, and not in the builder participant, because then the problem does not exists to begin with, but I do not know why it is not like that already, and thus propose the smallest change possible.".

cdietrich commented 1 year ago

this repository has been merged/moved to https://github.com/eclipse/xtext. please feel free to recreate this PR against that repository in case it still is relevant.