Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the build tasks cacheable #185

Open
dpetroff opened this issue Feb 15, 2021 · 4 comments
Open

Make the build tasks cacheable #185

dpetroff opened this issue Feb 15, 2021 · 4 comments

Comments

@dpetroff
Copy link

It would be good to be able to use the --build-cache option when Xtext/Xtend generation is in the mix. The Java compile task that comes with gradle is already cacheable, and we'd like to avoid committing generated sources to git, while still being able to cache the build results during our CI build.

@oehme
Copy link
Member

oehme commented Aug 31, 2021

This will require some deeper changes to the plugin. Most importantly, we'll have to store the index on disk rather than in memory so that we can restore it from the build cache. We'll also need to make sure that the index doesn't contain any absolute paths, so that it is reusable across machines.

@szarnekow do you have some pointers for how to serialize the index? My Xtext knowledge has gotten rusty :)

@cdietrich
Copy link
Member

cdietrich commented Aug 31, 2021

You can check serializableresourcedescrption And it’s usage in resourcestorageloadable/writable and or emfbasedpersister

@cdietrich
Copy link
Member

@szarnekow what do you use in your lsp project?

@szarnekow
Copy link
Member

Usually this is custom serialization logic since the default SerializableResourceDescription and friends are quite inefficient.
I also assume that the issues will need to be persisted, too.

You may want to look at https://github.com/eclipse/n4js/blob/master/plugins/org.eclipse.n4js.xtext.ide/src/org/eclipse/n4js/xtext/ide/server/build/ProjectStatePersister.java#L205 which is not optimal, either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants