Raketask-Menu shows strange things

Hi,

after upgrading to 1.1 everthing seems to be working. But as I started RubyMine today, my list of rake tasks doesn't show up correctly. My colleague has the same problem. All other menus are shown correctly. As you can see in the screenshot, the elements are still there, but "a little bit" to small.
As you can see in the log, there is no exception.

Have you guys an idea of what's going on here?

Bye,

neogrande



Attachment(s):
log.txt
rake_task_db.jpg
0
9 comments

Is this problem still reproducible? What version of java do you use?

0
Avatar
Permanently deleted user

Hi Dennis,

yes, the problem still exists on our two machines.

# java -version
java version "1.6.0_10"
Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
Java HotSpot(TM) 64-Bit Server VM (build 11.0-b15, mixed mode)

0
Avatar
Permanently deleted user

I think I now the reason for those very small Rake tasks: there are simply too many to fit on the screen. I'm sitting in front of a MacBook and also have way too many entries - but I am able to scroll them so they appear in normal size. All of this started to appear after I've choosen "Reload Rake Tasks", now it not only shows Rake tasks but also seems to refer to entries in the file system. I see "tmp" and "tmp/war" for example which are directories in my Rails project (I also have a "tmp" 'folder' for the Rake task namespace). But I also see entries like "rails_env" that don't refer to files (see attached picture).
The log doesn't show anything useful (a 'Reload Rake Tasks' doesn't produce any output) and my Java version still is 1.5:

java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing)

I may have to note that I'm a colleague of neogrande and this is for the same project...



Attachment(s):
Strange Rake tasks.png
0

Hello,

RubyMine show both documented (red rake icon) and hidden rake tasks (grey rake icon with lock key). Launch "rake -P" and compare list of tasks

I see "tmp" and "tmp/war" for example which are directories in my Rails project (I also have a "tmp" 'folder' for the Rake task namespace).

I think that these taks are File Tasks (e.g. see http://onestepback.org/articles/buildingwithrake/filetasks.html)

I think I now the reason for those very small Rake tasks: there are simply too many to fit on the screen. I'm sitting in front of a MacBook and also have way too many entries - but I am able to scroll them so they appear in normal size.

We will check it today on Windows computer. Actually if you know which rake task you want to executed you should use RubyMine | Tools | Run Rake Tasks.. ( Alt+Shift+R / Option+R)
Picture 9.png

0
Avatar
Permanently deleted user

Hi Roman,

I have tried "rake -P" and this shows the reason - it has the same output.

Looks like we'd at least need the option to suppress undocumented tasks. It should be sufficient to be able to access them via "Run Rake Tasks.." as you may search for the namespace. Alternatively it might be a good idea to put undocumented top-level tasks into some folder 'undocumented' to avoid polluting the top level...
Is there any way to override the Rake tasks RubyMine is aware of until this is fixed?

Btw, I assume that the warbler plugin we're using for JRuby deploypment to Tomcat is causing those numerous tasks.

Cheers,
Uwe

0

Looks like we'd at least need the option to suppress undocumented tasks

Alternatively it might be a good idea to put undocumented top-level tasks into some folder 'undocumented' to avoid polluting the top level...


Ok, we will think how to better implement this

It should be sufficient to be able to access them via "Run Rake Tasks.." as you may search for the namespace.

"Run Rake Tasks.." dialog was designed to allow quickly find and execute rake tasks. You can search using any prefix of any part in namespace, also you can use '*' char.
Tools|Rake Tasks was designed to show/investigate all tasks in application, obviously it shouldn't have problems as on your first screenshot. But using full list of rake tasks wont be as productive as "Run Rake Tasks..." action.

Is there any way to override the Rake tasks RubyMine is aware of until this is fixed?


RubyMine saves list of rake tasks in xml format to [project_root]/.idea/.rakeTasks. You can try to remove useless tasks from this file. So open .rakeTasks in RubyMine as xml file, then ask RubyMine to reformat code in it.  Now you can edit list of tasks and tasks groups. Also I recommend set readonly attribute for .rakeTasks and backup patched version because sometimes RubyMine will try to update list of available rake tasks and may override the content of the file. New list of rake tasks will be applied after you reopen your project.

0

Looks like we'd at least need the option to suppress undocumented tasks.

Ok, we decided to hide undocumented ('private') tasks from Tools | Rake Tasks menu. Also Tools | Run Rake Task... is still able to show undocumented tasks if you enable checkbox "include undocumented". Also we noticed that "Run Rake Task..." shows only first 30 search results, so we've fixed this and now it behaves similar to "Go to file" dialog. Fix will be available in RubyMine 1.1.1

0
Avatar
Permanently deleted user

Thanks for thinking about this!

Got the point regarding preferrably running Rake tasks not via the menu but via the dialog

In the meantime I've created an XSL file to remove the useless tasks, see attached. On a Mac (or Linux) you should be able to run it like this:

$ xsltproc -o .idea/.rakeTasks.cleaned RubyMine_RakeTasks.xsl .idea/.rakeTasks
$ cp .idea/.rakeTasks.cleaned .idea/.rakeTasks


As you may need to provide some settings section for Rake for the first point, it may be a good idea to provide some type of exclude patterns (just like the content of the XSL).



Attachment(s):
RubyMine_RakeTasks.xsl
0
Avatar
Permanently deleted user

as usual, you're faster than anticipated

0

Please sign in to leave a comment.