Skip to content

Conversation

@LexManos
Copy link
Member

@LexManos LexManos commented Feb 3, 2026

This is to address #1038
The eclipse runs were not using the correct directories.

Basically, because I didn't want to figure out how to pass in the eclipseModel to a task. I do all the work at configuration time.
But also this is called during afterEvalute because thats when MinecraftDependency.handle is called.
That needs to be fixed, as only validation should be happening in afterEvaluate, but thats a bigger thing for later.

I deleted getEclipseOutputDir because it is part of the internal api, and thus not what I consider a breaking change.
In its place, i grab the EclipseModel as needed.
From the EclipseModel I use:

  • sourceSets
  • baseSourceOutputDir
  • defaultOutputDir

From SourceSet I use:

  • name
  • output.resourcesDir
  • output.classesDirs

This works for now, if this looks sane enough to you @Jonathing pull.

Copy pasting some relevant details form discord:
Okay so The EclipseClasspath task uses the EclipseModel. Which includes SourceFolder entries.
These entries have a 'output' value which is set via SourceFoldersCreator
Who collectSourceSetoutputPaths function basically just does:

path = base + '/' + sourceSet.name
while (claimed.contains(path)) path += '_'
return path

Easy enough to mimic. Except for the base part. That is gotten from EclipseClasspath.getBaseSourceOutputDir, relativzed to the project directory.
Which for completeness sake, defaults to project.dir("bin")

This is all simple enough if we can figure out how to pass in the EclispeModel and sourceSets into the task.

@Jonathing Jonathing changed the title Fix GenEclipseRuns not using correct eclipse output directories [7.0] Fix genEclipseRuns not using correct eclipse output directories Feb 3, 2026
@Jonathing
Copy link
Member

Works. See 4bbe2b4 for the small change I made which sets both defaultOutput and baseSourceOutput to build/sourceSets if merged source sets is enabled. I am still not entirely sure how they work at anything more than a surface level, but it seems to have fixed the underlying issue, and I'm able to debug both my own code and external libraries.

@Jonathing Jonathing self-assigned this Feb 3, 2026
@Jonathing Jonathing modified the milestones: 7.0.0, 7.1.0 Feb 3, 2026
@Jonathing Jonathing merged commit 59c470d into MinecraftForge:FG_7.0 Feb 3, 2026
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

Successfully merging this pull request may close these issues.

[7.0] Don't see code in debug with Eclipse and not getting code changes

2 participants