Skip to content
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

Eclipse compiler ignores the module source path set through file manager #3766

Open
jarthana opened this issue Mar 4, 2025 · 0 comments
Open

Comments

@jarthana
Copy link
Member

jarthana commented Mar 4, 2025

I will try to add a test case to demonstrate this. But here's what happens:

  1. We get the EclipseCompiler with something like this:
    CompilationTask task = compiler.getTask(printWriter, filemanager, listener, copyOptions, null, units);
  2. Set the module source path on the file manager:
fileManager.setLocationForModule(
  				StandardLocation.MODULE_SOURCE_PATH,
  				modName,
  				Collections.singleton(Paths.get(srcFolderName, modName)));
  1. Invoke compiler: task.call()

Now, the problem is, getTask() initiates the compiler, calling Main#configure() which eventually fails at handleSingleModuleCompilation() because --module-source-path has not been passed as a regular argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant