eclipse-xtext / eclipse-xtext/xtext

XtextResourceSet.getResource keeps creating resources, because they are never placed in the resource map.

Open
#3,591 9 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.