ruby-loco icon indicating copy to clipboard operation
ruby-loco copied to clipboard

[Documentation] Simple/Simplistic setup?

Open rubyFeedback opened this issue 5 years ago • 8 comments

Hey Greg,

Do you think you could add a brief installation instruction to the main README at https://github.com/MSP-Greg/ruby-loco/blob/master/README.md ?

Nothing complicated, just really a simple/simplistic work flow, one that may work for you when you are on a fresh windows machine (no matter which windows variant, though I guess it does matter what windows variant; I am more interested in like the most simple installation scenario, ideally something that could be copy/pasted :D). Thanks!

rubyFeedback avatar Feb 12 '20 14:02 rubyFeedback

I need to update a few README files...

ideally something that could be copy/pasted

Are you looking for a script to install it? A Ruby script or PowerShell?

It's zipped as a 7z file, so one would need 7-Zip. Also, I'd probably just link to the MSYS2 install page for that.

One reason I haven't developed the README is that this is a master build. For instance, if you try to install pre-compiled gems, almost none of them allow installation when using a master build.

Also, ruby-loco was started a long time ago because ruby/ruby was not fully testing on MinGW. Various repos/gems also started using it in their CI testing.

MSP-Greg avatar Feb 12 '20 14:02 MSP-Greg

Okay, I forgot one main question.

Do you want to use ruby-loco to build Ruby locally or do you want to download the builds it creates and saves via GitHub Actions?

The builds are done three times a day and saved in the single release here:

https://github.com/MSP-Greg/ruby-loco/releases/tag/ruby-master

MSP-Greg avatar Feb 12 '20 15:02 MSP-Greg

I have a question - I want a ruby debug build that I can step through with vscode on windows rubyinstaller2 . Can I use this to build ruby to debug and develop ruby with?

dsisnero avatar Jun 18 '20 19:06 dsisnero

Can I use this to build ruby to debug and develop ruby with?

A qualified yes. I haven't used it to build locally for quite a while. When I first started it, it was only for mingw builds, but now there's code in it for mswin builds.

Which are you wanting to build? Can you build on GitHub Actions and download the release asset, or do you prefer to build locally?

MSP-Greg avatar Jun 18 '20 19:06 MSP-Greg

I have some win32ole code that keeps segfaulting. I want to be able to step through the c code. Also, the python - comtypes allows you to make a comserver class. I want to add this capability to ruby win32ole lib.

On Thu, Jun 18, 2020 at 1:40 PM MSP-Greg [email protected] wrote:

Can I use this to build ruby to debug and develop ruby with?

A qualified yes. I haven't used it to build locally for quite a while. When I first started it, it was only for mingw builds, but now there's code in it for mswin builds.

Which are you wanting to build? Can you build on GitHub Actions and download the release asset, or do you prefer to build locally?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/MSP-Greg/ruby-loco/issues/3#issuecomment-646267539, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAABQRIV44ZBK42ILRS3MLTRXJURBANCNFSM4KT2Z7EA .

dsisnero avatar Jun 18 '20 21:06 dsisnero

Hello @dsisnero I spent a few days getting into this topic. I managed to run the debugger. The current build here strips the debug symbols and thats why we couldn't debug. I wrote a blogpost explaining how to debug with VSCode and gdb. In my fork I have a changed build script that does not strip the symbols. It would be nice if we could come up with a script that does not recompile everything each time, so it's faster to test changes.

Compile Ruby on Windows and Debug with GDB

Largo avatar Jan 14 '23 10:01 Largo

@Largo @dsisnero

(The build script was renamed)

Sorry about that. A while ago, I added the mswin build, and it shared very little with the MSY2 build code. When I recently revised the mswin build code, I renamed the main build scripts...

Re the strip code, I haven't built without the 'strip' code for a very long time. Let me have a look.

I'll either remove it, or allow disabling it with an ENV setting.

It would be nice if we could come up with a script that does not recompile everything each time

Haven't looked at 'cleaning' code for a while, have you? That could also have an ENV conditional added?

JFYI, I do use ruby-loco for local building, and I'm happy to add features. Additionally, it supplies 'well tested' builds for use with GitHub Actions, which I feel is also important...

Thanks, Greg

MSP-Greg avatar Jan 14 '23 17:01 MSP-Greg

No worries, thanks for the useful code! In my fork, I removed the strip code and added the symbol flags and debugging worked!

I'm not that good with powershell but i agree adding conditionals would be a great idea. Other suggestion:

  • let people know that they need the newer powershell versions (they do right?)

I don't know how cleaning the code works. I think maybe configure doesnt need to run each time.

I had the case that I needed to reset the whole git repo for ruby. That is in the official documentation too. (There is a gir command for this)

Cool project in any case. Would be great to put in the offical ruby documentation to let more people know, I think.

Largo avatar Jan 15 '23 02:01 Largo