redhat-developer / redhat-developer/vscode-java

Self referencing maven modules should not trigger an infinite loop in vscode

Open
#1,977 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

compile Maven
Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

Vscode enters an infinite loop while trying to compile a falsy module setup. It should instead break the build should break with an error stating that a module is self-referencing itself the same way the maven cli report it.

Environment
  • Operating System: OSX BIg Sur
  • JDK version: OpenJDK 11.0.8 2020-07-14
  • Visual Studio Code version: [Version: 1.56.2 Commit: 054a9295330880ed74ceaedda236253b4f39a335]
  • Java extension version:
Steps To Reproduce
  1. Create a parent maven project with packaging type pom - parent
  2. Create a submodule (module-1) project with the packaging type 'jar' in the previous parent project
  3. Add a dependency of module-1 in parent with the save version (${project.version})
  4. See the error: Vscode will enter an infinite loop trying to resolve the dependency

Sample project reproducing the error

test-self-ref.zip

Current Result

The build will never get past the 339/1000 as displayed in the console (infinite loop)

Screenshot 2021-06-10 at 10 40 39
Expected Result

Build should terminate with error as done bymaven when using the cli.

Screenshot 2021-06-10 at 11 02 07
Additional Informations

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 by importing the attached test-self-ref.zip project into the Java extension and comparing its behavior with the Maven CLI. Trace the module-resolution path responsible for stopping at 339/1000; done means the self-referencing setup terminates with an error instead of looping indefinitely.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, vscode
Domain
build-system, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.