-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
Make MDK show info on how to switch to full gradle sources #65
Conversation
This will significantly improve error reporting in the buildscripts and lead to a better development experience.
also, should we add tasks.named('wrapper', Wrapper).configure {
//Define wrapper values here so as to not have to always do so when updating gradlew.properties
gradleVersion = '8.7'
distributionType = Wrapper.DistributionType.ALL
} to the build.gradle? We can the tell people to change gradle version here and run the wrapper task to update without needing them to dig into wrapper folder |
That's generally discouraged, to update Gradle one shall run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure it will really make a difference (Gradle source handling is particularly broken in IJ for me) but why not.
I'm not sure if there's a big need for more than the API sources, especially if it triples the file size. Groovy syntax highlighting should already be complete highlighting without it. |
@lukebemish perhaps it was that needing reimport project. But do you have an alternative solution then? It seems intellij for me has issues often with gradle. @thiakil was the one who recommended I try this so it seems the mek team had issues with gradle often and switching to -all worked for them. And strange worked for me when I did the switch |
I'm uncertain. Deleting the .idea cache and reimporting tends to be reliable enough for me. I am simply hesitant to go with a solution that feels like waving our hands over a magic cauldron and hoping, especially when doing so has a specific adverse effect on the amount of stuff gradle downloads (and thus on import times) |
Technically, yes, but that's not how the IntelliJ PSI works, it doesn't do much with binary files (especially when it comes to generics which gradle is heavy on). Using the All distro would also bring in documentation in the java/groovy-doc What happens when you ctrl/cmd/middle-click one of the items, like Do you have shared indexes enabled and downloaded? |
ctrl-clicking, say, |
In gradle land , this has not been my experience |
Well given that it's just how stuff works in every other language support in IntelliJ where you don't need sources at all for stuff like syntax highlighting, do we have a good reason to believe that the presence of the sources is actually helping IntelliJ with anything here (and there could be, gradle gets special treatment all the time) or is this just a magic cauldron to wave our hands over? Basically: if this is changing something I'd want more of a reason why because (a) it's obviously not having an effect in all cases, and (b) there's no reason, given how IntelliJ acts with other language support, to expect it to change anything. |
Well we're not really talking syntax highlighting, it's the resolution that's helped, i.e. the grey text with underlines IMO adding the docs on hover or ctrl-clicking is a benefit even if it doesn't help resolution (it keeps insisting on finding unzipped sources on my system, so can't verify either way at this point). Does it cause harm to use the |
It causes a significant increase in size on disk, a significant increase in initial project load time, and an extra flag to keep in mind when updating the wrapper. And by "syntax highlighting" I was including stuff like the grey highlighted bits -- the inference of what methods are available and whatnot is not source-dependent in any other language in IntelliJ, so I'd want to confirm that that's actually what's going on here, because it would be strange for that to be the case, instead of just calling it magic. |
The file size increase is fairly nontrivial (the gradle docs included in the
Not sure what you would be deeming "significant" here. The download for the |
I would consider an extra minute wait a significant increase in project load time when the full load time on initial load is measured in minutes. |
I figured keeping it bin but have the comment and wrapper task say that all is an option for more documentation would be fine. This lets people that mess with Gradle be able to switch to all by seeing that is an option they can do while those that don't touch gradle can leave it as bin. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine to me. Informing the users of the choice (and in a way that persists across wrapper
task invocations) is good.
This will significantly improve error reporting in the buildscripts and lead to a better development experience.
Before:

After:
