Skip to content
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

Automatic Hugs bootstrapping #108

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

Superstar64
Copy link
Contributor

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.

@augustss
Copy link
Owner

augustss commented Feb 2, 2025

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

@Superstar64
Copy link
Contributor Author

Superstar64 commented Feb 2, 2025

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.

@augustss
Copy link
Owner

augustss commented Feb 2, 2025

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.

@Superstar64
Copy link
Contributor Author

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

@augustss
Copy link
Owner

augustss commented Feb 2, 2025

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. ☹️

@Superstar64
Copy link
Contributor Author

Superstar64 commented Feb 2, 2025

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
...

@augustss
Copy link
Owner

augustss commented Feb 2, 2025

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

@Superstar64
Copy link
Contributor Author

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

@Superstar64
Copy link
Contributor Author

Superstar64 commented Feb 2, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants