neoforged / MDK

The Mod Developer Kit - this is where you start if you want to develop a new mod
https://github.com/NeoForgeMDKs
183 stars 60 forks source link

Configure idea to download sources and javadoc jars #47

Closed Jozufozu closed 3 months ago

Jozufozu commented 3 months ago

Not sure exactly what version of IDEA changed the default behavior, but this should solve a lot of headaches for folks

lukebemish commented 3 months ago

Urgh, this just needlessly increased project import times. Not sure what the issue is pressing "download soruces" only when you actually want them.

Jozufozu commented 3 months ago

Well I guess that's why intellij changed the default behavior. Curious, how much of a difference is it?

Personally I don't mind longer reload times if it means I don't miss a beat when browsing the code of my dependencies, particularly when they update frequently.

I guess my real intention with this PR was to educate folks that the default behavior can be changed. Perhaps we could leave this block in but set the fields based on a flag in gradle.properties

lukebemish commented 3 months ago

On a bad network connection? Could be a bit. I'm seeing split opinions on the new default setting, but it's really the sort of thing that should be configured on the user end in their IntelliJ settings, not mandated by the gradle file for a project they're importing; that's the major issue I take with this change -- as far as I can tell this makes it impossible for a user to now opt into not downloading sources, whereas before it would go with whatever your settings were locally which is in my opinion the preferred behavior.

lukebemish commented 3 months ago

Basically, the scenario in question is this: someone clones a random project based off the MDK off GitHub to debug something, submit a PR, or whatever. Are sources downloaded? That should depend on the user's IntelliJ settings, not on something about that project; if the user has it set up to always download, they should get sources, and if they don't, they shouldn't. This change makes it so that a user will get those sources even if their IDE has the (now default) state of having automatic downloading disabled.

marchermans commented 3 months ago

Basically, the scenario in question is this: someone clones a random project based off the MDK off GitHub to debug something, submit a PR, or whatever. Are sources downloaded? That should depend on the user's IntelliJ settings, not on something about that project; if the user has it set up to always download, they should get sources, and if they don't, they shouldn't. This change makes it so that a user will get those sources even if their IDE has the (now default) state of having automatic downloading disabled.

That would be true for any random github project.

But this is the MDK for NeoForge. New modders come here and they expect to see sources, accurate debuggable source. The amount of questions we already had in discord why no Minecraft sources attach is frankly way to high already. So it was decided to add this to the MDK to solve the problem once and for all.

If you have a slow connection you can disable them again for your selves.

lukebemish commented 3 months ago

That's the issue; if I clone some project off GitHub based on this, it will be enabled again for that project. This is a setting that ought to happen at the user/local level, not at the gradle buildscript level. Could this be replaced with instructions to enable the setting in IntelliJ?

lukebemish commented 3 months ago

Following up on this: could this be replaced with a comment explaining how to globally enable the setting in IntelliJ? This should be a setting determined by the user, not by any repository they may clone, including any repository based off the MDK.