CadixDev / Mercury

A source transformation and -remapping framework for Java.
Eclipse Public License 2.0
54 stars 23 forks source link

Imports are added for unknown types #32

Open williewillus opened 4 years ago

williewillus commented 4 years ago

From FabricMC/fabric-loom#255

I'm working on porting a certain tech mod to Fabric from Forge, which means a few platform class names are errored out/not available in the environment.

Today, I used migrateMappings to move the in-progress port from 1.16.1+build.20 to 1.16.2+build.1. It went mostly smoothly, except that the task added imports for all the unknown forge classes. The old forge import lines had already been deleted by a regex earlier.

import vazkii.botania.api.mana.IManaReceiver;
import vazkii.botania.common.block.tile.ModTiles;
import vazkii.botania.common.block.tile.TileMod;
import IEnergyStorage; // <-- ???
import LazyOptional; // <-- ???
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

likely related to #16

jamierocks commented 4 years ago

While on a cursory glance, it may seem related to #16 - this bug only occurs when using graceful classpath checks (I would assume, Fabric actually uses a dated fork).

Though, the solutions may be the same - I think @phase was looking into it.