eclipse-xtext / eclipse-xtext/xtext
ITransientValueService is non-API; documentation indicates the wrong ITransientValueService
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 831
- Forks
- 330
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 12
Description
If a user wishes to customize the decision whether or not a value is considered transient by the Xtext serializer, they can bind a custom ITransientValueService.
However, there are two different interfaces called ITransientValueService:
org.eclipse.xtext.serializer.sequencer.ITransientValueServiceorg.eclipse.xtext.parsetree.reconstr.ITransientValueService
Both are used, but only the org.eclipse.xtext.serializer.sequencer.ITransientValueService seems to have the final say on whether or not to serialize a model element - at least in my use case, which is to have Xtend serialize model elements that have default values. This post by Christian Dietrich seems to agree.
The issues are, then:
- Non-API
org.eclipse.xtext.serializer.sequencer.ITransientValueServiceand the default implementationorg.eclipse.xtext.serializer.sequencer.LegacyTransientValueServiceare non-API. This seems undesirable, as provinding a custom binding is a valid usecase (per the above). - Javadoc
The Javadoc oforg.eclipse.xtext.parsetree.reconstr.ITransientValueServiceand that of itsisTransient()method imply that it decides whether a value needs to be serialized, while this is not 100% true. - Documentation
The documentation links toorg.eclipse.xtext.parsetree.reconstr.ITransientValueService. (This may be correct for some usecases; I don't fully understand the difference in role between the twoITransientValueServices.) - The DefaultRuntimeModule contains a method that binds an
org.eclipse.xtext.parsetree.reconstr.ITransientValueService. That means that Eclipse's content assist will offer to overwrite that method, which nudges the user to do that instead of creating a binding method fororg.eclipse.xtext.serializer.sequencer.ITransientValueService.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing org.eclipse.xtext.serializer.sequencer.ITransientValueService and LegacyTransientValueService with org.eclipse.xtext.parsetree.reconstr.ITransientValueService, then inspect the DefaultRuntimeModule binding. Review the linked runtime concepts documentation and Javadocs; done means the documented interface, API status, and binding guidance accurately reflect the serializer behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100