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

Configure idea to download sources and javadoc jars #47

Merged
merged 1 commit into from
Apr 13, 2024

Conversation

Jozufozu
Copy link

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

@sciwhiz12 sciwhiz12 added the enhancement New feature or request label Apr 13, 2024
@marchermans marchermans merged commit 6074a78 into neoforged:main Apr 13, 2024
1 check passed
@lukebemish
Copy link

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

@Jozufozu
Copy link
Author

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
Copy link

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
Copy link

lukebemish commented Apr 15, 2024

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
Copy link

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
Copy link

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
Copy link

lukebemish commented Apr 21, 2024

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.

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

Successfully merging this pull request may close these issues.

4 participants