-
Notifications
You must be signed in to change notification settings - Fork 18
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
Comments
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 :) |
You can check serializableresourcedescrption And it’s usage in resourcestorageloadable/writable and or emfbasedpersister |
@szarnekow what do you use in your lsp project? |
Usually this is custom serialization logic since the default SerializableResourceDescription and friends are quite inefficient. 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. |
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.The text was updated successfully, but these errors were encountered: