Fabric-Shield-Lib icon indicating copy to clipboard operation
Fabric-Shield-Lib copied to clipboard

Dont include tests in main mod.

Open IMB11 opened this issue 11 months ago • 4 comments

Having a data generator entrypoint in the library mod will break datagen for other mods. It's just bad practice to include test stuff with the library itself as well.

See https://github.com/FabricMC/fabric/issues/4330

IMB11 avatar Jan 01 '25 21:01 IMB11

https://github.com/StellarWind22/Fabric-Shield-Lib/blob/main/src/main/java/com/github/crimsondawn45/fabricshieldlib/initializers/FabricShieldLib.java#L91 All of this should be in a test mod. I will do this in a PR for you in the coming days.

IMB11 avatar Jan 01 '25 21:01 IMB11

Yeah this has caused issues for us in the past, one which I am currently trying to fix: the test enchantment showing up in the release. Before the shift to data, we used to be able to sweep it under the rug with a if(devEnviroment) check.

I will do this in a PR for you in the coming days.

That would be really helpful, thanks! I looked into that myself, but wasnt sure of the exact implementation within the project.

CringeStar avatar Jan 02 '25 20:01 CringeStar

I will push a bandaid fix for said enchant issue to release the 1.21.3 port, but if you make a PR, please do it to the 1.21.3 branch.

CringeStar avatar Jan 03 '25 20:01 CringeStar

Marked stale due to inactivity.

github-actions[bot] avatar Nov 17 '25 08:11 github-actions[bot]

I'll need to rework the current setup a little, but the way architectury works should make this easier.

StellarWind22 avatar Nov 24 '25 11:11 StellarWind22

I can add the mod tests as just a fabric_testmod & neoforge_testmod module.

StellarWind22 avatar Nov 24 '25 11:11 StellarWind22