MicroHs icon indicating copy to clipboard operation
MicroHs copied to clipboard

Automatic Hugs bootstrapping

Open Superstar64 opened this issue 11 months ago • 9 comments

Automate the process of Bootstrapping MicroHs with Hugs.

Have the Makefile automatically pull the patched version of MicroHs to build with Hugs, then use the patched version MicroHs to build the current tree.

Superstar64 avatar Jan 29 '25 00:01 Superstar64

Why does this PR remove a number of files in the hugs/ directory? I want those files.

augustss avatar Feb 02 '25 17:02 augustss

Well, you can only build MicroHs with Hugs in the hugs branch, so these files are useless in the master branch. I figured it would make more sense to only keep them in the hugs branch exclusively.

Superstar64 avatar Feb 02 '25 17:02 Superstar64

I want them in the master branch. I regard having a hugs branch as a temporary measure. It should be feasible to hack Hugs to have pattern guards and the the hugs branch can go away.

augustss avatar Feb 02 '25 17:02 augustss

There's a partial blocker for me. The current hugs branch (4a85b7204627f3ad76d463fe383259821eec755b) doesn't build on my machine, but the commit I specified e43e3cf30499e34da167384e8f26410e95e42648 works fine.

Superstar64 avatar Feb 02 '25 17:02 Superstar64

Does it crash with an overflow message? My Hugs patch fixes that. I can build with the current hugs branch using that patch. There is UB somewhere in Hugs. ☹️

augustss avatar Feb 02 '25 18:02 augustss

Does it crash with an overflow message? My Hugs patch fixes that. I can build with the current hugs branch using that patch. There is UB somewhere in Hugs. ☹️

Yes.

$ make bin/hmhs
runhugs '+Phugs:src:paths:{Hugs}/packages/*:hugs/obj' -98 +o +w -h100m hugs/Main.hs -i  -imhs -isrc -ilib -ipaths  MicroHs.Main -ogenerated/hmhs.c

Program error: arithmetic overflow
make: *** [Makefile:285: generated/hmhs.c] Error 1

I'm on Debian 12 and I'm using their hugs package.

Package: hugs
Version: 98.200609.21-6+b1
...

Superstar64 avatar Feb 02 '25 18:02 Superstar64

That error comes and goes. My patch replaces it with a warning.

augustss avatar Feb 02 '25 19:02 augustss

Okay, I'll take your word for it. I updated the commit to point to the current hugs branch's hash.

Superstar64 avatar Feb 02 '25 19:02 Superstar64

Okay, I can confirm the patched version of Hugs allows it to build on my (linux) machine.

Superstar64 avatar Feb 02 '25 19:02 Superstar64

I will revisit this later.

augustss avatar Jun 21 '25 12:06 augustss