Support for uru_rt exec
There is a request for supporting URU in RubyMine. And I'd like to do that. But it's hard with current implementation.
There are some obstacles that could be fixed in uru and made it more machine-friendly.
Would be really nice to have exec
command for uru_rt
, like:
uru_rt exec TAG some_arbirtrary_command
Expecting uru to configure environment and just run a command. Without additional things, like necessity to eval
admin install
or smth.
If this is not possible, would be nice to be able to suppress unnecessary output. E.g. when I use uru_rt TAG
i'd like to be able to suppress output currently using blabla
. in such cases I'll be able to use something like uru_rt TAG && some_arbitrary_command
.
First case is preferable.
Comments (9)
-
repo owner -
reporter - Not a RedMine - RubyMine - the Ruby IDE. https://www.jetbrains.com/ruby/
- Well, would be nice to make it work everywhere, but I believe Windows is most important. Others have alternatives, windows - don't.
- Yes, exactly. Possibility to run arbitrary command with specific ruby. The point of not using shell is that we don't have it. IDE runs ruby for something. E.g. generate rails app. Or lint files with rubocop. And it does that silently in the background. And it's not possible to do so with uru.
-
repo owner I rarely use ruby these days, and use vim not an IDE for ruby dev. I don't value the feature enough to prioritize implementing it.
But I do use idea community edition for kotlin/java dev, and find your request interesting.
Is this how you want things to work from rubymine (RM)?
- RM starts a child process using
uru_rt exec TAG some_arbitrary_command
. RM assumesuru_rt
is already onPATH
or user has provided full path via an RM settings dialog. uru_rt
starts a child process, updates the child process'sPATH
envar so theTAG
ged ruby is 1st onPATH
, and hooks up child'sstdout/stderr
to the parent streams. The child process'sGEM_HOME
envar will likely also need set.- The
TAG
ged ruby runs the arbitrary command, returns, anduru_rt
returns.uru_rt
adds no additional output to the child process'sstdout/stderr
, and takes no action base upon the child process's return code.
Reply with the specific behavior you'd like if the above is not precisely what you are requesting.
- RM starts a child process using
-
reporter Yes, that exactly what I need. I should be able to pipe to process and read stdout/stderr from it. Also I'd like to get an exit code of executed script. So uru_rt should be a transparent proxy for executing a command in the context of ruby specified with tag.
-
repo owner A few options for moving forward:
-
If you work for jetbrains and would like to sponsor the dev work, I'll consider it in exchange for an idea ultimate perpetual license with lifetime free upgrades. Send me an email to work the details. Use the address you find when clicking "View raw commit" from the bitbucket webui for any of the commits.
-
Send me a pull request. The go code is straight forward; a cmd router using handlers to write a envar updating script run by shell wrappers. This new
uru_rt
feature must run on both linux and windows and be usable from the multi-platformuru
shell wrappers. -
Keep the issue open and wait until I find time to implement, or someone else interested submits a pull request.
-
-
Hi @jonforums and @alexandr-evstigneev - any updates on this? Would love to use
uru
on RubyMine. -
repo owner @kapoorlakshya I've not started any efforts nor have I seen any pull requests for the feature.
-
Hi @Jon if and when you can, please do assist the RubyMine team so that they can add
uru
as a local-version-manager within RubyMine. Thanks! -
repo owner @Philip Schlesinger I also think @Alexandr Evstigneev idea is a cool for RubyMine. But don’t use ruby enough these days to put the time into this feature.
Given my
2018-12-10
comment and @Alexandr Evstigneev reply confirming it is what’s requested, anyone with some time and a little Go knowlege should be able to submit an acceptable pull request. - Log in to comment
Interesting. So I'm clear on what you're requesting...
1) Why would you use
uru_rt
rather than one of theuru
shel wrappers? The shell wrappers do some of the magic (e.g. manages a shell's session envars) in combo withuru_rt
as you can see from these bash and fish templates2) The overall idea is for
uru
to be able to run an arbitrary ruby command using a single tagged ruby installation, i.e. it's a complement to the existinguru ruby some_arbitrary_command
?3) This request is for Linux, Windows, and OSX? Related, do you have the ability to test on OSX? Unfortunately, I no longer have the ability to test on OSX, just Linux and Windows.
4) How would this be used by RedMine?