eclipse-xtext / eclipse-xtext/xtext
XtextResourceSet.getResource keeps creating resources, because they are never placed in the resource map.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 831
- Forks
- 330
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 12
Description
XtextResourceSet.getResource(URI uri, boolean loadOnDemand) overrides ResourceSet.getResource(URI, boolean), presumably because of the 'URI normalization' which I think was added because of https://bugs.eclipse.org/bugs/show_bug.cgi?id=399771.
Contrary to ResourceSet.getResource though, XtextResourceSet.getResource never places the result of demandLoadHelper in the map obtained from getURIResourceMap(). As a consequence, the Resource can never be obtained from the map, so demandLoadHelper keeps getting called.
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 at XtextResourceSet.getResource(URI, boolean) and compare its behavior with ResourceSet.getResource(URI, boolean), focusing on demandLoadHelper and getURIResourceMap(). Done means a demand-loaded resource is placed in the map and repeated lookups no longer recreate it; inspect the existing resource-loading behavior to identify the relevant verification path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100